/* gm.cx 购物车 · wb 商品配置器
 * 作用域严格限定在 .wb-goods，所有设计令牌（--wb-*）只定义在 .wb-goods 上，
 * 不污染购物车 Vue 壳（.el-* / .main-*）的 Element UI 变量。
 * 视觉语言对齐 web/wb/goods.html（teal 品牌色 + 卡片分区 + 粘性订单摘要）。 */

.wb-goods {
  /* === 设计令牌（与 web/wb/style.css 一致，teal 品牌色 #00C29A） === */
  --wb-ink:        #1A1A1A;
  --wb-ink-2:      #191A23;
  --wb-ink-3:      #4C4F6B;
  --wb-ink-4:      #646464;
  --wb-ink-5:      #A1A1A1;
  --wb-ink-6:      #BFBFBF;

  --wb-line:       #E5E5E5;
  --wb-line-soft:  #EFEFEF;
  --wb-line-strong:#8A8A8A;
  --wb-bg:         #FFFFFF;
  --wb-bg-soft:    #FAFAFA;
  --wb-bg-pill:    #F7F8F9;

  --wb-brand:      #00C29A;
  --wb-brand-2:    #009273;
  --wb-brand-tint: rgba(0, 194, 154, .10);
  --wb-brand-line: rgba(0, 194, 154, .28);
  --wb-brand-ink:  #0E7C63;
  --wb-brand-ink-hover: #0A5F4C;
  --wb-band:       #F3F9F6;
  --wb-ok:         #2BA471;

  --wb-r-xs: 4px;  --wb-r-sm: 6px;  --wb-r-md: 8px;
  --wb-r-lg: 12px; --wb-r-xl: 16px; --wb-r-2xl: 20px; --wb-r-pill: 999px;

  --wb-sh-xs: 0 1px 2px rgba(26, 26, 26, .05);
  --wb-sh-sm: 0 4px 12px rgba(26, 26, 26, .08);
  --wb-sh-md: 0 8px 24px rgba(0, 0, 0, .14);

  --wb-font: "PingFang SC", "Microsoft YaHei", -apple-system,
             BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --wb-container: 1440px;
  --wb-gutter: 24px;
  --wb-header-h: 65px;
  --wb-ease: cubic-bezier(.4, 0, .2, 1);
  --wb-dur: .3s;
  --wb-glow-a: #DAF6FF;
  --wb-glow-b: #E8FFF4;

  padding-top: 8px;
  font-family: var(--wb-font);
  color: var(--wb-ink);
  line-height: 1.5;
  /* ★ 隔离购物车壳（clientarea wb 主题）给祖先设的超大全站字号：
     必须显式声明，否则 .wb-prose 等未单独设字号的元素会继承成 ~71px */
  font-size: 15px;
}
.wb-goods *,
.wb-goods *::before,
.wb-goods *::after { box-sizing: border-box; }

/* 容器限宽（嵌在购物车壳的 el-main 内，用更小 gutter） */
.wb-container {
  width: 100%;
  max-width: var(--wb-container);
  margin: 0 auto;
  padding: 0 var(--wb-gutter);
}

/* 区块标题 */
.wb-h3 { font-size: 28px; line-height: 1.55; font-weight: 300; color: var(--wb-ink); }

/* 区块眉标 */
.wb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 14px; border-radius: var(--wb-r-pill);
  background: var(--wb-bg-pill); font-size: 13px; font-weight: 400; color: var(--wb-ink-4);
  white-space: nowrap;
}
.wb-eyebrow b { font-weight: 500; color: var(--wb-ink-2); }
.wb-eyebrow span { color: var(--wb-ink-5); font-size: 12px; letter-spacing: .04em; }

/* 按钮 */
.wb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 10px 20px; border-radius: var(--wb-r-pill);
  font-size: 13.5px; font-weight: 500; line-height: 20px; white-space: nowrap;
  border: 0; cursor: pointer;
  transition: background var(--wb-dur) var(--wb-ease),
              color var(--wb-dur) var(--wb-ease),
              box-shadow var(--wb-dur) var(--wb-ease),
              transform var(--wb-dur) var(--wb-ease);
}
.wb-btn:active { transform: scale(.975); }
.wb-btn--brand { background: var(--wb-brand); color: #fff; }
.wb-btn--brand:hover { background: var(--wb-brand-2); }
.wb-btn--ghost { background: transparent; color: var(--wb-ink); box-shadow: inset 0 0 0 1px var(--wb-line); }
.wb-btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--wb-ink); }
.wb-btn--lg { height: 48px; padding: 13px 28px; font-size: 15px; }
.wb-btn--block { width: 100%; }
.wb-mt-2 { margin-top: 20px; }

