/* ============================================================
   HUAXIAIMAGING SHOP DETAIL V3 · 产品详情页
   · 复用 home v3 design tokens（--hx-gold / --hx-bg-* / --hx-line）
   · 仅写本页独有 class，公共组件（搜索栏 / footer / button）走 home-v3.css
   ============================================================ */

/* ---------- 主区 grid（左 60% 图 / 右 40% 信息） ---------- */
.pd-main {
  background: var(--hx-bg-0);
  padding: 36px 0 56px;
}
.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 960px) {
  .pd-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- LEFT · 图片画廊 ---------- */
.pd-gallery {
  position: static;
}
.pd-main-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--hx-bg-2);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-lg);
  overflow: hidden;
  transition: border-color .2s ease;
}
.pd-main-img:hover { border-color: var(--hx-line-strong); }
.pd-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--hx-line-strong);
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--hx-gold);
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.pd-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--hx-line);
  border-radius: 8px;
  color: var(--hx-text);
  cursor: pointer;
  opacity: 0;
  transition: all .2s ease;
  backdrop-filter: blur(4px);
}
.pd-main-img:hover .pd-zoom { opacity: 1; }
.pd-zoom:hover { border-color: var(--hx-gold); color: var(--hx-gold); }

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.pd-thumb {
  aspect-ratio: 1 / 1;
  background-color: var(--hx-bg-2);
  background-size: cover;
  background-position: center;
  background-image: attr(data-src url);
  border: 1px solid var(--hx-line);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: all .15s ease;
}
/* 注意：attr() 浏览器支持不均——所以下面 JS 直接设 background-image */
.pd-thumb { background-image: none; }
.pd-thumb:hover { border-color: var(--hx-line-strong); transform: translateY(-2px); }
.pd-thumb.active {
  border-color: var(--hx-gold);
  box-shadow: 0 0 0 2px rgba(227,188,22,0.18);
}

/* ---------- RIGHT · 产品信息 ---------- */
.pd-info { padding-top: 4px; }
.pd-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hx-gold);
  margin-bottom: 14px;
}
.pd-brand { color: var(--hx-gold); }
.pd-cat  { color: var(--hx-text-mute); }
.pd-cat em { font-style: normal; padding: 0 6px; opacity: 0.5; }

.pd-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--hx-text);
  margin: 0;
}

.pd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.pd-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--hx-bg-2);
  border: 1px solid var(--hx-line);
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: var(--hx-text-mute);
}
.pd-chip .lbl {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--hx-text-mute);
}
.pd-chip .val {
  color: var(--hx-text);
  font-family: 'Noto Sans SC', sans-serif;
}
.pd-chip.quote {
  background: rgba(227,188,22,0.08);
  border-color: var(--hx-line-strong);
  color: var(--hx-gold);
}
.pd-chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.5);
}
.pd-chip.stock-outofstock .dot { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.pd-chip.stock-onbackorder .dot { background: var(--hx-gold); box-shadow: 0 0 8px rgba(227,188,22,0.4); }

/* 关键属性 2 列 */
.pd-key-attrs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 24px;
  background: var(--hx-line);
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius);
  overflow: hidden;
}
.pd-ka {
  background: var(--hx-bg-2);
  padding: 14px 18px;
}
.ka-lbl {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hx-text-mute);
  margin-bottom: 6px;
}
.ka-val {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--hx-text);
  line-height: 1.4;
}

/* 装箱清单 */
.pd-box {
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--hx-bg-2);
  border: 1px solid var(--hx-line);
  border-left: 3px solid var(--hx-gold);
  border-radius: var(--hx-radius);
}
.pd-box-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hx-gold);
  margin-bottom: 10px;
}
.pd-box-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pd-box-list li {
  padding: 4px 10px;
  background: rgba(227,188,22,0.06);
  border: 1px solid var(--hx-line);
  border-radius: 6px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--hx-text);
}

/* 价格 + 询价 CTA */
.pd-price-row {
  margin-top: 28px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(227,188,22,0.06) 0%, rgba(184,154,17,0.02) 100%);
  border: 1px solid var(--hx-line-strong);
  border-radius: var(--hx-radius);
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  overflow: hidden;  /* FIX 2026-09-03: clip pill overflow at rounded corner */
}
.pd-price { flex: 1 1 0%; min-width: 0; max-width: 100%; }  /* FIX 2026-09-03: allow shrink below content */
.pd-price .num {
  display: block;
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--hx-gold);
  letter-spacing: -0.01em;
}
.pd-price .hint {
  display: block;
  margin-top: 4px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--hx-text-mute);
}

/* ---------- 变体 pill 选择器（is_standalone=1 + 父体 + 有变体 时显示） ---------- */
.pd-variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.pd-variant-label {
  width: 100%;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hx-text-mute);
  margin-bottom: 6px;
}
.pd-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--hx-bg-2);
  color: var(--hx-text);
  border: 1px solid var(--hx-line-strong);
  border-radius: 999px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s ease;
  user-select: none;
  white-space: normal;     /* FIX 2026-09-03: wrap long variant titles */
  word-break: break-word;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
}
.pd-pill:hover {
  border-color: var(--hx-gold);
  color: var(--hx-gold);
  background: rgba(227,188,22,0.06);
  transform: translateY(-1px);
}
.pd-pill[aria-pressed="true"] {
  background: var(--hx-grad-brand);
  color: var(--hx-bg-0);
  border-color: var(--hx-gold);
  font-weight: 700;
  box-shadow: 0 6px 18px -6px rgba(227,188,22,0.5);
}
.pd-pill[aria-pressed="true"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px rgba(227,188,22,0.6);
}
.pd-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pd-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--hx-grad-brand);
  color: var(--hx-bg-0);
  border-radius: 10px;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 8px 24px -8px rgba(227,188,22,0.4);
}
.pd-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(227,188,22,0.6); }
.pd-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--hx-line-strong);
  color: var(--hx-text);
  border-radius: 10px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.pd-btn-ghost:hover { background: rgba(255,255,255,0.04); color: var(--hx-gold); }
