/**
 * product-detail.css
 * 产品详情页（侧边栏右侧布局）专用样式
 * 构建时与 styles.css 一起复制到 public/
 */

/* ===================================
   详情页主布局
   =================================== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ===================================
   主内容区块
   =================================== */
.detail-main { min-width: 0; }

.detail-main h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark, #111827);
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary, #0066FF);
}
.detail-main h2:first-child { margin-top: 0; }

/* 产品图片 */
.detail-gallery { margin-bottom: 8px; }
.detail-main-img {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 4/3;
}
.detail-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 描述 */
.detail-desc { font-size: 15px; line-height: 1.8; color: #374151; }

/* 特点列表 */
.detail-features-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  background: #f9fafb;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.feature-check {
  color: #059669;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 参数表 */
.detail-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.detail-params-table tr:nth-child(odd) { background: #f9fafb; }
.detail-params-table th {
  width: 140px;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}
.detail-params-table td {
  padding: 10px 16px;
  color: #111827;
  border: 1px solid #e5e7eb;
}

/* 标签 */
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* 相关产品 */
.related-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.related-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.related-product-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f3f4f6;
}
.related-product-info { padding: 10px 12px; }
.related-product-info h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.related-product-info p  { font-size: 11px; color: #6b7280; }

/* ===================================
   右侧边栏
   =================================== */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sidebar-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #111827;
}
.sidebar-card p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* CTA 卡片 */
.sidebar-cta { background: linear-gradient(135deg, #0052cc, #0066ff); color: #fff; }
.sidebar-cta h3 { color: #fff; }
.sidebar-cta p  { color: rgba(255,255,255,.85); }
.btn-full { width: 100%; text-align: center; }
.mt-8 { margin-top: 8px; }

/* 规格速览 */
.sidebar-specs { display: flex; flex-direction: column; gap: 8px; }
.sidebar-spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 13px;
}
.spec-label { color: #6b7280; }
.spec-value { font-weight: 600; color: #111827; }

/* 产品列表 */
.sidebar-product-list { display: flex; flex-direction: column; gap: 8px; }
.sidebar-product-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  transition: background .15s;
  border: 1px solid transparent;
}
.sidebar-product-item:hover { background: #f3f4f6; }
.sidebar-product-item.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  font-weight: 600;
}
.sidebar-product-thumb {
  width: 44px;
  height: 33px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #e5e7eb;
}

/* 微信二维码 */
.sidebar-wechat { text-align: center; }
.sidebar-qr-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto 10px;
  display: block;
}

/* ===================================
   响应式
   =================================== */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr 280px; gap: 24px; }
  .related-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .detail-features-list { grid-template-columns: 1fr; }
  .related-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .related-products-grid { grid-template-columns: 1fr; }
}
