/* ============================================================
   站内购买 · 支付相关组件样式
   依赖：shop.css（顶栏 / 页脚 / 按钮 / 变量）
   用于：商品页购买弹窗、订单查询页 /order、支付成功态
   ============================================================ */

/* ---------- 购买弹窗 ---------- */
.buy-modal {
  position: fixed; inset: 0; z-index: 90;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(15, 14, 20, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.buy-modal.open { display: flex; }
.buy-sheet {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 24px 60px rgba(15, 14, 20, .22);
  padding: 28px 28px 24px;
  max-height: 90vh; overflow: auto;
}
.buy-sheet h3 { font-size: 19px; margin-bottom: 6px; }
.buy-sheet .bsub { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; line-height: 1.7; }

.buy-line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 14px 0; margin-bottom: 6px;
  border-bottom: 1px dashed var(--line-2);
}
.buy-line .lb { font-size: 13.5px; color: var(--ink-2); }
/* 弹窗金额同样锁橙红：这是「要付多少钱」，不能跟商品主题色跑 */
.buy-line .pr { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--buy); line-height: 1; }
.buy-line .pr small { font-size: 14px; margin-right: 2px; }

.buy-field { margin-top: 18px; }
.buy-field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; letter-spacing: .04em; }
.buy-field input {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-2); color: var(--ink); outline: none;
  font-family: var(--sans);
}
.buy-field input:focus { border-color: var(--accent); }
.buy-field .tip { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }

.buy-agree {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.65;
}
.buy-agree input { margin-top: 3px; flex: none; accent-color: var(--accent); }
.buy-agree a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.buy-acts { display: grid; gap: 10px; margin-top: 20px; }
.buy-close {
  position: absolute; top: 0; right: 0;
  width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 22px; line-height: 1;
}

/* ---------- 价格展示（商品页 / 商城卡片） ---------- */
.price-tag {
  display: inline-flex; align-items: baseline; gap: 1px;
  font-family: var(--serif); color: var(--buy);
}
.price-tag .cur { font-size: 0.62em; margin-right: 1px; }
.price-tag .val { font-weight: 600; }
/* 服务端 SSR 直出的价格用 <b> 包裹（便于百度识别富结果价格文本），需与 .val 同重 */
.price-tag b { font-weight: 600; font-size: 1em; }
.price-tag:empty { display: none; }

/* ---------- 购买主色（橙红） ---------- */
/* --accent 会被 JS 按商品覆盖成紫/绿/蓝，交易元素不能跟着变，否则「多少钱、怎么买」
   的色彩语义在每页都不一样。这里统一锁到固定橙红。 */
.btn-buy {
  background: var(--buy);
  color: #fff;
  border: 1px solid var(--buy);
}
.btn-buy:hover { background: var(--buy-dark); border-color: var(--buy-dark); }
.btn-buy:active { transform: translateY(1px); }

/* 兑换码按钮下方的收尾标题：字号小于常规 h3，作为「点了会发生什么」的补充，不再抢输入框 */
.redeem-after {
  margin-top: 14px; font-size: 13.5px; font-weight: 600;
  color: var(--ink); letter-spacing: .01em;
}
.redeem-after + .dev { margin-top: 4px; }

/* 已购人数所在行：紧贴价格说明，不与按钮抢空间 */
.buysold { margin: 0 0 12px; }
.buysold:empty { display: none; }

/* 已购人数（社会证明）：与价格同区，用交易色但压低饱和度，避免抢价格注意力 */
.sold-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--buy-dark);
  background: var(--buy-soft); border-radius: 100px;
  padding: 3px 10px; line-height: 1.4;
}
.sold-tag b { font-weight: 600; font-family: var(--serif); font-size: 13px; }
.sold-tag:empty { display: none; }