.pd-btn-ghost.faved {
  background: rgba(239,68,68,0.08);
  border-color: #ef4444;
  color: #ef4444;
}

/* 信任标识 3 件 */
.pd-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--hx-line);
}
.pd-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--hx-text-mute);
}
.pd-trust-item svg { color: var(--hx-gold); flex-shrink: 0; }

/* ---------- Tabs 区 ---------- */
.pd-tabs {
  background: var(--hx-bg-1);
  padding: 60px 0;
  border-top: 1px solid var(--hx-line);
}
.pd-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--hx-line);
  margin-bottom: 36px;
  overflow-x: auto;
  /* 防右侧垂直滚动条：CSS 规范规定 overflow-x != visible 时 overflow-y 会隐式变 auto，
     WebKit/Blink 在 flex 子元素 + border-bottom 下会出现 1px 垂直溢出 → 显示上下箭头 */
  overflow-y: hidden;
  align-items: center;
}
.pd-tab {
  position: relative;
  padding: 14px 24px;
  background: transparent;
  border: 0;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--hx-text-mute);
  cursor: pointer;
  transition: color .2s ease;
  white-space: nowrap;
}
.pd-tab:hover { color: var(--hx-text); }
.pd-tab.active { color: var(--hx-gold); font-weight: 700; }
.pd-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--hx-gold);
}

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

.pd-desc {
  max-width: 920px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(250,250,247,0.88);
}
.pd-desc p { margin: 0 0 14px; }
.pd-desc h1 {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--hx-gold);
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--hx-gold);
  line-height: 1.4;
}
.pd-desc h2 {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--hx-text);
  margin: 22px 0 10px;
}
.pd-desc h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; color: var(--hx-text); }
.pd-desc strong { color: var(--hx-gold); font-weight: 700; }
.pd-desc em { color: rgba(250,250,247,0.95); font-style: italic; }
.pd-desc code {
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  padding: 1px 6px;
  background: var(--hx-bg-3);
  border: 1px solid var(--hx-line);
  border-radius: 4px;
  color: var(--hx-gold);
}
.pd-desc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  background: var(--hx-bg-2);
  border: 1px solid var(--hx-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.pd-desc thead { background: var(--hx-bg-3); }
.pd-desc th {
  padding: 12px 14px;
  text-align: left;
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  color: var(--hx-gold);
  border-bottom: 1px solid var(--hx-line-strong);
  letter-spacing: 0.02em;
}
.pd-desc td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hx-line);
  color: var(--hx-text);
  vertical-align: top;
}
.pd-desc tbody tr:last-child td { border-bottom: 0; }
.pd-desc img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 14px auto;
  border-radius: 8px;
  border: 1px solid var(--hx-line);
}
.pd-desc.empty { color: var(--hx-text-mute); font-style: italic; }

.pd-spec-table {
  width: 100%;
  max-width: 920px;
  border-collapse: collapse;
  background: var(--hx-bg-2);
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius);
  overflow: hidden;
}
.pd-spec-table tr { border-bottom: 1px solid var(--hx-line); }
.pd-spec-table tr:last-child { border-bottom: 0; }
.pd-spec-table th,
.pd-spec-table td {
  padding: 14px 20px;
  text-align: left;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  vertical-align: top;
}
.pd-spec-table th {
  width: 200px;
  background: var(--hx-bg-3);
  color: var(--hx-gold);
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pd-spec-table td { color: var(--hx-text); }
@media (max-width: 600px) {
  .pd-spec-table th { width: 120px; padding: 12px 14px; }
  .pd-spec-table td { padding: 12px 14px; }
}

.pd-ship-list {
  max-width: 920px;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.pd-ship-list li {
  padding: 14px 20px;
  background: var(--hx-bg-2);
  border: 1px solid var(--hx-line);
  border-left: 3px solid var(--hx-gold);
  border-radius: 8px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(250,250,247,0.88);
}
.pd-ship-list strong {
  color: var(--hx-gold);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  margin-right: 4px;
}

/* ---------- 相关产品 ---------- */
.pd-related {
  background: var(--hx-bg-0);
  padding: 60px 0;
  border-top: 1px solid var(--hx-line);
}
.pd-rel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 960px) { .pd-rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pd-rel-grid { grid-template-columns: 1fr; } }
.pd-rel-grid .tb-card .img img {
  width: 100%; height: 100%; object-fit: contain; padding: 14%; background: var(--hx-bg-2);
}
.pd-rel-grid .tb-card .img { position: relative; aspect-ratio: 1/1; background: var(--hx-bg-2); overflow: hidden; }
.pd-rel-grid .tb-card .img-art {
  position: absolute; inset: 18%; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--c1, #e3bc16), var(--c2, #b89a11) 70%, transparent);
  filter: blur(8px); opacity: 0.55;
}

/* ---------- CTA · 微信二维码卡（替换原 WECHAT WORK + EMAIL 卡） ---------- */
.pd-qr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .pd-qr-row { grid-template-columns: 1fr; }
}
.pd-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 12px 16px;
  background: var(--hx-bg-3);
  border: 1px solid var(--hx-line);
  border-radius: 12px;
  gap: 10px;
}
.pd-qr-card .lbl {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hx-gold);
}
.pd-qr-card img {
  display: block;
  width: 100%;
  max-width: 148px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--hx-line);
}