/* 徽章 */
.wb-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px;
  border-radius: var(--wb-r-pill); font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.wb-badge--brand { background: var(--wb-brand-tint); color: var(--wb-brand-ink); }
.wb-badge--ok    { background: rgba(43, 164, 113, .12); color: #1E7E57; }
.wb-badge--warn  { background: rgba(250, 149, 80, .13); color: #B4611F; }
.wb-badge--err   { background: rgba(213, 73, 65, .11); color: #B0342D; }
.wb-badge--mute  { background: var(--wb-bg-pill); color: var(--wb-ink-4); }
.wb-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* =================== 商品详情主体 =================== */
.wb-goods__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: start;
  margin-top: 8px;
}
.wb-goods__main { min-width: 0; }

.wb-goods__title {
  margin-top: 14px; font-size: 34px; line-height: 1.25; font-weight: 400;
  letter-spacing: -.015em; color: var(--wb-ink);
}
.wb-goods__sub { margin-top: 10px; font-size: 15.5px; line-height: 1.7; font-weight: 300; color: var(--wb-ink-3); }
.wb-goods__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* 关键规格条 */
.wb-goods__specs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-top: 22px; padding: 20px;
  border: 1px solid var(--wb-line); border-radius: var(--wb-r-xl); background: var(--wb-bg-soft);
}
.wb-goods__specs li { display: flex; flex-direction: column; gap: 2px; }
.wb-goods__specs b { font-size: 22px; font-weight: 500; line-height: 1.1; letter-spacing: -.01em; color: var(--wb-ink); }
.wb-goods__specs span { font-size: 12.5px; font-weight: 300; color: var(--wb-ink-4); }

/* 图廊（占位，不编造假图） */
.wb-goods__gallery {
  position: relative; margin-top: 22px; padding: 32px;
  border: 1px solid var(--wb-line); border-radius: var(--wb-r-xl);
  background:
    radial-gradient(120% 120% at 12% 0%, var(--wb-glow-b) 0%, transparent 52%),
    radial-gradient(120% 120% at 100% 100%, var(--wb-glow-a) 0%, transparent 50%),
    var(--wb-bg);
  overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 260px;
}
.wb-goods__gallery svg { width: 200px; height: auto; opacity: .92; }
.wb-goods__gallery .wb-goods__ph {
  position: absolute; left: 20px; bottom: 16px;
  font-size: 12px; color: var(--wb-ink-4); font-weight: 300;
}

/* 配置器 */
.wb-config { margin-top: 28px; }
.wb-config > .wb-h3 { margin-bottom: 4px; }
.wb-config__group { padding: 20px 0; border-top: 1px solid var(--wb-line-soft); }
.wb-config__group:first-of-type { border-top: 0; padding-top: 8px; }
.wb-config__empty {
  margin: 0; padding: 16px 18px; border: 1px dashed var(--wb-line-soft); border-radius: 10px;
  font-size: 14px; font-weight: 300; line-height: 1.7; color: var(--wb-ink-4); background: var(--wb-bg-soft);
}
.wb-config__label {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--wb-ink); margin-bottom: 14px;
}
.wb-config__label em { font-style: normal; color: var(--wb-brand-2); }
.wb-config__label .wb-config__hint { font-size: 12.5px; font-weight: 300; color: var(--wb-ink-5); }
.wb-config__opts { display: flex; flex-wrap: wrap; gap: 10px; }

