/* [二开] 商品详情页版式层
   按 xiaoguo_html/good.html 存档实测值复刻：
   容器 1024px / 左画廊 539x630（缩略 73 + 主图 446）/ 右购买栏 339px / 列间距 114px
   主色 #571dae，促销红 #ff274d，灰底 #ededed，文字 #161615
   仅在商品详情页生效（全部选择器限定在 .gpd-page 内） */
.gpd-page {
  --gpd-brand: #571dae;
  --gpd-red: #ff274d;
  --gpd-ink: #161615;
  --gpd-grey: #ededed;
  --gpd-line: #d1d1d2;
  --gpd-muted: #545454;
  color: var(--gpd-ink);
  background: #fff;
  font-size: 14px;
  line-height: 21px;
}
.gpd-page a { color: var(--gpd-brand); }
.gpd-page button { font-family: inherit; }

/* ---------- 面包屑：全宽 1400 容器 ---------- */
.gpd-crumb-wrap { max-width: 1400px; margin: 0 auto; padding: 8px 0 10px; }
.gpd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 21px; }
.gpd-crumbs li:not(:last-child)::after { content: "/"; margin: 0 6px; color: var(--gpd-muted); }
.gpd-crumbs a { color: var(--gpd-ink); text-decoration: underline; }

/* ---------- 主体：1024 居中 ---------- */
.gpd-wrap { width: 1024px; max-width: 100%; margin: 0 auto; padding: 0 16px 30px; box-sizing: border-box; }
.gpd-layout { display: flex; align-items: flex-start; }
.gpd-media { flex: 0 0 539px; width: 539px; margin-right: 114px; }
.gpd-buy { flex: 0 0 339px; width: 339px; min-width: 0; }

/* ---------- 左：画廊 ---------- */
.gpd-gallery { display: flex; width: 539px; height: 630px; }
.gpd-thumbs { display: flex; flex-direction: column; flex: 0 0 73px; width: 73px; height: 630px; margin-right: 20px; }
.gpd-thumb-nav { display: flex; align-items: center; justify-content: center; height: 16px; flex: 0 0 16px; padding: 0; border: 0; background: none; color: var(--gpd-muted); font-size: 11px; cursor: pointer; }
.gpd-thumb-nav:hover { color: var(--gpd-brand); }
.gpd-thumb-nav.is-disabled { opacity: .35; cursor: default; }
.gpd-thumb-list { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 8px; }
.gpd-thumb { position: relative; display: block; width: 100%; min-height: 0; padding: 0; border: 1px solid transparent; background: var(--gpd-grey); cursor: pointer; overflow: hidden; }
.gpd-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gpd-thumb.is-active { border: 2px solid var(--gpd-brand); }
.gpd-thumb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(22, 22, 21, .45); color: #fff; font-size: 16px; }
.gpd-stage { position: relative; flex: 0 0 446px; width: 446px; height: 630px; background: var(--gpd-grey); overflow: hidden; }
.gpd-stage > img#gpd-main { display: block; width: 100%; height: 100%; object-fit: contain; }
.gpd-badge { position: absolute; top: 30px; left: 0; z-index: 2; display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px 0 14px; border-radius: 0 15px 15px 0; background: var(--gpd-brand); color: #fff !important; font-size: 14px; font-weight: 700; white-space: nowrap; }
.gpd-badge i { font-size: 10px; }
.gpd-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 44px; padding: 0; border: 0; background: rgba(255, 255, 255, .72); color: var(--gpd-ink); font-size: 15px; cursor: pointer; }
.gpd-arrow.is-prev { left: 0; border-radius: 0 4px 4px 0; }
.gpd-arrow.is-next { right: 0; border-radius: 4px 0 0 4px; }
.gpd-arrow:hover { background: #fff; }
.gpd-dots { position: absolute; bottom: 12px; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.gpd-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(22, 22, 21, .25); cursor: pointer; }
.gpd-dot.is-active { background: var(--gpd-brand); }

/* ---------- 右：标题 / 促销 / 价格 ---------- */
.gpd-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-bottom: 12px; }
.gpd-title h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; line-height: 23px; color: var(--gpd-ink); }
.gpd-wish-form { flex: 0 0 20px; margin: 0; }
.gpd-heart { width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--gpd-ink); font-size: 18px; cursor: pointer; }
.gpd-heart:hover, .gpd-heart.is-saved { color: var(--gpd-brand); }
.gpd-promo { height: 14px; color: var(--gpd-brand) !important; font-size: 14px; font-weight: 700; line-height: 14px; }
.gpd-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; }
.gpd-price-main { min-width: 0; }
.gpd-price-row { display: flex; align-items: baseline; gap: 10px; }
.gpd-price-now { color: var(--gpd-red) !important; font-size: 24px; font-weight: 700; line-height: 24px; white-space: nowrap; }
.gpd-price-was { color: var(--gpd-muted) !important; font-size: 16px; line-height: 24px; text-decoration: line-through; white-space: nowrap; }
.gpd-price-save { display: block; width: 100%; font-size: 12px; line-height: 18px; color: var(--gpd-ink); }
.gpd-price-reviews { flex: 0 0 auto; color: var(--gpd-brand) !important; font-size: 14px; white-space: nowrap; }
.gpd-restock { padding-bottom: 12px; color: var(--gpd-brand) !important; font-size: 12px; font-weight: 700; }

