/* ============================================
   SCHTAF 思塔夫 — 产品详情页样式
   ============================================ */

/* 页面容器 */
.product-detail-page {
  min-height: calc(100vh - 200px);
  padding: 65px 0 60px;
}

/* ====== 页面路径导航条 ====== */
.page-nav-bar {
  background: #fafafa;
  border-bottom: 1px solid var(--border-light, #e8e8e8);
}

.page-nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
}

.page-nav-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-light, #999);
}

.page-nav-path a {
  color: var(--text-secondary, #666);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.page-nav-path a:hover {
  color: var(--primary, #B91C1C);
}

.page-nav-sep {
  display: flex;
  align-items: center;
  margin: 0 8px;
  opacity: 0.4;
  color: var(--text-light, #999);
}

.page-nav-current {
  color: var(--text-dark, #1a1a1a);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* ====== 产品详情区域 ====== */
.product-detail {
  max-width: 1300px;
  margin: 10px auto 0;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  min-height: 500px;
}

/* 左侧：图片区 */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-main-image {
  background: var(--bg-gray, #f5f5f5);
  border-radius: var(--radius-lg, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 400px;
  flex: 1;
}

.detail-main-image img {
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
  border-radius: var(--radius, 8px);
}

/* 缩略图 */
.detail-thumbnails {
  display: flex;
  gap: 12px;
}

.detail-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--bg-gray, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.detail-thumbnail:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.detail-thumbnail.active {
  border-color: var(--primary);
}

.detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.detail-thumbnail span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  text-align: center;
  padding: 2px 0;
}

/* 右侧：信息区 */
.detail-info {
  padding: 10px 0;
}

.detail-title {
  font-size: 2rem;
  color: var(--text-dark, #1a1a1a);
  margin-bottom: 20px;
  line-height: 1.3;
}

.detail-model {
  font-weight: 700;
  color: var(--text-dark, #1a1a1a);
  margin-right: 8px;
}

.detail-name-text {
  color: var(--primary, #B91C1C);
  font-weight: 600;
}

.detail-desc {
  color: var(--text-secondary, #555);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* 规格参数 */
.detail-section-title {
  font-size: 1.1rem;
  color: var(--text-dark, #1a1a1a);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary, #B91C1C);
  display: inline-block;
}

.detail-specs {
  margin-bottom: 32px;
}

.detail-spec-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light, #e5e5e5);
}

.detail-spec-row:last-child {
  border-bottom: none;
}

.detail-spec-label {
  font-weight: 600;
  color: var(--primary, #B91C1C);
  min-width: 90px;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.detail-spec-value {
  color: var(--text-secondary, #555);
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 尺寸图 / 场景图 */
.detail-diagram {
  margin-bottom: 28px;
}

.detail-diagram-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-diagram-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius, 8px);
  background: var(--bg-gray, #f5f5f5);
  padding: 12px;
  max-height: 40vh;
}

/* 返回按钮 */
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary, #B91C1C);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius, 8px);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  margin-top: 20px;
}

/* ====== 附件下载 ====== */
.detail-attachments {
  margin-bottom: 28px;
  margin-top: 8px;
}

.detail-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.detail-attachment-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-gray, #f5f5f5);
  border: 1px solid var(--border-light, #e5e5e5);
  border-radius: var(--radius, 8px);
  text-decoration: none;
  color: var(--text-dark, #1a1a1a);
  transition: all 0.2s;
  cursor: pointer;
}

.detail-attachment-btn:hover {
  border-color: var(--primary, #B91C1C);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateX(4px);
}

.attachment-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary, #B91C1C);
  color: #fff;
  border-radius: var(--radius, 8px);
  flex-shrink: 0;
}

.attachment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.attachment-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-ext {
  font-size: 0.75rem;
  color: var(--text-light, #999);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attachment-download-icon {
  flex-shrink: 0;
  color: var(--text-light, #999);
  transition: color 0.2s;
}

.detail-attachment-btn:hover .attachment-download-icon {
  color: var(--primary, #B91C1C);
}

.detail-back-btn:hover {
  background: var(--primary-dark, #991B1B);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.detail-back-btn svg {
  flex-shrink: 0;
}

/* ===========================
   响应式设计
   =========================== */
@media (max-width: 992px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  .page-nav-inner {
    padding: 0 20px;
  }

  .detail-main-image {
    min-height: 300px;
    padding: 24px;
  }

  .detail-title {
    font-size: 1.6rem;
  }

  .detail-attachment-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .detail-attachment-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .page-nav-path {
    font-size: 12px;
  }

  .page-nav-sep {
    margin: 0 5px;
  }

  .page-nav-current {
    max-width: 180px;
  }

  .product-detail {
    padding: 0 16px;
    gap: 20px;
  }

  .detail-main-image {
    min-height: 250px;
    padding: 16px;
  }

  .detail-main-image img {
    max-height: 45vh;
  }

  .detail-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }

  .detail-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .detail-spec-label {
    min-width: 70px;
    font-size: 0.85rem;
  }

  .detail-spec-value {
    font-size: 0.85rem;
  }

  .detail-thumbnail {
    width: 64px;
    height: 64px;
  }

  .detail-back-btn {
    width: 100%;
    justify-content: center;
  }

  .detail-diagram-img {
    max-height: 30vh;
  }

  .detail-attachment-btn {
    padding: 12px 14px;
  }

  .attachment-icon {
    width: 36px;
    height: 36px;
  }

  .attachment-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .detail-title {
    font-size: 1.2rem;
  }

  .detail-spec-row {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }

  .detail-spec-label {
    min-width: unset;
  }

  .detail-attachment-list {
    flex-direction: column;
  }

  .detail-attachment-btn {
    flex: 1 1 100%;
    min-width: unset;
  }
}

/* ===========================
   悬浮所有产品按钮 - 右上角固定
   =========================== */
.floating-all-products-btn {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary, #B91C1C);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(185, 28, 28, 0.25);
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.floating-all-products-btn:hover {
  background: #991b1b;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.35);
  color: #fff;
}

.floating-all-products-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .floating-all-products-btn {
    top: auto;
    bottom: 20px;
    right: 20px;
    padding: 12px 14px;
    font-size: 12px;
  }

  .floating-all-products-btn span {
    display: none;
  }

  .floating-all-products-btn svg {
    width: 22px;
    height: 22px;
  }
}
