/* =============================================
   产品详情页 — 全新现代设计
   ============================================= */

/* --- 全局容器 --- */
.product-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 80px;
}

/* =============================================
   1. 产品信息区域（全宽）
   ============================================= */
.product-info-wrap {
  margin-bottom: 30px;
}

.product-info {
  max-width: 100%;
}

/* 标题行（标题 + 按钮） */
.product-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2328;
  margin: 0;
}

/* 型号 + 日期 */
.product-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
}

.meta-item .iconfont {
  font-size: 14px;
}

/* 操作按钮 */
.product-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  border: none;
  line-height: 1;
}

.btn .iconfont {
  font-size: 18px;
}

.btn-primary {
  background: #1f2328;
  color: #fff;
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.25);
  text-decoration: none;
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: #1f2328;
  border: 2px solid #1f2328;
}

.btn-outline:hover {
  background: #1f2328;
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-ghost {
  background: #f4f6f8;
  color: #555;
}

.btn-ghost:hover {
  background: #e8eaed;
  color: #1f2328;
  transform: translateY(-2px);
  text-decoration: none;
}

/* =============================================
   2. Tab 切换区
   ============================================= */
.product-tabs {
  margin-bottom: 60px;
}

.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #eee;
  padding-bottom: 0;
  margin-bottom: 0;
}

.tab-btn {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #999;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.tab-btn:hover {
  color: #555;
}

.tab-btn.active {
  color: #1f2328;
  border-bottom-color: #1f2328;
}

.tabs-content {
  padding: 32px 0;
  min-height: 200px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Tab 1: 产品图册（PDF 预览） --- */
.catalog-viewer {
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  background: #fafafa;
}



.catalog-frame-wrap {
  width: 100%;
  height: 700px;
  overflow: hidden;
  background: #f0f0f0;
}

.catalog-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.catalog-hint {
  padding: 12px 24px;
  margin: 0;
  font-size: 13px;
  color: #999;
  background: #fff;
  border-top: 1px solid #eee;
  text-align: center;
}

.catalog-hint .iconfont {
  margin-right: 4px;
}

.catalog-hint a {
  color: #1f2328;
  font-weight: 600;
  text-decoration: underline;
}



/* =============================================
   3. 相关产品
   ============================================= */
.related-products {
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.related-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1f2328;
  margin: 0;
}

.related-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.related-more:hover {
  color: #1f2328;
  text-decoration: none;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related-card {
  display: block;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  background: #fff;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  border-color: transparent;
  text-decoration: none;
}

.related-card-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #f8f9fa;
}

.related-card-img img { 
  object-fit: contain;
  transition: transform 0.4s ease;
}

.related-card:hover .related-card-img img {
  transform: scale(1.08);
}

.related-card-info {
  padding: 12px 15px;
  overflow: hidden;
}

.related-card-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2328;
  margin: 0 0 4px;
}

.related-card-desc {
  font-size: 13px;
  color: #999;
}

/* =============================================
   响应式
   ============================================= */
@media (max-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-detail-container {
    padding: 24px 16px 60px;
  }

  .product-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-title {
    font-size: 24px;
  }

  .product-meta {
    gap: 16px;
  }

  .product-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    justify-content: center;
    padding: 12px 18px;
    font-size: 13px;
  }

  .catalog-frame-wrap {
    height: 450px;
  }

  .related-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .related-card-img {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .spec-row {
    flex-direction: column;
  }

  .spec-label {
    flex: none;
    width: 100%;
    padding-bottom: 4px;
  }

  .gallery-main-inner {
    padding: 16px;
  }

  .thumb-item {
    width: 52px;
    height: 52px;
    padding: 6px;
  }

  .product-price-tip {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}

.cart_drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.cart_drawer.is-open {
  display: block;
}

.cart_drawer_backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cart_drawer_panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.cart_drawer_header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid #ececec;
}

.cart_drawer_header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #1f2328;
}

.cart_drawer_header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
}

.cart_icon_btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #f4f6f8;
  color: #1f2328;
  font-size: 28px;
  cursor: pointer;
}

.cart_drawer_body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.cart_contact_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 22px auto 0;
  padding: 14px 0;
  gap: 8px;
  width: 40%;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #000;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cart_contact_btn:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(31, 35, 40, 0.25);
  text-decoration: none;
  color: #fff;
}

.cart_list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart_item,
.cart_empty,
.cart_quote_box {
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
}

.cart_item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.cart_item_thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #f4f6f8;
  flex-shrink: 0;
}

.cart_item_info {
  flex: 1;
  min-width: 0;
}

.cart_item_info h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #1f2328;
}

.cart_item_info p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
}

.cart_item_remove {
  border: 0;
  background: transparent;
  color: #a34d24;
  font-size: 13px;
  cursor: pointer;
}

.cart_empty {
  padding: 22px 18px;
  font-size: 14px;
  color: #666;
}

.cart_quote_box {
  padding: 18px;
  background: #fcfbf8;
}

.cart_quote_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cart_quote_head h3 {
  margin: 0;
  font-size: 16px;
  color: #1f2328;
}

.cart_copy_btn {
  border: 0;
  border-radius: 10px;
  background: #333;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
}

.cart_quote_text {
  width: 100%;
  min-height: 220px;
  border: 0;
  resize: vertical;
  background: transparent;
  color: #333;
  font-size: 14px;
  line-height: 1.8;
  outline: none;
}
