/* public_buy 页专用样式（方案 G）。只放本页独有的东西，令牌与组件来自 site.css + shell-*.css，不改公共类的全局表现。
   照设计稿实现：mock/G/buy.html + buy.css（buy.png）。左：商品图舞台 + 四条要点；右：标题、两步、应付 + 去付款、折叠说明。 */

/* ---------- 主体：左商品图（696），右表单（432），间距 72 ---------- */
.page-buy .buy{display:grid;grid-template-columns:minmax(0,696fr) minmax(0,432fr);gap:72px;align-items:start;padding:4px 0 24px}

/* 左：商品图舞台（比底暗半档的大圆角区，白黑两张卡叠放） */
.page-buy .stage{display:block;aspect-ratio:696/596;min-height:0;padding:0}
.page-buy .stage img{position:absolute;left:50%;top:50%;width:93.7%;height:auto;transform:translate(-50%,-50%)}

/* 左：四条要点 */
.points{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:24px;list-style:none}
.points li{padding-right:16px}
.points li+li{padding-left:20px;border-left:1px solid var(--line)}
.points .ico{display:block;width:18px;height:18px;color:var(--ink-2)}
.points h3{margin-top:10px;font-family:var(--serif);font-weight:600;font-size:14.5px;letter-spacing:-.005em;line-height:1.35;color:var(--ink)}
.points p{margin-top:3px;font-size:12px;line-height:1.55;color:var(--ink-4)}

/* 右：标题（紧贴舞台顶边） */
.buy-r .phead{padding:0}
.buy-r .phead .sub{max-width:none}
.buy-r .phead .sub b{font-weight:500;color:var(--ink-2)}
.buy-r .phead .sub .price{font-size:16px;letter-spacing:-.005em}
.buy-r .phead .sub .approx{font-size:13px;margin-right:3px}
.buy-r .phead .sub .dot{margin:0 6px;color:var(--ink-4)}

/* 右：提示（出错、未开放、重复下单）放在标题下方 */
.buy-r>.alert,.buy-r>.notice{margin-top:24px}
.buy-r>.alert+.alert,.buy-r>.alert+.notice{margin-top:12px}
.buy-r .notice>.ico{margin-top:1px}
.buy-r .notice .acts{margin-top:14px}

/* 右：步骤 */
.buy-r .step{margin-top:30px}

/* 方案（多个上架商品时）：紧凑选项卡，一行一个 */
.plan .opt-b{padding:12px 16px}
.plan .opt-tx b{font-family:var(--serif);font-size:16px;letter-spacing:-.005em}
.plan .opt-tx small{margin-top:2px}
.plan .opt-tx small{display:flex;align-items:center;gap:8px}
.plan .opt-tx .save{margin:0;height:18px;padding:0 6px;font-size:11px}
.plan .opt-r{display:flex;flex-direction:column;align-items:flex-end}
.plan .opt-r .price{font-size:19px}
.plan .opt-r>.was{margin:2px 0 0}
.plan .plan-yen{font-size:12px}
.plan .opt-tx b .pop{height:18px;margin:-2px 0 0 6px;padding:0 6px;font-family:var(--sans);font-size:11px;font-weight:400;letter-spacing:0}
/* 商家写的一句话卖点 + 描述：并成一行小字，用间隔点分开（保持选项卡紧凑） */
.plan .opt-tx small.tl{display:block;margin-top:4px;font-size:12px;line-height:1.55;color:var(--ink-4)}
.plan .opt-tx small.tl span+span::before{content:"·";margin:0 6px;color:var(--ink-5)}

/* 邮箱：填了合法地址时右侧出现对勾（纯 CSS） */
.bfield .input{padding-right:40px}
.bfield>.ok{left:auto;right:14px;color:var(--olive-dot);display:none}
.bfield>.input:not(:placeholder-shown):valid~.ok{display:block}

/* 邮箱疑似写错（设计稿下方示意） */
.buy-r .callout>div{min-width:0}
.buy-r .callout code{margin-left:2px;overflow-wrap:anywhere}
.buy-r .callout p+p{margin-top:0}
.buy-r .callout p.d{margin-top:8px;color:var(--ink-3)}