/* ---------- 加购 ---------- */
.gpd-actions { margin: 0; }
.gpd-qty { display: inline-flex; align-items: center; width: 104px; height: 32px; margin-bottom: 8px; border: 1px solid var(--gpd-line); border-radius: 4px; overflow: hidden; }
.gpd-qty button { width: 30px; height: 30px; padding: 0; border: 0; background: #fff; color: var(--gpd-ink); font-size: 11px; cursor: pointer; }
.gpd-qty button:hover { background: var(--gpd-grey); }
.gpd-qty input { flex: 1; width: 44px; height: 30px; padding: 0; border: 0; border-left: 1px solid var(--gpd-line); border-right: 1px solid var(--gpd-line); text-align: center; font-size: 13px; color: var(--gpd-ink); background: #fff; }
.gpd-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 62px; padding: 8px 24px; border: 1px solid var(--gpd-brand); border-radius: 25px; background: var(--gpd-brand); color: #fff !important; font-size: 18px; font-weight: 700; line-height: 22px; cursor: pointer; transition: background .2s ease; }
.gpd-add span { font-size: 12px; font-weight: 400; line-height: 16px; }
.gpd-add:hover { background: #471291; }
.gpd-add.is-loading { opacity: .7; pointer-events: none; }
.gpd-error { margin-top: 6px; font-size: 12px; color: var(--gpd-red); }

/* ---------- 规格面板（默认收起） ---------- */
.gpd-options { margin: 12px 0 0; border-top: 1px solid var(--gpd-line); border-bottom: 1px solid var(--gpd-line); }
.gpd-options > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--gpd-brand); font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.gpd-options > summary::-webkit-details-marker { display: none; }
.gpd-options[open] > summary i { transform: rotate(180deg); }
.gpd-options-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 0 0 16px; max-height: 420px; overflow-y: auto; }
.gpd-opt { min-width: 0; font-size: 12px; }
.gpd-opt label { display: block; margin-bottom: 4px; font-weight: 700; color: var(--gpd-ink); }
.gpd-opt.is-required > label::after { content: " *"; color: var(--gpd-red); }
.gpd-opt .form-control, .gpd-opt .form-select { width: 100%; min-height: 30px; padding: 4px 8px; border: 1px solid var(--gpd-line); border-radius: 4px; font-size: 12px; background: #fff; color: var(--gpd-ink); }
.gpd-opt-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.gpd-opt-choice { display: inline-flex !important; align-items: center; gap: 4px; margin: 0 0 4px !important; padding: 4px 6px; border: 1px solid var(--gpd-line); border-radius: 4px; font-weight: 400 !important; cursor: pointer; }
.gpd-opt-choice input { margin: 0; }
.gpd-opt-choice img { width: 22px; height: 22px; object-fit: cover; }
.gpd-opt-upload { padding: 5px 10px; border: 1px solid var(--gpd-line); border-radius: 4px; background: #fff; font-size: 12px; cursor: pointer; }
.gpd-opt .invalid-feedback { display: none; font-size: 11px; color: var(--gpd-red); }
.gpd-opt .invalid-feedback.d-block { display: block; }
.gpd-option-hint { display: none; margin-top: 8px; padding: 8px 10px; border-radius: 4px; background: #fff4f6; color: var(--gpd-red); font-size: 12px; }
.gpd-option-hint.is-visible { display: block; }

/* ---------- USP 灰条 ---------- */
.gpd-usps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 93px; margin: 10px 0; padding: 5px 0; background: var(--gpd-grey); border-radius: 4px; box-sizing: border-box; }
.gpd-usp { display: flex; align-items: center; gap: 12px; padding: 5px 8px; min-width: 0; }
.gpd-usp + .gpd-usp { border-left: 1px solid #d8d8d8; }
.gpd-usp-icon { flex: 0 0 34px; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.gpd-usp-icon.is-box { border: 2px solid var(--gpd-brand); color: var(--gpd-brand); border-radius: 6px; }
.gpd-usp-icon.is-heart { color: var(--gpd-red); background: #fff; }
.gpd-usp-text { font-size: 13px; line-height: 19px; color: var(--gpd-ink); }

/* ---------- 评价引用卡 ---------- */
.gpd-quote { margin-bottom: 14px; padding: 14px; background: var(--gpd-grey); }
.gpd-quote-stars { display: flex; align-items: center; gap: 8px; height: 21px; }
.gpd-quote-stars span { font-size: 12px; color: var(--gpd-ink); }
.gpd-quote p { margin: 14px 0; font-size: 14px; line-height: 21px; color: var(--gpd-ink); }
.gpd-quote > a { font-size: 14px; text-decoration: underline; }

/* ---------- 星级（紫色） ---------- */
.gpd-stars { display: inline-flex; align-items: center; gap: 1px; color: var(--gpd-brand); font-size: 14px; line-height: 1; }
.gpd-quote .gpd-stars { font-size: 17px; }

/* ---------- 分期折叠 ---------- */
.gpd-finance { padding: 4px 0 12px; text-align: center; border-bottom: 1px solid var(--gpd-line); }
.gpd-finance > summary { display: inline-flex; align-items: center; gap: 4px; color: var(--gpd-brand); font-size: 14px; text-decoration: underline; cursor: pointer; list-style: none; }
.gpd-finance > summary::-webkit-details-marker { display: none; }
.gpd-finance[open] > summary i { transform: rotate(180deg); }
.gpd-finance-body { padding: 12px 0 2px; font-size: 13px; }
.gpd-finance-body p { margin: 0 0 8px; }
.gpd-finance-body a { text-decoration: underline; }

/* ---------- 描述手风琴 ---------- */
.gpd-tabs { padding-top: 16px; }
.gpd-tab { border-bottom: 1px solid var(--gpd-line); padding: 0 16px; }
.gpd-tab-title { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 22px; padding: 16px 0; border: 0; background: none; color: var(--gpd-brand) !important; font-size: 16px; line-height: 22px; text-align: left; cursor: pointer; }
.gpd-tab-title::after { content: "+"; font-size: 18px; font-weight: 400; }
.gpd-tab.is-open .gpd-tab-title::after { content: "\2212"; }
.gpd-tab:hover .gpd-tab-title { color: var(--gpd-ink) !important; }
.gpd-tab-body { display: none; margin: 15px 0 30px; font-size: 16px; line-height: 24px; color: var(--gpd-ink); }
.gpd-tab.is-open .gpd-tab-body { display: block; }
.gpd-feature-list { margin: 0; padding-left: 20px; list-style: disc; }
.gpd-feature-list li { margin-bottom: 20px; padding-left: 10px; }
.gpd-rich p, .gpd-rich div { font-size: 16px; line-height: 24px; }
.gpd-rich img { max-width: 100%; height: auto; }
.gpd-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gpd-video { display: block; text-align: center; font-size: 13px; }
.gpd-video-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--gpd-grey); color: var(--gpd-brand); font-size: 24px; margin-bottom: 6px; }
.gpd-spec-group { margin-bottom: 16px; }
.gpd-spec-group h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.gpd-spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--gpd-line); font-size: 13px; line-height: 20px; }

/* ---------- 配送倒计时 ---------- */
.gpd-countdown { margin: 12px 0; font-size: 12px; line-height: 20px; }
.gpd-countdown-title { font-weight: 700; }
.gpd-countdown-line strong { font-weight: 700; }
.gpd-timer { display: inline-block; margin-left: 4px; padding: 1px 10px; border-radius: 999px; background: #ffc93c; color: var(--gpd-ink) !important; font-size: 11px; font-weight: 700; }

/* ---------- 相关分类胶囊 ---------- */
.gpd-crosslinks { padding: 12px 0 30px; }
.gpd-crosslinks h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.gpd-crosslink-list { display: flex; flex-wrap: wrap; }
.gpd-crosslink { display: inline-flex; align-items: center; gap: 10px; margin: 16px 16px 0 0; padding: 8px 12px; border-radius: 4px; background: var(--gpd-grey); color: var(--gpd-ink) !important; font-size: 14px; text-decoration: none; }
.gpd-crosslink:hover { background: #e0e0e0; }
.gpd-crosslink i { font-size: 9px; }

/* ---------- 通栏推荐位 ---------- */
.gpd-recs { max-width: 1400px; margin: 0 auto 30px; padding: 0 20px; }
.gpd-recs-title { margin: 24px 0 18px; font-size: 30px; font-weight: 700; line-height: 40px; color: var(--gpd-ink); }
.gpd-rec-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.gpd-rec-card { min-width: 0; background: #fff; border: 1px solid #ececec; }
.gpd-rec-img { display: block; aspect-ratio: 3 / 4; background: var(--gpd-grey); overflow: hidden; }
.gpd-rec-img img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 8px; box-sizing: border-box; }
.gpd-rec-info { padding: 8px 10px 12px; }
.gpd-rec-reviews { display: block; font-size: 11px; text-decoration: underline; }
.gpd-rec-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 32px; margin: 4px 0 6px; color: var(--gpd-ink) !important; font-size: 13px; line-height: 16px; text-decoration: none; }
.gpd-rec-price { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.gpd-rec-price > span { color: var(--gpd-red) !important; font-weight: 700; }
.gpd-rec-price s { color: var(--gpd-muted); font-size: 12px; }
.gpd-rec-price i { margin-left: auto; color: var(--gpd-ink); font-size: 13px; }
.gpd-rec-save { margin-top: 3px; font-size: 11px; color: var(--gpd-ink); }

/* ---------- 顾客评价区 ---------- */
.gpd-reviews { max-width: 992px; margin: 0 auto; padding: 30px 16px 90px; }
.gpd-rv-title { margin: 0 0 30px; font-size: 30px; font-weight: 700; line-height: 40px; color: var(--gpd-ink); }
.gpd-rv-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 60px; align-items: start; }
.gpd-rv-score-head { display: flex; align-items: baseline; gap: 12px; }
.gpd-rv-score-num { color: var(--gpd-brand) !important; font-size: 56px; font-weight: 700; line-height: 1; }
.gpd-rv-score .gpd-stars { font-size: 20px; }
.gpd-rv-count { display: block; margin-top: 8px; font-size: 14px; color: var(--gpd-muted); }
.gpd-rv-dist-row { display: grid; grid-template-columns: 44px 1fr 42px; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--gpd-brand); }
.gpd-rv-dist-row > span:last-child { color: var(--gpd-muted); text-align: right; }
.gpd-rv-dist-bar { height: 8px; border-radius: 999px; background: var(--gpd-grey); overflow: hidden; }
.gpd-rv-dist-bar i { display: block; height: 100%; border-radius: 999px; background: var(--gpd-brand); }
.gpd-rv-write { grid-column: 1 / -1; justify-self: center; padding: 12px 30px; border: 0; border-radius: 999px; background: var(--gpd-brand); color: #fff !important; font-size: 14px; font-weight: 700; cursor: pointer; }
.gpd-rv-write:hover { background: #471291; }
.gpd-rv-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin: 46px 0; text-align: center; }
.gpd-rv-metric strong, .gpd-rv-attr strong { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--gpd-ink); }
.gpd-rv-metric > span { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; }
.gpd-rv-metric-track { position: relative; height: 6px; border-radius: 999px; background: var(--gpd-grey); }
.gpd-rv-metric-track i { position: relative; display: block; height: 100%; border-radius: 999px; background: var(--gpd-brand); }
.gpd-rv-metric-track i::after { content: ""; position: absolute; top: 50%; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gpd-brand); transform: translateY(-50%); }
.gpd-rv-ai { max-width: 760px; margin: 0 auto; padding-bottom: 26px; border-bottom: 1px solid var(--gpd-line); }
.gpd-rv-ai h3 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.gpd-rv-ai-note { margin: 0 0 10px; font-size: 12px; color: var(--gpd-muted) !important; }
.gpd-rv-ai > p:not(.gpd-rv-ai-note) { margin: 0 0 16px; font-size: 14px; line-height: 21px; }
.gpd-rv-topic { display: inline-block; padding: 8px 20px; border: 1px solid var(--gpd-brand); border-radius: 999px; font-size: 14px; text-decoration: none; }
.gpd-rv-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 10px; }
.gpd-rv-search { display: inline-flex; align-items: center; gap: 6px; width: 190px; padding: 6px 10px; border: 1px solid var(--gpd-line); border-radius: 999px; color: var(--gpd-muted); }
.gpd-rv-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; }
.gpd-rv-sort { font-size: 13px; color: var(--gpd-muted); }
.gpd-rv-sort strong { color: var(--gpd-ink); }
.gpd-rv-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 32px 0; border-bottom: 1px solid var(--gpd-line); }
.gpd-rv-head { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.gpd-rv-author { font-weight: 400; color: var(--gpd-ink); }
.gpd-rv-date { font-size: 13px; color: var(--gpd-ink); }
.gpd-rv-body { min-width: 0; }
.gpd-rv-rating { margin-bottom: 8px; }
.gpd-rv-body h4 { margin: 0 0 8px; font-size: 15px; font-weight: 400; }
.gpd-rv-body > p { margin: 0 0 16px; font-size: 14px; line-height: 21px; }
.gpd-rv-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 30px; margin-bottom: 18px; }
.gpd-rv-attr { min-width: 0; }
.gpd-rv-attr strong { margin-bottom: 4px; font-size: 12px; }
.gpd-rv-pros, .gpd-rv-cons { margin-bottom: 8px; font-size: 13px; }
.gpd-rv-pros strong, .gpd-rv-cons strong { display: block; font-size: 12px; font-weight: 700; }
.gpd-rv-pros p, .gpd-rv-cons p { margin: 2px 0 0; color: var(--gpd-muted); }
.gpd-rv-more { display: inline-block; margin-top: 6px; color: var(--gpd-brand) !important; font-size: 13px; font-weight: 700; }
.gpd-rv-helpful { grid-column: 2; justify-self: end; margin-top: -10px; font-size: 12px; color: var(--gpd-muted); }
.gpd-rv-helpful i { margin-left: 8px; }
.gpd-native-review { margin-top: 24px; border: 1px solid var(--gpd-line); border-radius: 6px; padding: 0 16px; }
.gpd-native-review > summary { padding: 14px 0; color: var(--gpd-brand); font-size: 14px; font-weight: 700; cursor: pointer; }
.gpd-native-review-body { padding-bottom: 20px; }
.gpd-native-review-body #form-review h2 { font-size: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .gpd-wrap { width: 100%; }
  .gpd-layout { flex-wrap: wrap; }
  .gpd-media { flex: 1 1 100%; width: 100%; margin-right: 0; }
  .gpd-gallery { width: 100%; max-width: 620px; margin: 0 auto 24px; }
  .gpd-stage { flex: 1 1 auto; width: auto; }
  .gpd-buy { flex: 1 1 100%; width: 100%; max-width: 620px; margin: 0 auto; }
  .gpd-rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .gpd-crumb-wrap { padding: 8px 16px; }
  .gpd-wrap { padding: 0 12px 24px; }
  .gpd-gallery { height: 420px; }
  .gpd-thumbs { flex: 0 0 48px; width: 48px; height: 420px; margin-right: 10px; }
  .gpd-thumb-list { gap: 4px; }
  .gpd-stage { height: 420px; }
  .gpd-badge { top: 12px; }
  .gpd-options-body { grid-template-columns: 1fr; }
  .gpd-recs { padding: 0 12px; }
  .gpd-recs-title { font-size: 22px; line-height: 30px; }
  .gpd-rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gpd-reviews { padding: 24px 12px 60px; }
  .gpd-rv-title { font-size: 22px; }
  .gpd-rv-summary { grid-template-columns: 1fr; gap: 20px; }
  .gpd-rv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .gpd-rv-card { grid-template-columns: 1fr; gap: 12px; }
  .gpd-rv-helpful { grid-column: 1; justify-self: start; }
}