.wb-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-width: 168px; padding: 12px 16px;
  border: 1px solid var(--wb-line); border-radius: var(--wb-r-lg);
  background: var(--wb-bg); cursor: pointer;
  transition: border-color var(--wb-dur) var(--wb-ease),
              box-shadow var(--wb-dur) var(--wb-ease),
              background var(--wb-dur) var(--wb-ease);
}
.wb-opt:hover { border-color: var(--wb-brand-line); box-shadow: var(--wb-sh-xs); }
.wb-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wb-opt:focus-within { box-shadow: 0 0 0 3px var(--wb-brand-tint); }
.wb-opt.is-checked { border-color: var(--wb-brand); background: var(--wb-brand-tint); box-shadow: 0 0 0 1px var(--wb-brand); }
.wb-opt__main { font-size: 14px; font-weight: 400; color: var(--wb-ink); line-height: 1.4; }
.wb-opt__price { font-size: 12.5px; font-weight: 500; color: var(--wb-brand-ink); white-space: nowrap; }
.wb-opt__price.is-free { color: var(--wb-ink-4); }
.wb-opt__setup { font-weight: 400; color: var(--wb-ink-5); }
.wb-opt.is-checked .wb-opt__check {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--wb-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px;
}

.wb-select {
  width: 100%; max-width: 420px; height: 44px; padding: 0 14px;
  border: 1px solid var(--wb-line-strong); border-radius: var(--wb-r-md);
  background: var(--wb-bg); color: var(--wb-ink); font-size: 14px; cursor: pointer;
  transition: border-color var(--wb-dur) var(--wb-ease), box-shadow var(--wb-dur) var(--wb-ease);
}
.wb-select:focus { outline: none; border-color: var(--wb-brand); box-shadow: 0 0 0 3px var(--wb-brand-tint); }

/* 选项卡 */
.wb-goods__tabs { margin-top: 36px; }
.wb-goods__tabbar { margin-bottom: 18px; }
.wb-tabpanel { display: none; }
.wb-tabpanel.is-active { display: block; }
.wb-tabpanel .wb-prose { max-width: 100%; margin: 0; }
.wb-spec-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.wb-spec-table th, .wb-spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--wb-line-soft); font-size: 14px; }
.wb-spec-table th { font-weight: 500; color: var(--wb-ink-3); width: 200px; background: var(--wb-bg-soft); }
.wb-spec-table td { font-weight: 300; color: var(--wb-ink); }

/* 正文排版（产品介绍）：在购物车壳内填满左主区，不做 760 窄限宽 */
.wb-prose { max-width: 100%; margin: 0; font-size: 15px; line-height: 1.9; font-weight: 300; color: var(--wb-ink-4); }
.wb-prose p { margin: 0 0 16px; font-size: 15px; line-height: 1.9; font-weight: 300; color: var(--wb-ink-4); }

/* 常见问题 */
.wb-faq__item { border-bottom: 1px solid var(--wb-line); }
.wb-faq__item:last-child { border-bottom: 0; }
.wb-faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 2px; font-size: 17px; font-weight: 600; color: var(--wb-ink); cursor: pointer;
  list-style: none;
}
.wb-faq__q::-webkit-details-marker { display: none; }
.wb-faq__item[open] .wb-faq__q { color: var(--wb-brand-ink); }
.wb-faq__a { padding: 0 2px 16px; margin: 0; max-width: 720px; font-size: 15px; line-height: 1.75; color: var(--wb-ink-3); }