/* 应付：每个方案一块，只显示选中的那块 */
.dues>.due{display:none}
.dues>.due.is-sel{display:block}
@supports selector(:has(*)){
  .dues>.due.is-sel{display:none}
  #order:has(.plans>.plan:nth-child(1)>input:checked) .dues>.due:nth-child(1),
  #order:has(.plans>.plan:nth-child(2)>input:checked) .dues>.due:nth-child(2),
  #order:has(.plans>.plan:nth-child(3)>input:checked) .dues>.due:nth-child(3),
  #order:has(.plans>.plan:nth-child(4)>input:checked) .dues>.due:nth-child(4),
  #order:has(.plans>.plan:nth-child(5)>input:checked) .dues>.due:nth-child(5),
  #order:has(.plans>.plan:nth-child(6)>input:checked) .dues>.due:nth-child(6),
  #order:has(.plans>.plan:nth-child(7)>input:checked) .dues>.due:nth-child(7),
  #order:has(.plans>.plan:nth-child(8)>input:checked) .dues>.due:nth-child(8),
  #order:has(.plans>.plan:nth-child(9)>input:checked) .dues>.due:nth-child(9),
  #order:has(.plans>.plan:nth-child(10)>input:checked) .dues>.due:nth-child(10),
  #order:has(.plans>.plan:nth-child(11)>input:checked) .dues>.due:nth-child(11),
  #order:has(.plans>.plan:nth-child(12)>input:checked) .dues>.due:nth-child(12){display:block}
  /* 超过 12 个上架方案、又选中第 13 个以后时：没有一条命中，退回显示服务器选中的那块 */
  #order:has(.plans>.plan:nth-child(n+13)>input:checked) .dues>.due.is-sel{display:block}
}
.dues>.due:only-child{display:block}
/* 人工发货一行：折成两行时图标跟着第一行字走（公共层是 flex 居中，折行后图标会孤零零贴在最左） */
.due-row .amt i{font-style:normal;font-family:var(--sans);font-weight:400;font-size:13px;color:var(--ink-4);margin-right:4px;letter-spacing:0}
.due-g .num{font-family:"Source Serif 4",var(--sans);font-size:12.5px;color:inherit}

/* 折叠条：放不下时小字整体换到第二行，加减号固定在右侧 */
.buy-r .more>summary{flex-wrap:wrap;row-gap:2px;padding:8px 24px 8px 0;position:relative}
.buy-r .more>summary::after{position:absolute;right:0;top:50%;margin-top:-7px}

/* 折叠说明展开后（右栏里单列：包含什么 → 规则与退款） */
.fold{padding-top:6px}
.fold>div+div{margin-top:26px}
.fold h2{font-family:var(--serif);font-weight:600;font-size:16px;padding-bottom:10px;border-bottom:1px solid var(--ink);color:var(--ink)}
.fold dl{display:grid;grid-template-columns:76px minmax(0,1fr)}
.fold dt,.fold dd{padding:10px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6}
.fold dt{color:var(--ink-4);font-size:12.5px}
.fold dd{color:var(--ink-2)}
.fold ul{margin-top:12px;list-style:none}
.fold li{position:relative;padding-left:16px;font-size:13px;line-height:1.75;color:var(--ink-3)}
.fold li+li{margin-top:6px}
.fold li::before{content:"";position:absolute;left:0;top:11px;width:5px;height:1px;background:var(--ink-4)}
.fold li b{color:var(--ink);font-weight:600}
.fold .safe{display:flex;align-items:center;gap:7px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line);font-size:12.5px;color:var(--ink-4)}
.fold .safe .ico{color:var(--ink-4)}

/* ---------- 收窄 ---------- */
@media (max-width:1199px){
  .page-buy .buy{gap:44px}
  .points li{padding-right:10px}
  .points li+li{padding-left:12px}
}
@media (max-width:1023px){
  .page-buy .buy{grid-template-columns:minmax(0,1fr);gap:32px;padding-bottom:8px}
  .points{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:20px}
  .points li:nth-child(odd){padding-left:0;border-left:0}
  .buy-r .step-b{margin-left:0}
}
@media (max-width:599px){
  .page-buy .stage{border-radius:14px}
  .buy-r .phead h1{font-size:28px}
  .fold dl{grid-template-columns:64px minmax(0,1fr)}
}
