/* 海淘乾宝商城 */
:root{
  --bg:#f4f6f8;--card:#fff;--ink:#16202c;--muted:#6a7787;--line:#e4e9ee;
  --brand:#0f8f7a;--brand-ink:#fff;--brand-soft:#e3f4f0;--accent:#e8622a;
  --esim:#2a6fdb;--esim-soft:#e6efff;--phys:#7a4fd1;--phys-soft:#efe8fd;
  --ok:#14804a;--warn:#b25e09;--err:#c0392b;
  --r:14px;--shadow:0 1px 2px rgba(16,24,40,.04),0 4px 14px rgba(16,24,40,.06);
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0f1418;--card:#171e24;--ink:#e6ecf1;--muted:#93a1ae;--line:#26313a;
  --brand:#22b39a;--brand-soft:#123430;--esim-soft:#16264a;--phys-soft:#251a3d;--shadow:none}}
:root[data-theme=dark]{--bg:#0f1418;--card:#171e24;--ink:#e6ecf1;--muted:#93a1ae;--line:#26313a;
  --brand:#22b39a;--brand-soft:#123430;--esim-soft:#16264a;--phys-soft:#251a3d;--shadow:none}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
html,body{overflow-x:clip}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
a{color:var(--brand);text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}
.muted{color:var(--muted)}
[hidden]{display:none!important}

/* 公告 */
.notice-bar{background:var(--brand);color:var(--brand-ink);font-size:13px;overflow:hidden;white-space:nowrap}
.notice-track{display:inline-flex;gap:48px;padding:6px 16px;animation:marquee 40s linear infinite}
@keyframes marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){.notice-track{animation:none;white-space:normal;flex-wrap:wrap;gap:4px 24px}}

/* 顶栏 */
.topbar{background:var(--card);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topbar-in{display:flex;align-items:center;gap:16px;height:60px}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:18px;color:var(--ink);white-space:nowrap}
.brand-mark{width:30px;height:30px;border-radius:9px;background:var(--brand);color:#fff;display:grid;place-items:center;font-size:16px}
.search{flex:1;max-width:420px}
.search input{width:100%;height:38px;border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:999px;padding:0 16px;font-size:14px}
.topnav{display:flex;align-items:center;gap:18px;margin-left:auto;font-size:14px}
.topnav a{color:var(--ink)}
.topnav a:hover{color:var(--brand)}
.theme-btn{border:1px solid var(--line);background:none;color:var(--ink);border-radius:8px;width:32px;height:32px;cursor:pointer}
.cart-link{position:relative}
.cart-badge{background:var(--accent);color:#fff;border-radius:999px;font-size:11px;padding:0 6px;margin-left:4px;font-weight:700}
@media (max-width:760px){
  .topnav{display:none}
  .search{max-width:none}
  .brand span:last-child{display:none}
}

/* 首屏 */
.hero{margin:20px 0;padding:28px;border-radius:20px;background:linear-gradient(135deg,var(--brand),#13606f);color:#fff;display:grid;grid-template-columns:1.6fr 1fr;gap:24px;align-items:center}
.hero h1{font-size:clamp(22px,3.2vw,32px);line-height:1.3;margin:6px 0 10px}
.eyebrow{margin:0;opacity:.85;font-size:13px;letter-spacing:.06em}
.hero-sub{margin:0;opacity:.92}
.hero-points{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.hero-points li{background:rgba(255,255,255,.12);border-radius:12px;padding:10px 14px;display:flex;justify-content:space-between;gap:12px}
.hero-points span{opacity:.85;font-size:13px}
@media (max-width:760px){.hero{grid-template-columns:1fr;padding:20px}.hero-points{grid-template-columns:repeat(3,1fr)}.hero-points li{flex-direction:column;gap:0;padding:8px 10px}}

/* 筛选 */
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end;background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:12px;margin:16px 0}
.filters label{display:flex;flex-direction:column;font-size:12px;color:var(--muted);gap:4px;min-width:120px;flex:1}
.filters select{height:36px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);padding:0 8px;font-size:14px}
.filters .clear{font-size:13px;align-self:center}
@media (max-width:560px){.filters label{min-width:calc(50% - 5px)}}

.list-head{display:flex;align-items:baseline;justify-content:space-between;margin:8px 2px 12px}
.list-head h2{font-size:18px;margin:0}

/* 商品卡片 */
.grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
@media (max-width:560px){.grid{grid-template-columns:repeat(2,1fr);gap:10px}}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow);transition:transform .15s,box-shadow .15s}
.card:hover{transform:translateY(-2px)}
.card-link{display:flex;flex-direction:column;height:100%;color:var(--ink)}
.card-img{position:relative;aspect-ratio:1;background:var(--brand-soft)}
.card-img img{width:100%;height:100%;object-fit:cover}
.buy-form label.sku,.buy-form label.pay{margin:0;font-size:14px;color:var(--ink)}
.buy-form label.sku{display:inline-block}
.buy-form label.pay{display:inline-flex;padding:8px 14px;gap:6px;align-items:center}
.card-ph{width:100%;height:100%;display:grid;place-items:center;font-size:28px;font-weight:800;color:var(--brand)}
.card-ph.big{aspect-ratio:1;font-size:48px;border-radius:var(--r);background:var(--brand-soft)}
.badge{position:absolute;top:8px;left:8px;background:var(--accent);color:#fff;font-size:12px;padding:1px 8px;border-radius:6px}
.soldout{position:absolute;inset:auto 8px 8px auto;background:rgba(0,0,0,.6);color:#fff;font-size:12px;padding:1px 8px;border-radius:6px}
.card h3{font-size:14px;line-height:1.45;margin:10px 12px 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em}
.tags{display:flex;flex-wrap:wrap;gap:4px;margin:0 12px}
.tag{font-size:11px;padding:0 6px;border-radius:5px;background:var(--bg);color:var(--muted);border:1px solid var(--line)}
.tag-esim{background:var(--esim-soft);color:var(--esim);border-color:transparent}
.tag-physical{background:var(--phys-soft);color:var(--phys);border-color:transparent}
.price{margin:auto 12px 12px;padding-top:8px;font-size:20px;font-weight:800;color:var(--accent)}
.price small{font-size:12px;font-weight:400;color:var(--muted)}
.empty{text-align:center;padding:48px 16px;color:var(--muted)}

/* 商品页 */
.crumbs{font-size:13px;color:var(--muted);margin:16px 0}
.crumbs a{color:var(--muted)}
.pd{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
@media (max-width:860px){.pd{grid-template-columns:1fr;gap:16px}}
.pd-gallery{position:sticky;top:76px}
@media (max-width:860px){.pd-gallery{position:static}}
.pd-main img{width:100%;height:auto;border-radius:var(--r);background:var(--card);aspect-ratio:1;object-fit:contain}
.pd-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto}
.pd-thumbs button{border:2px solid transparent;border-radius:10px;padding:0;background:none;cursor:pointer;flex:0 0 68px}
.pd-thumbs button.on{border-color:var(--brand)}
.pd-thumbs img{border-radius:8px;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.pd-buy{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:20px;box-shadow:var(--shadow)}
.pd-buy h1{font-size:20px;line-height:1.4;margin:0 0 8px}
.pd-buy .tags{margin:0 0 10px}
.pd-summary{color:var(--muted);margin:0 0 12px}
.pd-price{color:var(--accent);font-weight:800;font-size:30px;margin:4px 0 14px}
.pd-price .cur{font-size:18px}
.pd-price s{color:var(--muted);font-size:14px;font-weight:400;margin-left:8px}

.buy-form .field{border:0;margin:0 0 14px;padding:0;min-width:0}
.buy-form legend,.buy-form label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px;padding:0}
.buy-form em{color:var(--err);font-style:normal}
.buy-form input:not([type=radio]):not([type=checkbox]),.buy-form textarea,.buy-form select{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);padding:10px 12px;font:inherit;margin-bottom:8px}
.buy-form input:focus,.buy-form textarea:focus{outline:2px solid var(--brand-soft);border-color:var(--brand)}
.buy-form .invalid{border-color:var(--err)!important}
.sku-list,.pay-list{display:flex;flex-wrap:wrap;gap:8px}
.sku,.pay{position:relative;cursor:pointer}
.sku input,.pay input{position:absolute;opacity:0;pointer-events:none}
.sku span,.pay{display:inline-flex;align-items:center;gap:6px}
.sku span{border:1.5px solid var(--line);border-radius:10px;padding:8px 16px;font-weight:600;background:var(--card)}
.sku input:checked+span{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.sku input:focus-visible+span,.pay:focus-within{outline:2px solid var(--brand)}
.sku.out span{opacity:.45;text-decoration:line-through;cursor:not-allowed}
.pay{border:1.5px solid var(--line);border-radius:10px;padding:8px 14px;font-weight:600;color:var(--ink)}
.pay:has(input:checked){border-color:var(--brand);background:var(--brand-soft)}
.pay-ico{width:22px;height:22px;border-radius:6px;color:#fff;display:grid;place-items:center;font-size:12px}
.pay-ico.wx{background:#09bb07}.pay-ico.ali{background:#1677ff}
.hint{font-size:13px;margin:8px 0 0;padding:8px 10px;border-radius:8px;background:var(--bg);color:var(--muted)}
.qty-row{display:flex;align-items:center;justify-content:space-between}
.qty-row>span{font-size:13px;color:var(--muted)}
.qty{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.qty button{width:36px;border:0;background:var(--bg);color:var(--ink);font-size:18px;cursor:pointer}
.buy-form .qty input{width:56px;border:0;border-radius:0;text-align:center;margin:0;padding:8px 0;background:var(--card)}
.more summary{cursor:pointer;font-size:13px;color:var(--muted);margin-bottom:6px}
.pd-total{display:flex;justify-content:space-between;align-items:baseline;border-top:1px dashed var(--line);padding-top:12px;margin:6px 0 12px;color:var(--muted)}
.pd-total b{color:var(--accent);font-size:22px}
.actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px}
.btn{height:46px;border-radius:12px;border:1.5px solid var(--brand);font:inherit;font-weight:700;cursor:pointer;padding:0 18px}
.btn.primary{background:var(--brand);color:#fff}
.btn.ghost{background:transparent;color:var(--brand)}
.btn.block{width:100%}
.btn:disabled{opacity:.6;cursor:progress}
.form-msg{min-height:1.4em;margin:10px 0 0;font-size:14px;color:var(--err)}
.form-msg.ok{color:var(--ok)}
.field-tip{min-height:0;margin:6px 0 0;font-size:13px;color:var(--muted)}
.field-tip:empty{display:none}
.field-tip.err{color:var(--err)}
.field-tip.warn{color:#b26a00}
.field-tip.ok{color:var(--ok)}
.code-in{display:flex;gap:8px;align-items:stretch}
.code-in input{flex:1;min-width:0;letter-spacing:4px;font-variant-numeric:tabular-nums}
.code-in .btn{flex:none;white-space:nowrap;padding-left:14px;padding-right:14px}

.pd-tabs{margin:28px 0;background:var(--card);border:1px solid var(--line);border-radius:var(--r)}
.tabbar{display:flex;border-bottom:1px solid var(--line);overflow-x:auto}
.tabbar button{border:0;background:none;color:var(--muted);padding:14px 18px;font:inherit;cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent}
.tabbar button.on{color:var(--brand);border-bottom-color:var(--brand);font-weight:700}
.tabpanel{padding:20px}
.prose{line-height:1.85}
.prose h2{font-size:18px;margin:22px 0 8px}
.prose h3{font-size:16px;margin:18px 0 6px}
.prose table{border-collapse:collapse;width:100%;display:block;overflow-x:auto}
.prose td,.prose th{border:1px solid var(--line);padding:6px 10px}
.prose img{border-radius:10px;margin:10px auto}
.highlights{background:var(--brand-soft);border-radius:12px;padding:12px 12px 12px 32px;margin:0 0 16px}

/* 购物车 / 订单 */
.page-title{font-size:22px;margin:20px 0 14px}
.cart-layout{display:grid;grid-template-columns:1.3fr 1fr;gap:20px;align-items:start}
@media (max-width:860px){.cart-layout{grid-template-columns:1fr}}
.cart-list{list-style:none;padding:0;margin:0}
.cart-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:8px}
.cart-item{display:flex;gap:10px;align-items:center;min-width:0}
.cart-item img{width:56px;height:56px;border-radius:8px;object-fit:cover;flex:0 0 56px}
.cart-item b{display:block;font-size:14px;line-height:1.4}
.cart-del{border:0;background:none;color:var(--muted);cursor:pointer;font-size:13px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:18px;margin-bottom:16px}
.panel h2{font-size:17px;margin:0 0 12px}
.narrow{max-width:520px;margin:0 auto}
.order-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.order-head h1{font-size:20px;margin:20px 0 6px}
.status{padding:2px 10px;border-radius:999px;font-size:13px;font-weight:700;background:var(--bg)}
.st-paid,.st-shipped{background:#fff4e0;color:var(--warn)}
.st-delivered{background:#e3f6ea;color:var(--ok)}
.st-unpaid{background:#fde8e6;color:var(--err)}
.amount{color:var(--accent)}
.qr-box{text-align:center;margin-top:16px}
.qr-box img{margin:0 auto;width:220px;height:220px;border-radius:12px;background:#fff;padding:8px}
.delivery{white-space:pre-wrap;background:var(--bg);border-radius:10px;padding:12px;font:inherit}

/* 页脚 / 底部导航 */
.footer{border-top:1px solid var(--line);margin-top:40px;padding:24px 0;font-size:13px;color:var(--muted);background:var(--card)}
.footer-in{display:grid;gap:12px}
.footer p{margin:4px 0}
.footer-links{display:flex;gap:16px}
.bottom-nav{display:none}
@media (max-width:760px){
  .bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--card);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
  .bottom-nav a,.bottom-nav button{display:flex;flex-direction:column;align-items:center;font-size:11px;color:var(--muted);padding:6px 0;position:relative;
    background:none;border:0;font-family:inherit;cursor:pointer}
  .bottom-nav a span,.bottom-nav button span{font-size:18px;line-height:1.2}
  body:not(.is-product) .chat-fab{display:none}
  .bottom-nav .cart-badge{position:absolute;top:2px;left:55%}
}
@media (min-width:761px){body{padding-bottom:0}}

/* v2：滑动图库 / 醒目提示 / 购买提醒 / 手机底部购买条 */
.pd-slides{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;border-radius:var(--r);background:var(--card);scrollbar-width:none;touch-action:pan-x pan-y;overscroll-behavior-x:contain}
.pd-slides::-webkit-scrollbar{display:none}
.pd-slides img{flex:0 0 100%;width:100%;height:auto;aspect-ratio:1;object-fit:contain;scroll-snap-align:center;user-select:none;-webkit-user-drag:none}
.pd-dots{display:none;justify-content:center;gap:6px;margin-top:8px}
.pd-dots i{width:7px;height:7px;border-radius:50%;background:var(--line);transition:width .2s}
.pd-dots i.on{width:18px;border-radius:4px;background:var(--brand)}
.pd-alert{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#fdecea;color:#b42318;border:1px solid #f6c3bd;font-weight:700;font-size:14px}
:root[data-theme=dark] .pd-alert{background:#3a1715;color:#ffb4a9;border-color:#5c2622}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .pd-alert{background:#3a1715;color:#ffb4a9;border-color:#5c2622}}
.buy-notice{margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--bg);border:1px dashed var(--line);font-size:13px;color:var(--muted);line-height:1.7}
.buy-notice b{color:var(--ink);font-size:13px}
.buy-notice p{margin:4px 0 0;white-space:pre-line}
.buybar{display:none}
@media (max-width:860px){
  .pd-thumbs{display:none}
  .pd-dots{display:flex}
  .pd-buy{padding:16px}
  .pd-buy h1{font-size:18px}
  .actions{grid-template-columns:1fr 1fr}
}
@media (max-width:760px){
  body.is-product .bottom-nav{display:none}
  body.is-product{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  .buybar{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;position:fixed;left:0;right:0;bottom:0;z-index:40;
    background:var(--card);border-top:1px solid var(--line);padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px rgba(16,24,40,.08)}
  .buybar .btn{height:44px;padding:0 14px;font-size:15px;white-space:nowrap}
  .buybar-price{color:var(--accent);font-weight:800;font-size:15px;min-width:0;line-height:1.2}
  .buybar-price b{font-size:22px}
  .buybar-price small{display:block;color:var(--muted);font-weight:400;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media (max-width:360px){.buybar .btn.ghost{display:none}.buybar{grid-template-columns:1fr auto}}

/* v3：手机首屏紧凑 */
.notice-track span{white-space:nowrap}
@media (prefers-reduced-motion:reduce){.notice-track{flex-wrap:nowrap;white-space:nowrap}.notice-track span~span{display:none}}
@media (max-width:560px){
  .notice-bar{font-size:12px}
  .notice-track{padding:5px 12px}
  .hero{margin:12px 0;padding:16px 18px;border-radius:16px;gap:0}
  .hero h1{font-size:19px;margin:4px 0 0}
  .hero-sub,.hero-points{display:none}
  .eyebrow{font-size:12px}
  .filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;margin:12px 0}
  .filters label{min-width:0}
  .filters label>span{display:none}
  .filters .clear{grid-column:1/-1;text-align:center}
  .list-head{margin:4px 2px 10px}
  .list-head h2{font-size:16px}
  .card h3{font-size:13px;margin:8px 10px 4px}
  .tags{margin:0 10px}
  .price{margin:auto 10px 10px;font-size:18px}
}

/* v4：蜜罐 / eSIM 交付 / 在线客服 */
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.fpanel h2{margin-bottom:10px}
.esim-qr{display:flex;justify-content:center;margin:6px 0 10px}
.esim-qr img{width:240px;height:240px;background:#fff;padding:10px;border-radius:14px;border:1px solid var(--line)}
.center{text-align:center}
.small{font-size:13px}
.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-all}
.kv-buyer{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;margin:12px 0}
.kv-buyer dt{color:var(--muted)}
.kv-buyer dd{margin:0;min-width:0}
.copyable{display:flex;gap:8px;align-items:center}
.copyable span{min-width:0;flex:1}
.copyable button{flex:0 0 auto;border:1px solid var(--brand);color:var(--brand);background:none;border-radius:8px;padding:2px 10px;font-size:13px;cursor:pointer}
.fnote{background:var(--brand-soft);border-radius:10px;padding:10px 12px;margin:10px 0 0;white-space:pre-line}

.chat-fab{position:fixed;right:16px;bottom:24px;z-index:45;display:flex;align-items:center;gap:6px;border:0;border-radius:999px;
  background:var(--brand);color:#fff;padding:10px 16px;font:inherit;font-weight:700;box-shadow:0 6px 20px rgba(15,143,122,.35);cursor:pointer}
.chat-fab span{font-size:18px;line-height:1}
.chat-dot{position:absolute;top:4px;right:6px;width:10px;height:10px;border-radius:50%;background:var(--accent);border:2px solid #fff}
body.chat-open .chat-fab{display:none}
.chat-panel{position:fixed;right:16px;bottom:24px;z-index:50;width:360px;height:520px;max-height:calc(100vh - 48px);display:flex;flex-direction:column;
  background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px rgba(16,24,40,.22);overflow:hidden}
.chat-panel[hidden]{display:none}
.chat-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:var(--brand);color:#fff}
.chat-head small{display:block;opacity:.85;font-size:12px;font-weight:400}
.chat-head button{border:0;background:none;color:#fff;font-size:26px;line-height:1;cursor:pointer;padding:0 4px}
.chat-msgs{flex:1;overflow-y:auto;padding:12px;background:var(--bg);display:flex;flex-direction:column;gap:8px;overscroll-behavior:contain}
.cm{display:flex;flex-direction:column;max-width:85%}
.cm-b{padding:8px 12px;border-radius:14px;white-space:pre-wrap;word-break:break-word;line-height:1.55}
.cm time{font-size:11px;color:var(--muted);margin-top:2px}
.cm-visitor{align-self:flex-end;align-items:flex-end}
.cm-visitor .cm-b{background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.cm-admin{align-self:flex-start}
.cm-admin .cm-b{background:var(--card);border:1px solid var(--line);border-bottom-left-radius:4px}
.cm-system{align-self:center;max-width:95%}
.cm-system .cm-b{background:transparent;color:var(--muted);font-size:13px;text-align:center}
.chat-contact{padding:8px 12px 0;background:var(--card)}
.chat-contact input{width:100%;border:1px dashed var(--line);border-radius:8px;padding:7px 10px;font:inherit;font-size:13px;background:var(--bg);color:var(--ink)}
.chat-form{display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--card)}
.chat-form textarea{flex:1;resize:none;border:1px solid var(--line);border-radius:10px;padding:9px 10px;font:inherit;max-height:96px;background:var(--bg);color:var(--ink)}
.chat-form button{border:0;border-radius:10px;background:var(--brand);color:#fff;font-weight:700;padding:0 16px;cursor:pointer}
.chat-form button:disabled{opacity:.6}
@media (max-width:760px){
  .chat-fab{bottom:calc(72px + env(safe-area-inset-bottom));right:12px;padding:9px 13px}
  body.is-product .chat-fab{bottom:calc(84px + env(safe-area-inset-bottom))}
  .chat-panel{inset:0;width:auto;height:auto;max-height:none;border-radius:0;border:0}
  body.chat-open{overflow:hidden}
}

/* v5：电脑端浮动购买条（按钮滚出屏幕时出现） */
@media (min-width:761px){
  .buybar.show{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;position:fixed;left:50%;bottom:16px;z-index:40;
    transform:translateX(-50%);width:min(720px,calc(100% - 32px));background:var(--card);border:1px solid var(--line);border-radius:16px;
    padding:10px 14px;box-shadow:0 10px 30px rgba(16,24,40,.16)}
  .buybar.show .btn{height:42px;padding:0 18px}
  .buybar-price{color:var(--accent);font-weight:800;line-height:1.2}
  .buybar-price b{font-size:22px}
  .buybar-price small{display:block;color:var(--muted);font-weight:400;font-size:12px}
  body.is-product .chat-fab{bottom:24px}
  body.is-product:has(.buybar.show) .chat-fab{bottom:96px}
}

/* 编辑器产物：红字强调、正文插图；后台预览条 */
.prose .em-red{color:#d4380d;font-weight:600}
.prose img{max-width:100%;height:auto;border-radius:8px;display:block;margin:8px auto}
.prose h4{font-size:15px;margin:14px 0 4px}
.preview-bar{position:sticky;top:0;z-index:50;background:#fff4e0;color:#7a4a00;border:1px solid #f0c27a;border-radius:10px;padding:10px 14px;margin:10px 0;font-size:14px}
.preview-bar a{color:#0f8f7a;font-weight:600}

/* v3：顶部菜单 / 分类标签 / 排序 / 卡片副标题与划线价（2026-11） */
.link-btn{background:none;border:0;padding:0;font:inherit;color:var(--ink);cursor:pointer}
.link-btn:hover{color:var(--brand)}
.footer-links{flex-wrap:wrap}
.footer-links .link-btn{color:var(--muted);font-size:13px}
.menu{display:none;position:relative}
.menu summary{list-style:none;cursor:pointer;width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;font-size:18px;color:var(--ink)}
.menu summary::-webkit-details-marker{display:none}
.menu-pop{position:absolute;right:0;top:46px;min-width:180px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column;z-index:50}
.menu-pop a,.menu-pop button{display:block;text-align:left;padding:11px 12px;border-radius:8px;color:var(--ink);font:inherit;font-size:15px;background:none;border:0;cursor:pointer}
.menu-pop a:hover,.menu-pop button:hover{background:var(--bg)}
@media (max-width:760px){.menu{display:block}.topbar-in{gap:10px}}
@media (max-width:1080px) and (min-width:761px){.topnav{gap:12px;font-size:13px}.search{max-width:260px}}
.announce{margin:12px 0;padding:10px 14px;border-radius:12px;background:var(--brand-soft);color:var(--ink);font-size:14px;line-height:1.7}
.announce p{margin:0}
.facets{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:8px 12px;margin:16px 0;display:grid;gap:2px}
.facet{display:flex;align-items:flex-start;gap:10px;padding:5px 0}
.facet+.facet{border-top:1px dashed var(--line)}
.facet-name{flex:0 0 auto;font-size:13px;color:var(--muted);line-height:32px;min-width:2.5em}
.chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.chip{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-size:14px;white-space:nowrap}
.chip small{font-size:11px;color:var(--muted)}
.chip:hover{border-color:var(--brand);color:var(--brand)}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.chip.on small{color:rgba(255,255,255,.8)}
@media (max-width:760px){
  .facets{padding:6px 0 6px 12px}
  .chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-right:12px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .chips::-webkit-scrollbar{display:none}
}
.list-head{flex-wrap:wrap;gap:8px}
.list-head h2 .muted{font-size:13px;font-weight:400}
.sorts{display:flex;gap:4px;flex-wrap:wrap;align-items:center}
.sort{font-size:13px;color:var(--muted);padding:4px 10px;border-radius:999px}
.sort.on{color:var(--brand);background:var(--brand-soft);font-weight:700}
.card-sub{margin:0 12px 6px;font-size:12px;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-foot{margin:auto 12px 12px;padding-top:8px;display:flex;align-items:flex-end;justify-content:space-between;gap:6px;flex-wrap:wrap}
.card-foot .price{margin:0;padding:0}
.price del{font-size:12px;font-weight:400;color:var(--muted);margin-left:6px}
.card-go{font-size:12px;color:var(--brand);border:1px solid var(--brand);border-radius:999px;padding:2px 10px;white-space:nowrap}
@media (max-width:400px){.card-go{display:none}}
/* 推广人数据页 */
.pv-table{width:100%;border-collapse:collapse;font-size:14px;background:var(--card);border-radius:var(--r);overflow:hidden}
.pv-table th,.pv-table td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
.pv-table th:first-child,.pv-table td:first-child{text-align:left}
.pv-wrap{overflow-x:auto;margin:12px 0;border:1px solid var(--line);border-radius:var(--r)}
.pv-link{display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:12px;word-break:break-all}
.rich{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:20px;line-height:1.8;margin:16px 0}

/* v4：商品页左右分栏（左：信息分段随页面滚动；右：结账吸顶）+ 重要提醒 + 服务条款 */
.pd{grid-template-columns:minmax(0,1.45fr) minmax(340px,1fr);gap:20px 24px;
  grid-template-areas:"hero buy" "gal buy" "info buy" "warn buy" ". buy";grid-template-rows:auto auto auto auto 1fr}
.pd-hero{grid-area:hero}.pd-gallery{grid-area:gal;position:static}.pd-buy{grid-area:buy}.pd-info{grid-area:info}.pd-warn{grid-area:warn}
.pd-hero{border-radius:var(--r);padding:22px 24px;color:#fff;background:radial-gradient(120% 140% at 100% 0,#1f7f86 0,#0f4c5c 45%,#0b3442 100%);box-shadow:var(--shadow)}
.pd-hero h1{font-size:clamp(20px,2.4vw,26px);line-height:1.35;margin:0 0 10px;font-weight:800;letter-spacing:.2px}
.pd-hero .tags{margin:0 0 12px}
.pd-hero .tag{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.22)}
.pd-hero .pd-summary{margin:0;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);color:#e8f4f3;font-size:14px;line-height:1.7;display:flex;gap:8px}
.pd-gallery{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:12px}
@media (min-width:861px){.pd-gallery .pd-slides{max-width:520px;margin:0 auto}.pd-thumbs{justify-content:center}}
.pd-buy{position:sticky;top:76px;align-self:start;max-height:calc(100vh - 92px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.pd-buy-head{display:flex;gap:12px;align-items:center;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.pd-buy-head img{width:56px;height:56px;border-radius:10px;object-fit:cover;border:1px solid var(--line);flex:none}
.pd-buy-head b{font-size:16px;line-height:1.4}
.pd-pricebox{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid var(--line);border-radius:12px;padding:8px 12px;margin-bottom:12px;background:var(--bg)}
.pd-pricebox .lbl{font-size:13px;color:var(--muted)}
.pd-pricebox .pd-price{margin:0;font-size:26px;flex:1}
.pd-pricebox .stock{font-size:12px;color:var(--ok)}
.pd-pricebox .stock.out{color:var(--err)}
.terms-line{margin:10px 0 0;text-align:center;font-size:12px;color:var(--muted)}
.terms-line a{color:var(--brand);text-decoration:underline}
.pd-info{display:grid;gap:16px;min-width:0}
.pd-sec{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:20px 22px;box-shadow:var(--shadow);min-width:0}
.pd-sec h2{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:800;margin:0 0 14px}
.pd-sec h2 i{font-style:normal;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-size:16px;flex:none}
.pd-sec .prose{font-size:15px;line-height:1.85;color:var(--ink)}
.pd-sec .prose>:first-child{margin-top:0}
.pd-sec .prose>:last-child{margin-bottom:0}
.pd-sec .prose h2{font-size:17px;margin:20px 0 8px;padding-left:10px;border-left:3px solid var(--brand)}
.pd-sec .prose h3{font-size:15px;margin:16px 0 6px}
.pd-sec .prose strong,.pd-sec .prose b{color:var(--brand)}
.pd-sec .prose ul,.pd-sec .prose ol{padding-left:1.3em}
.pd-sec .prose li{margin:4px 0}
.hl-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hl-grid li{position:relative;padding:12px 12px 12px 38px;border-radius:12px;background:var(--brand-soft);font-size:14px;font-weight:600;line-height:1.55}
.hl-grid li::before{content:"✓";position:absolute;left:12px;top:11px;width:18px;height:18px;border-radius:50%;background:var(--brand);color:#fff;font-size:11px;display:grid;place-items:center}
.pd-warn{display:flex;gap:12px;align-items:flex-start;padding:16px 18px;border-radius:var(--r);background:#fff8e6;border:1px solid #f1d58a;color:#7a4b00;font-size:14px;line-height:1.75}
.pd-warn b{color:#5c3800;font-size:15px}
.pd-warn p{margin:4px 0 0}
.pd-warn-ico{flex:none;width:32px;height:32px;border-radius:9px;background:#fdecc0;display:grid;place-items:center;font-size:16px}
:root[data-theme=dark] .pd-warn{background:#2e2410;border-color:#5a4416;color:#f3d48f}
:root[data-theme=dark] .pd-warn b{color:#ffe2a3}
:root[data-theme=dark] .pd-warn-ico{background:#4a3a14}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .pd-warn{background:#2e2410;border-color:#5a4416;color:#f3d48f}
  :root:not([data-theme=light]) .pd-warn b{color:#ffe2a3}:root:not([data-theme=light]) .pd-warn-ico{background:#4a3a14}}
@media (max-width:860px){
  .pd{grid-template-columns:minmax(0,1fr);grid-template-areas:"hero" "gal" "buy" "info" "warn";grid-template-rows:none;gap:14px}
  .pd-buy{position:static;max-height:none;overflow:visible}
  .pd-buy-head{display:none}
  .pd-hero{padding:18px}
  .pd-gallery{padding:0;border:0;background:none}
  .pd-sec{padding:16px}
  .pd-sec h2{font-size:17px}
  .hl-grid{grid-template-columns:minmax(0,1fr)}
}
.narrow:has(.rich){max-width:780px}
/* 电脑端：结账栏吸顶，合计 + 按钮 + 条款固定在结账栏底部，始终看得到，不再用浮动购买条 */
@media (min-width:861px){
  .buybar.show{display:none}
  body.is-product:has(.buybar.show) .chat-fab{bottom:24px}
  .pd-buy-foot{position:sticky;bottom:-20px;z-index:2;background:var(--card);margin:0 -20px -20px;padding:4px 20px 14px;border-top:1px solid var(--line);box-shadow:0 -8px 16px -12px rgba(16,24,40,.25)}
  .pd-buy-foot .pd-total{border-top:0;margin-top:0}
  .pd-gallery .pd-slides{max-width:440px}
}
