/* =========================================================
   EterQR — Product Detail Page (PD)
   设计依据：项目根 /DESIGN.md（从 eterqr-v54.css 反向提取的既有系统）
   原则：只写增量，不覆盖全局类；颜色全部走令牌
   ========================================================= */

/* 01. BREADCRUMB */
.pd-crumb{padding:calc(var(--header-h) + 20px) 0 0}
.pd-crumb ol{display:flex;flex-wrap:wrap;align-items:center;gap:0;list-style:none;margin:0;padding:0;font-size:12px;color:var(--muted)}
.pd-crumb li{display:flex;align-items:center}
.pd-crumb li+li::before{content:"/";margin:0 9px;color:#C3BDB4}
.pd-crumb a:hover{color:var(--ink)}
.pd-crumb li[aria-current]{color:var(--ink);font-weight:600}

/* 02. HERO / 购买区 */
.pd-hero{padding:22px 0 6px}
.pd-hero__grid{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:48px;align-items:start}

/* 图集：正方形主图 + 缩略图网格 */
.pd-gallery{min-width:0}
.pd-gallery__stage{
  margin:0;aspect-ratio:1/1;overflow:hidden;
  background:var(--ivory);border:1px solid var(--line-soft);border-radius:var(--radius-img);
}
.pd-gallery__stage img{width:100%;height:100%;object-fit:cover}
.pd-gallery__thumbs{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:10px;
  margin:12px 0 0;padding:0;list-style:none;
}
.pd-thumb{
  width:100%;aspect-ratio:1/1;padding:0;overflow:hidden;cursor:pointer;
  border:1px solid var(--line-soft);border-radius:var(--radius-ui);background:var(--ivory);
  transition:border-color .18s ease,box-shadow .18s ease;
}
.pd-thumb img{width:100%;height:100%;object-fit:cover}
.pd-thumb.is-active{border-color:var(--bronze);box-shadow:inset 0 0 0 1px var(--bronze)}
.pd-thumb:hover{border-color:#C0AE93}

/* 右栏信息 */
.pd-info{min-width:0}
.pd-info__label{margin:0 0 12px;color:#68716C;font-size:10px;font-weight:700;letter-spacing:.17em;text-transform:uppercase}
.pd-info__title{margin:0 0 16px;font-size:clamp(30px,3vw,42px);line-height:1.05}
.pd-price{display:flex;align-items:baseline;gap:12px;margin:0 0 20px}
.pd-price__now{font:600 30px/1 var(--serif);color:#171B18}
.pd-price__was{color:var(--muted);font-size:16px;text-decoration:line-through}

/* 02b. 规格选择（形状）：只切选中态，不换主图 */
.pd-shape{margin:0 0 18px}
.pd-shape__label{margin:0 0 9px;color:#68716C;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.pd-shape__opts{display:flex;flex-wrap:wrap;gap:10px}
.pd-shape__opt{
  display:inline-flex;align-items:center;gap:9px;padding:6px 14px 6px 6px;
  background:var(--white);border:1px solid var(--line-soft);border-radius:var(--radius-ui);
  font:600 13px/1 var(--sans);color:#4A544E;cursor:pointer;text-decoration:none;
  transition:border-color .18s ease,box-shadow .18s ease,color .18s ease;
}
.pd-shape__opt img{display:block;width:40px;height:40px;object-fit:cover;border-radius:calc(var(--radius-ui) - 2px)}
.pd-shape__opt:hover{border-color:#C0AE93}
.pd-shape__opt.is-active{border-color:var(--bronze);box-shadow:inset 0 0 0 1px var(--bronze);color:var(--ink)}

.pd-actions{display:flex;flex-wrap:wrap;gap:10px}
.pd-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-height:52px;padding:0 22px;border:1px solid transparent;border-radius:var(--radius-ui);
  font-size:15px;font-weight:600;line-height:1;cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}
.pd-btn--buy{flex:1 1 180px;background:var(--dark);color:var(--white)}
.pd-btn--buy:hover{background:#111815}
.pd-btn--amazon{flex:1 1 180px;background:#7a5c45;color:var(--white)}
.pd-btn--amazon:hover{background:#6A4E3B}
.pd-btn--sm{flex:0 0 auto;min-height:44px;padding:0 16px;font-size:14px}

.pd-note{margin:16px 0 0;padding:12px 14px;border-left:3px solid var(--bronze);background:var(--ivory);color:#555F59;font-size:13px;line-height:1.55}
.pd-note a{text-decoration:underline}

.pd-meta{display:flex;flex-wrap:wrap;margin:24px 0 0;padding:14px 0 0;list-style:none;border-top:1px solid var(--line-soft)}
.pd-meta li{position:relative;padding:0 14px;color:#606963;font-size:12.5px}
.pd-meta li:first-child{padding-left:0}
.pd-meta li+li::before{content:"";position:absolute;left:0;top:50%;width:1px;height:11px;margin-top:-6px;background:var(--line)}

/* 右栏五点 */
.pd-highlights{margin:12px 0 0;padding:22px 0 0;border-top:1px solid var(--line-soft)}
.pd-highlights__title{margin:0 0 5px;color:#68716C;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}

/* 03. RICH CONTENT 归一化
   content / descimg 多为外部平台复制而来（带 Amazon Ember 字体、rgb(15,17,17) 内联色），
   这里只统一「字族 / 颜色 / 字号」，不动 margin、display 等布局属性，避免破坏 A+ 自身排版 */
.pd-rich,.pd-rich *{font-family:var(--sans)!important;color:#4A544E!important}
.pd-rich p{font-size:15px!important;line-height:1.72!important}
.pd-rich li{font-size:15px!important;line-height:1.5!important}
.pd-rich strong,.pd-rich b{color:var(--ink)!important;font-weight:600!important}
.pd-rich h1,.pd-rich h2,.pd-rich h3,.pd-rich h4{font-family:var(--serif)!important;color:var(--ink)!important;font-weight:500!important}
.pd-rich img{max-width:100%!important;height:auto!important}
.pd-rich ul,.pd-rich ol{list-style:none!important;padding-left:0!important;margin-left:0!important}
.pd-rich li{position:relative;display:block;padding:9px 0 9px 19px!important;border-bottom:1px solid var(--line-soft)}
.pd-rich li:last-child{border-bottom:0}
.pd-rich li::before{content:"";position:absolute;left:0;top:17px;width:5px;height:5px;background:var(--bronze)}
.pd-rich a{text-decoration:underline}
.pd-rich:empty{display:none}

/* 04. A+ 图文区 */
.pd-section{padding:64px 0}
.pd-aplus{background:var(--paper)}
.pd-aplus .pd-rich img{margin-inline:auto}

/* 05. 通用能力模块（对应 common/pd_shared.html） */
.pd-shared{padding:64px 0}
.pd-shared--paper{background:var(--paper)}
.pd-shared--ivory{
  background:var(--ivory);
  border-top:1px solid rgba(32,38,34,.07);
  border-bottom:1px solid rgba(32,38,34,.07);
}
.pd-head{max-width:740px;margin:0 0 28px}
.pd-head h2{margin:0}

.pd-steps{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.pd-steps li{display:grid;grid-template-columns:46px 1fr;gap:14px;padding:20px 0;border-bottom:1px solid var(--line)}
.pd-steps__num{padding-top:4px;color:var(--bronze);font-size:11px;font-weight:700;letter-spacing:.1em}
.pd-steps h3{margin:0 0 5px;font-size:21px}
.pd-steps p{max-width:640px;margin:0;font-size:14px;line-height:1.6}

.pd-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 26px}
.pd-features>div{padding:14px 0;border-top:1px solid var(--line)}
.pd-features strong,.pd-features span{display:block}
.pd-features strong{font:500 17px/1.25 var(--serif);color:var(--ink)}
.pd-features span{margin-top:4px;color:var(--muted);font-size:13px;line-height:1.55}

.pd-trust{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 22px}
.pd-trust>div{padding:14px 0;border-top:1px solid var(--line)}
.pd-trust strong{display:block;margin-bottom:4px;font:500 17px/1.25 var(--serif);color:var(--ink)}
.pd-trust p{margin:0;font-size:13px;line-height:1.55}

/* 06. 移动端吸底购买条（仅 ≤768px 显示） */
.pd-sticky{display:none}

/* 07. RESPONSIVE */
@media (max-width:1024px){
  .pd-hero__grid{grid-template-columns:1fr;gap:30px}
  .pd-gallery{max-width:620px}
  .pd-features{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pd-trust{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:768px){
  .pd-crumb{padding-top:calc(var(--header-h) + 10px);font-size:11px}
  .pd-hero{padding-top:16px}
  .pd-gallery{max-width:none}
  .pd-gallery__thumbs{grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:8px}
  .pd-info__title{font-size:29px}
  .pd-price{margin-bottom:16px}
  .pd-price__now{font-size:26px}
  .pd-actions{gap:8px}
  .pd-btn{min-height:50px}
  .pd-meta{margin-top:18px;padding-top:12px}
  .pd-meta li{padding:0 10px;font-size:12px}
  .pd-highlights{margin-top:20px;padding-top:18px}
  .pd-rich p,.pd-rich li{font-size:14px!important}
  .pd-section,.pd-shared{padding:44px 0}
  .pd-head{margin-bottom:20px}
  .pd-steps li{grid-template-columns:38px 1fr;gap:11px;padding:16px 0}
  .pd-steps h3{font-size:19px}
  .pd-features,.pd-trust{grid-template-columns:1fr;gap:0}

  body.pd-body{padding-bottom:78px}
  .pd-sticky{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;
    align-items:center;justify-content:space-between;gap:12px;
    padding:10px 14px calc(10px + env(safe-area-inset-bottom));
    background:rgba(252,251,248,.97);border-top:1px solid var(--line);
    box-shadow:0 -8px 22px rgba(31,38,34,.09);
    -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  }
  .pd-sticky__info{min-width:0}
  .pd-sticky__info strong{display:block;font:600 18px/1.15 var(--serif);color:#171B18}
  .pd-sticky__info small{display:block;max-width:42vw;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
  .pd-sticky__actions{display:flex;flex:0 0 auto;gap:8px}
}

@media (max-width:380px){
  .pd-sticky__info small{display:none}
  .pd-btn--sm{padding:0 13px}
}