/* ---------- 商品页购买区 ---------- */
.buyhead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.buyhead-lbl { font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.buynote {
  font-size: 12px; color: var(--ink-3); line-height: 1.6; margin: 0 0 12px;
}
.buynote:empty { display: none; }
.buylist {
  list-style: none; margin: 10px 0 0; padding: 0;
}
.buylist li {
  position: relative; padding-left: 14px; margin-top: 5px;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.65;
}
.buylist li::before {
  content: ''; position: absolute; left: 2px; top: 7px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .45;
}
.buylist b { color: var(--ink-2); font-weight: 600; }
.buylist a { color: var(--accent); text-decoration: underline; }
.price-off {
  margin-left: 10px; font-size: 12px; color: var(--ink-3);
  font-family: var(--sans);
}

/* ---------- 订单查询页 ---------- */
.order-wrap { max-width: 660px; margin: 0 auto; padding: 56px 24px 80px; }
.order-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px 30px 28px;
}
.order-card h1 { font-size: 26px; margin-bottom: 8px; }
.order-card .lead2 { font-size: 13.5px; color: var(--ink-3); line-height: 1.75; margin-bottom: 24px; }

.steps2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 26px 0 4px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.steps2 .st { padding: 18px 16px; border-left: 1px solid var(--line-2); }
.steps2 .st:first-child { border-left: 0; }
.steps2 .st .n { font-family: var(--serif); font-size: 22px; color: var(--accent); opacity: .4; line-height: 1; }
.steps2 .st h4 { font-size: 14px; margin: 8px 0 5px; }
.steps2 .st p { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }
@media (max-width: 720px) { .steps2 { grid-template-columns: 1fr; } .steps2 .st { border-left: 0; border-top: 1px solid var(--line-2); } .steps2 .st:first-child { border-top: 0; } }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 12px; letter-spacing: .04em;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.s-pending { color: #b45309; border-color: #e8d3ae; background: #fdf6e7; }
.status-pill.s-paid, .status-pill.s-delivered { color: #15803d; border-color: #bcdcc4; background: #eef8f0; }
.status-pill.s-cancelled { color: #6b7280; }
.status-pill.s-refunding, .status-pill.s-refunded { color: #b91c1c; border-color: #edc4c4; background: #fdf0f0; }

/* ---------- 收款指引 ---------- */
.paybox {
  margin-top: 22px; padding: 22px 22px 20px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper-2);
}
.paybox .pb-h { font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.paybox ol { margin: 0; padding-left: 20px; }
.paybox ol li { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.paybox ol li b { color: var(--ink); }
.pay-qr { display: block; margin: 0 auto 14px; max-width: 220px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.pay-order-no {
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  font-size: 15px; letter-spacing: .06em; font-weight: 600; color: var(--ink);
}

/* ---------- 兑换码交付 ---------- */
.codes { margin-top: 22px; display: grid; gap: 12px; }
.code-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--accent);
  border-radius: var(--r); background: var(--paper-2);
}
.code-card .cv {
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  font-size: 21px; font-weight: 700; letter-spacing: .1em; color: var(--ink);
}
.code-card .cm { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.code-card.revoked { border-color: var(--line); opacity: .62; }
.code-card.revoked .cv { text-decoration: line-through; color: var(--ink-3); }

.waiting {
  margin-top: 22px; padding: 20px 22px; border-radius: var(--r);
  border: 1px dashed var(--line); background: var(--paper-2);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.75;
}
.spin {
  display: inline-block; width: 13px; height: 13px; margin-right: 7px;
  border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px;
}
@keyframes sp { to { transform: rotate(360deg); } }

.notice {
  margin-top: 20px; padding: 14px 16px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.7;
  background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--line);
}
.notice.warn { background: #fdf6e7; border-color: #e8d3ae; color: #92610a; }

/* ---------- 合规文本页 ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 56px 24px 90px; }
.legal h1 { font-size: 28px; margin-bottom: 10px; }
.legal .meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 34px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.legal h2 { font-size: 18px; margin: 34px 0 10px; }
.legal h3 { font-size: 15px; margin: 22px 0 8px; color: var(--ink); }
.legal p, .legal li { font-size: 14px; color: var(--ink-2); line-height: 1.9; }
.legal ul { padding-left: 20px; margin: 10px 0; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .hl { background: #fdf6e7; border-left: 3px solid #d9a441; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 13.5px; }