/* 由 php/tools/build-assets.cjs 生成，请勿手改。
   改动样式请改 client/src 下对应的 .vue / .css 源文件后重新执行生成脚本。
   注意：这里按组件作用域重建了选择器（等价于 Vue 的 <style scoped>），
   对应 class 已经写在各模板的根元素上，挪动模板时不要漏掉。 */

/* ---- views/ProductDetail.vue  →  作用域 .page-product ---- */
.page-product .detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}

.page-product .gallery { display: flex; flex-direction: column; gap: 14px; }
.page-product .main {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-product .main-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.page-product .zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.page-product .main:hover .zoom-hint { opacity: 1; }

/* 全屏灯箱 */
.page-product .lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lbFade 0.18s ease;
}
.page-product .lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
  cursor: default;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
}
.page-product .lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.page-product .lb-close:hover { background: rgba(255, 255, 255, 0.28); }
.page-product .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.page-product .lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
.page-product .lb-prev { left: 22px; }
.page-product .lb-next { right: 22px; }
.page-product .lb-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 16px;
  border-radius: 20px;
}
@keyframes lbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.page-product .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
}
.page-product .thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}
.page-product .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #0f1b2b;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.page-product .thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.page-product .thumb:hover { transform: translateY(-1px); }
.page-product .thumb.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.page-product .thumb-video {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #14253a, #0f1b2b);
  color: rgba(255,255,255,0.85);
}

.page-product .model {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 14px;
  margin-bottom: 10px;
}
.page-product .title { font-size: 30px; margin-bottom: 14px; }
.page-product .summary { color: var(--ink); font-size: 16px; margin-bottom: 14px; }
.page-product .desc { color: var(--gray); font-size: 15px; margin-bottom: 22px; white-space: pre-line; line-height: 1.85; }
.page-product .feat-list { margin-bottom: 28px; }
.page-product .feat-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--gray);
}
.page-product .feat-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}
.page-product .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* 重点推荐区块（红色强调） */
.page-product .hl-block {
  margin-bottom: 56px;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff2f4 0%, #ffffff 55%);
  padding: 30px 34px 32px;
}
.page-product .hl-tag {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.page-product .hl-title {
  color: var(--brand);
  font-size: 27px;
  line-height: 1.3;
  margin-bottom: 14px;
}
.page-product .hl-text {
  color: var(--brand);
  font-size: 16px;
  line-height: 1.9;
  font-weight: 600;
  margin-bottom: 18px;
  white-space: pre-line;
}
.page-product .hl-points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
}
.page-product .hl-points li {
  color: var(--brand);
  font-size: 15px;
  line-height: 1.7;
  position: relative;
  padding-left: 18px;
}
.page-product .hl-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
@media (max-width: 720px) {
  .page-product .hl-block { padding: 22px 20px 24px; }
  .page-product .hl-title { font-size: 22px; }
  .page-product .hl-points { grid-template-columns: 1fr; }
}

/* 淘宝式详情长图区 */
.page-product .tb-detail { margin-bottom: 56px; }
.page-product .tb-detail h3 {
  font-size: 22px;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
}
.page-product .tb-images { display: flex; flex-direction: column; gap: 14px; }
.page-product .tb-img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  padding: 18px;
  cursor: zoom-in;
  transition: box-shadow 0.2s ease;
}
.page-product .tb-img:hover { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1); }
.page-product .tb-img img {
  display: block;
  width: 100%;
  height: auto;
}
/* 详情说明文字块（与图片依次排列） */
.page-product .tb-text {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
}
.page-product .tb-text h4 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
}
.page-product .tb-text-body {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-line;
}

.page-product .specs { margin-bottom: 56px; }
.page-product .specs h3, .page-product .related h3 {
  font-size: 22px;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
}
.page-product .specs .table th { width: 220px; }

.page-product .related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.page-product .r-card { display: block; }
.page-product .r-body { padding: 22px 24px; }
.page-product .r-body h4 { font-size: 16px; margin-top: 6px; }

@media (max-width: 900px) {
  .page-product .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .page-product .related-grid { grid-template-columns: 1fr; }
  .page-product .specs .table th { width: 140px; }
  .page-product .thumbs { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