/* 右侧：粘性订单摘要 */
.wb-goods__aside { position: sticky; top: calc(var(--wb-header-h) + 16px); }
.wb-summary {
  border: 1px solid var(--wb-line); border-radius: var(--wb-r-xl);
  background: var(--wb-bg); box-shadow: var(--wb-sh-sm); overflow: hidden;
}
.wb-summary__body { padding: 22px; }
.wb-summary__name { font-size: 15px; font-weight: 500; color: var(--wb-ink); }
.wb-summary__price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; color: var(--wb-ink); }
.wb-summary__price small { font-size: 18px; font-weight: 500; }
.wb-summary__price b { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.wb-summary__price span { font-size: 14px; color: var(--wb-ink-5); }
.wb-summary__price .wb-summary__save {
  margin-left: auto; align-self: center; font-size: 12px; font-weight: 500; color: var(--wb-ok);
}
.wb-summary__row { margin-top: 18px; }
.wb-summary__row > .wb-summary__k { font-size: 13px; color: var(--wb-ink-4); margin-bottom: 8px; display: block; }
.wb-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--wb-r-pill); background: var(--wb-bg-pill); }
.wb-seg button {
  height: 38px; border: 0; border-radius: var(--wb-r-pill); font-size: 14px; font-weight: 400;
  color: var(--wb-ink-4); background: transparent; cursor: pointer;
  transition: background var(--wb-dur) var(--wb-ease), color var(--wb-dur) var(--wb-ease);
}
.wb-seg button small { display: block; font-size: 11px; font-weight: 300; color: var(--wb-ink-5); margin-top: 1px; }
.wb-seg button.is-active { background: var(--wb-bg); color: var(--wb-ink); font-weight: 500; box-shadow: var(--wb-sh-xs); }
.wb-seg button.is-active small { color: var(--wb-brand-ink); }
.wb-stepper { display: inline-flex; align-items: center; border: 1px solid var(--wb-line-strong); border-radius: var(--wb-r-md); overflow: hidden; }
.wb-stepper button { width: 40px; height: 42px; font-size: 18px; color: var(--wb-ink-2); background: var(--wb-bg); cursor: pointer; border: 0; transition: background var(--wb-dur) var(--wb-ease); }
.wb-stepper button:hover { background: var(--wb-bg-soft); }
.wb-stepper input {
  width: 56px; height: 42px; text-align: center; border: 0;
  border-left: 1px solid var(--wb-line); border-right: 1px solid var(--wb-line);
  font-size: 15px; font-weight: 500; color: var(--wb-ink); -moz-appearance: textfield;
}
.wb-stepper input::-webkit-outer-spin-button,
.wb-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wb-summary__list { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--wb-line); display: flex; flex-direction: column; gap: 9px; }
.wb-summary__list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.wb-summary__list .k { color: var(--wb-ink-4); font-weight: 300; }
.wb-summary__list .v { color: var(--wb-ink); font-weight: 400; text-align: right; }
.wb-summary__total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--wb-line); }
.wb-summary__total span { font-size: 14px; color: var(--wb-ink-3); }
.wb-summary__total b { font-size: 26px; font-weight: 500; letter-spacing: -.01em; color: var(--wb-ink); }
.wb-summary__foot { padding: 16px 22px 22px; background: var(--wb-bg-soft); border-top: 1px solid var(--wb-line-soft); }
.wb-summary__note { margin-top: 12px; font-size: 12px; color: var(--wb-ink-5); text-align: center; }

/* 相关机型 */
.wb-goods__related { margin-top: 72px; }
.wb-goods__related .wb-grid { margin-top: 22px; }
.wb-grid { display: grid; gap: 16px; margin-top: 32px; }
.wb-grid--4 { grid-template-columns: repeat(4, 1fr); }
.wb-tile {
  padding: 20px; border: 1px solid var(--wb-line); border-radius: var(--wb-r-lg);
  background: var(--wb-bg); text-decoration: none; color: inherit; display: block;
  transition: box-shadow var(--wb-dur) var(--wb-ease), transform var(--wb-dur) var(--wb-ease), border-color var(--wb-dur) var(--wb-ease);
}
.wb-tile:hover { box-shadow: var(--wb-sh-sm); transform: translateY(-2px); border-color: transparent; }
.wb-tile__t { margin-top: 12px; font-size: 16px; font-weight: 500; color: var(--wb-ink); }
.wb-plan__price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; }
.wb-plan__price b { font-size: 38px; font-weight: 500; line-height: 1; letter-spacing: -.02em; color: var(--wb-ink); }
.wb-plan__price span { font-size: 13.5px; color: var(--wb-ink-5); }

/* 面包屑 */
.wb-crumb { padding: 18px 0 0; font-size: 13px; color: var(--wb-ink-4); }
.wb-crumb .wb-container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-crumb a { color: var(--wb-ink-3); text-decoration: none; transition: color var(--wb-dur) var(--wb-ease); }
.wb-crumb a:hover { color: var(--wb-brand-ink); }
.wb-crumb .sep { color: var(--wb-ink-6); }
.wb-crumb span[aria-current] { color: var(--wb-ink); font-weight: 600; }

/* =================== 响应式 =================== */
@media (max-width: 980px) {
  .wb-goods__grid { grid-template-columns: 1fr; gap: 28px; }
  .wb-goods__aside { position: static; }
  .wb-goods__specs { grid-template-columns: repeat(2, 1fr); }
  .wb-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wb-goods__specs { grid-template-columns: 1fr; }
  .wb-grid--4 { grid-template-columns: 1fr; }
  .wb-goods__title { font-size: 26px; }
}
