/* 商品ads —— 浅色商品页样式 */
:root{
  --bg:#f6f8fb; --card:#ffffff; --line:#e6ebf5; --ink:#0f172a; --sub:#64748b;
  --brand:#2563eb; --brand2:#06b6d4; --ok:#10b981; --warn:#f59e0b;
  --shadow:0 10px 30px rgba(16,24,40,.07);
  --radius:16px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
.wrap{max-width:1080px;margin:0 auto;padding:0 18px}

/* 顶栏 */
.hd{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.86);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--line)}
.hd .wrap{display:flex;align-items:center;justify-content:space-between;height:60px;gap:12px}
.logo{display:flex;align-items:center;gap:9px;font-weight:800;font-size:17px;letter-spacing:-.2px}
.logo i{width:26px;height:26px;border-radius:8px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:inline-block}
.hd nav{display:flex;gap:18px;font-size:14px;color:var(--sub)}
.hd nav a:hover{color:var(--brand)}
.lang{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 12px;font-size:13px;color:var(--sub);cursor:pointer}

/* Hero */
.hero{padding:44px 0 10px;text-align:center}
.hero h1{margin:0 0 10px;font-size:30px;letter-spacing:-.6px}
.hero p{margin:0 auto;max-width:620px;color:var(--sub);font-size:15px}
.chips{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:18px}
.chip{background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 14px;font-size:13px;color:#334155;box-shadow:0 2px 8px rgba(16,24,40,.04)}
.chip b{color:var(--brand)}

/* 商品区 */
.sec-title{display:flex;align-items:center;justify-content:space-between;margin:34px 0 14px}
.sec-title h2{margin:0;font-size:19px;letter-spacing:-.3px}
.sec-title span{font-size:13px;color:var(--sub)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media(max-width:980px){.grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.grid{grid-template-columns:1fr}}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;display:flex;flex-direction:column;transition:.18s transform,.18s box-shadow}
.card:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(16,24,40,.10)}
.ico{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand2));margin-bottom:12px}
.card h3{margin:0 0 6px;font-size:16px;line-height:1.45}
.card .desc{margin:0 0 14px;color:var(--sub);font-size:13px;min-height:38px}
.card .meta{display:flex;align-items:baseline;justify-content:space-between;margin-top:auto}
.price{font-size:22px;font-weight:800;letter-spacing:-.5px}
.price small{font-size:12px;font-weight:600;color:var(--sub);margin-left:4px}
.stock{font-size:12px;color:var(--sub)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:12px;cursor:pointer;font-weight:700;font-size:14px;padding:11px 16px;transition:.15s opacity,.15s transform}
.btn:active{transform:scale(.99)}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;box-shadow:0 8px 18px rgba(37,99,235,.25)}
.btn-ghost{background:#f1f5fb;color:#334155}
.btn-block{width:100%}
.card .btn{margin-top:12px}
.tag{display:inline-block;font-size:11px;padding:2px 8px;border-radius:999px;background:#eef4ff;color:#2563eb;margin-left:6px;vertical-align:middle}

/* 流程 */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:8px}
@media(max-width:760px){.steps{grid-template-columns:1fr}}
.step{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}
.step b{display:block;font-size:14px;margin-bottom:4px}
.step span{font-size:13px;color:var(--sub)}
.step em{font-style:normal;width:22px;height:22px;border-radius:50%;background:#eef4ff;color:var(--brand);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;margin-bottom:8px}

/* FAQ */
.faq{margin-top:10px}
.qa{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:10px}
.qa b{display:block;font-size:14px;margin-bottom:4px}
.qa p{margin:0;color:var(--sub);font-size:13px}

/* 页脚 */
.ft{margin:44px 0 30px;color:var(--sub);font-size:13px;text-align:center}
.ft a{color:var(--sub);margin:0 6px}
.ft a:hover{color:var(--brand)}

/* 弹窗 */
.modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;z-index:100;padding:18px}
.modal.on{display:flex}
.box{background:#fff;border-radius:18px;width:100%;max-width:430px;padding:22px;box-shadow:0 24px 60px rgba(15,23,42,.25);max-height:90vh;overflow:auto}
.box h3{margin:0 0 4px;font-size:18px;text-align:center}
.box .sub{margin:0 0 16px;text-align:center;color:var(--sub);font-size:13px}
.rows{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:6px 0 16px}
.row{display:flex;justify-content:space-between;gap:12px;padding:11px 14px;font-size:13px;border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:0}
.row span{color:var(--sub)}
.row b{font-weight:700;text-align:right;word-break:break-all}
.wallets{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.wbtn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 6px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;font-size:12px;color:#334155}
.wbtn:hover{border-color:#c7d7f5;background:#f8fbff}
.wbtn img{width:28px;height:28px}
.qr{text-align:center;padding:4px 0 10px}
.qr .tip{font-size:13px;color:var(--sub);margin-bottom:10px}
.qr .code{display:inline-block;background:#fff;padding:8px;border-radius:10px;border:1px solid var(--line)}
.qr .host{font-size:12px;color:var(--sub);margin-top:8px}

/* 结果 */
.res-ico{width:54px;height:54px;border-radius:50%;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:26px}
.res-ok{background:#e9fbf3;color:#0f9d63}
.res-bad{background:#fdecec;color:#d64545}

/* loading */
.loading{position:fixed;inset:0;background:rgba(255,255,255,.72);display:none;align-items:center;justify-content:center;z-index:200}
.loading.on{display:flex}
.spin{width:34px;height:34px;border-radius:50%;border:3px solid #dbe6f7;border-top-color:var(--brand);animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

.toast{position:fixed;left:50%;bottom:40px;transform:translateX(-50%) translateY(20px);background:#0f172a;color:#fff;padding:11px 18px;border-radius:10px;font-size:13px;opacity:0;transition:.2s;z-index:300;max-width:90vw;text-align:center}
.toast.on{opacity:1;transform:translateX(-50%) translateY(0)}

/* 移动端适配 */
@media(max-width:640px){
  .hd nav{display:none}
  .hd .wrap{height:56px}
  .hero{padding:30px 0 4px}
  .hero h1{font-size:22px;letter-spacing:-.4px}
  .hero p{font-size:13.5px}
  .chips{gap:8px}
  .chip{font-size:12px;padding:6px 11px}
  .sec-title{margin:26px 0 12px}
  .sec-title h2{font-size:17px}
  .sec-title span{font-size:12px}
  .card{padding:16px}
  .price{font-size:20px}
  .box{padding:18px}
}

/* 商品卡：图片在上，价格+库存，标题在下（对齐参考站结构） */
.card{padding:0;overflow:hidden}
.thumb{position:relative;width:100%;aspect-ratio:16/10;background:linear-gradient(135deg,#eef4ff,#e6fbff);display:flex;align-items:center;justify-content:center;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.thumb .ph{font-size:34px;font-weight:800;color:#9db8e8;letter-spacing:-1px}
.card .body{padding:14px 14px 16px;display:flex;flex-direction:column;gap:8px}
.card .prow{display:flex;align-items:center;justify-content:space-between}
.card .price{font-size:18px;font-weight:800;color:#e5484d}
.card .price small{font-size:11px;color:#9aa7bd;font-weight:600;margin-left:3px}
.stock{background:#e8fbf1;color:#0f9d63;font-size:12px;font-weight:700;border-radius:6px;padding:3px 8px}
.card h3{font-size:14px;line-height:1.5;font-weight:600;margin:0;color:#1e293b}
.card .btn{margin-top:2px}
.card .tag{background:#fff4e6;color:#d97706}

/* ===== v3 视觉细化 ===== */
body{background:radial-gradient(1200px 600px at 50% -200px,#eaf3ff 0%,#f6f8fb 55%,#f6f8fb 100%)}
.card{padding:0;overflow:hidden;border:1px solid #edf1f7;border-radius:14px;background:#fff;
  box-shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.05);transition:transform .18s ease,box-shadow .18s ease}
.card:hover{transform:translateY(-3px);box-shadow:0 10px 30px rgba(16,24,40,.10)}
.thumb{aspect-ratio:16/10;background:linear-gradient(135deg,#f1f7ff 0%,#eefaf8 100%);
  display:flex;align-items:center;justify-content:center;border-bottom:1px solid #f2f5fa}
.thumb .ph{font-size:30px;font-weight:800;color:#c3d4ef;letter-spacing:0}
.card .body{padding:12px 14px 14px;gap:6px}
.card .prow{align-items:center}
.card .price{font-size:16px;font-weight:800;color:#111827;letter-spacing:-.2px}
.card .price small{font-size:11px;color:#9aa5b8;font-weight:600;margin-left:3px}
.stock{display:inline-flex;align-items:center;gap:5px;background:#eefaf3;color:#0f9d63;
  font-size:11.5px;font-weight:700;border-radius:6px;padding:3px 9px}
.stock i{width:6px;height:6px;border-radius:50%;background:#22c55e;display:inline-block}
.card h3{font-size:13.5px;line-height:1.55;font-weight:600;color:#1f2937;margin:2px 0 8px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:42px}
.btn-buy{height:32px;padding:0 16px;font-size:13px;font-weight:700;border-radius:9px;
  background:linear-gradient(135deg,#2563eb,#06b6d4);color:#fff;border:0;cursor:pointer;
  box-shadow:0 4px 12px rgba(37,99,235,.22);transition:.16s transform,.16s box-shadow;width:auto;align-self:flex-start}
.btn-buy:hover{box-shadow:0 6px 16px rgba(37,99,235,.30)}
.btn-buy:active{transform:translateY(1px)}
.grid{gap:18px}
@media(max-width:560px){.grid{grid-template-columns:repeat(2,1fr);gap:12px}.card h3{font-size:12.5px}.btn-buy{width:100%}}

/* v4：价格/库存与「下单」同一行，按钮居右 */
.card .body{padding:12px 14px 12px}
.card h3{min-height:0;margin:0 0 10px;font-size:13.5px;line-height:1.5}
.card .prow{display:flex;align-items:center;justify-content:space-between;gap:10px}
.card .pleft{display:flex;align-items:center;gap:8px;min-width:0}
.card .price{font-size:16px;font-weight:800;color:#0f172a}
.card .price small{font-size:10.5px;color:#94a3b8;margin-left:2px}
.card .stock{font-size:11px;padding:2px 7px;border-radius:6px}
.btn-buy{height:30px;min-width:0;padding:0 14px;font-size:13px;border-radius:8px;align-self:auto;flex:0 0 auto}
@media(max-width:560px){.btn-buy{height:28px;padding:0 12px;font-size:12.5px;width:auto}}

/* ===== 钱包弹窗（浅色，配浅色模板） ===== */
#walletModal{background:rgba(15,23,42,.42)}
.wbox{background:#fff;border:1px solid #e6ebf5;border-radius:18px;width:100%;max-width:430px;
  padding:22px 20px 18px;box-shadow:0 24px 60px rgba(15,23,42,.22)}
.wtitle{color:#0f172a;font-size:17px;font-weight:800;text-align:center;margin-bottom:6px}
.wsub{color:#64748b;font-size:12.5px;text-align:center;margin-bottom:16px}
.wgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.wbtn{position:relative;background:#f8fafc;border:1px solid #e6ebf5;border-radius:12px;
  padding:14px 6px 10px;display:flex;flex-direction:column;align-items:center;gap:8px;
  color:#334155;font-size:12px;cursor:pointer;transition:.15s border-color,.15s background,.15s box-shadow}
.wbtn:hover{background:#eef4ff;border-color:#c7d7f5;box-shadow:0 6px 16px rgba(37,99,235,.08)}
.wbtn img{width:34px;height:34px;border-radius:9px;object-fit:contain;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.08)}
.wbtn span{line-height:1.2;text-align:center;font-weight:600}
.wbadge{position:absolute;top:5px;right:5px;background:#ff4d4f;color:#fff;font-size:8.5px;
  padding:1px 4px;border-radius:3px;font-style:normal;line-height:1.2}
.wcancel{width:100%;height:40px;border-radius:10px;border:1px solid #e6ebf5;background:#f1f5fb;
  color:#334155;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}
.wcancel:hover{background:#e8eefb}
.wqrarea{text-align:center;padding:2px 0 12px}
.wqrtitle{font-size:13.5px;color:#0f172a;font-weight:700;margin-bottom:10px}
.wqrsub{font-size:12px;color:#64748b;margin:10px 0 12px}
.wqrbox{display:inline-block;background:#fff;padding:8px;border-radius:12px;border:1px solid #e6ebf5;line-height:0}
.wqrbox canvas,.wqrbox img{display:block;width:200px;height:200px}
.wqrcode{display:none!important}

/* v4：价格/库存与「下单」同一行，按钮居右 */
.card .body{padding:12px 14px 12px}
.card h3{min-height:0;margin:0 0 10px;font-size:13.5px;line-height:1.5}
.card .prow{display:flex;align-items:center;justify-content:space-between;gap:10px}
.card .pleft{display:flex;align-items:center;gap:8px;min-width:0}
.card .price{font-size:16px;font-weight:800;color:#0f172a}
.card .price small{font-size:10.5px;color:#94a3b8;margin-left:2px}
.card .stock{font-size:11px;padding:2px 7px;border-radius:6px}
.btn-buy{height:30px;min-width:0;padding:0 14px;font-size:13px;border-radius:8px;align-self:auto;flex:0 0 auto}
@media(max-width:560px){.btn-buy{height:28px;padding:0 12px;font-size:12.5px;width:auto}}

/* 收货邮箱 */
.field{margin:0 0 14px}
.field label{display:block;font-size:12.5px;color:#475569;font-weight:600;margin-bottom:6px}
.field input{width:100%;height:42px;border:1px solid #e2e8f0;border-radius:10px;padding:0 12px;font-size:14px;
  color:#0f172a;background:#fff;outline:none;transition:.15s border-color,.15s box-shadow}
.field input:focus{border-color:#93b4f7;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.field input.bad{border-color:#f0a3a3;box-shadow:0 0 0 3px rgba(229,72,77,.10)}
.fhint{font-size:11.5px;color:#94a3b8;line-height:1.6;margin-top:6px}
.btn[disabled]{opacity:.45;cursor:not-allowed;box-shadow:none}

/* energy.js 渲染的钱包按钮（浅色） */
.wallets{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.wallet-btn{background:#f8fafc;border:1px solid #e6ebf5;border-radius:12px;padding:13px 6px 10px;
  display:flex;flex-direction:column;align-items:center;gap:7px;color:#334155;font-size:12px;font-weight:600;cursor:pointer}
.wallet-btn:hover{background:#eef4ff;border-color:#c7d7f5}
.wallet-btn img{width:34px;height:34px;border-radius:9px;object-fit:contain;background:#fff}

/* ===== 结果弹窗（成功 / 失败） ===== */
#resultModal .box{padding:26px 22px 20px;border-radius:20px}
#resultModal .res-ico{width:56px;height:56px;border-radius:50%;margin:0 auto 14px;display:flex;
  align-items:center;justify-content:center;font-size:26px;font-weight:800}
#resultModal .res-ico.ok{background:#e9fbf2;color:#0f9d63;box-shadow:0 0 0 6px rgba(16,185,129,.08)}
#resultModal .res-ico.bad{background:#fdecec;color:#e11d48;box-shadow:0 0 0 6px rgba(225,29,72,.07)}
#resultModal #rsTitle{font-size:19px;font-weight:800;text-align:center;margin:0 0 6px;color:#0f172a}
#resultModal #rsDesc{font-size:13px;color:#64748b;text-align:center;margin:0 0 16px;line-height:1.6}
#resultModal .res-rows{border:1px solid #eef1f6;border-radius:14px;overflow:hidden;margin:0 0 16px;background:#fbfcfe}
#resultModal .res-row{display:flex;justify-content:space-between;gap:12px;padding:11px 14px;font-size:13px;border-bottom:1px solid #f1f4f9}
#resultModal .res-row:last-child{border-bottom:0}
#resultModal .res-row span{color:#7c8aa0}
#resultModal .res-row b{color:#0f172a;font-weight:700;text-align:right;word-break:break-all}
#resultModal .btn-primary{height:44px;font-size:15px;border-radius:12px}
