:root { color-scheme: light; --orange:#ff4b10; --rose:#ff7ca8; --ink:#171717; --muted:#777b84; --line:#edf0f4; --page:#f5f6f8; --shadow:0 10px 30px rgba(36,41,54,.08); }
* { box-sizing: border-box; }
html, body { margin:0; min-height:100%; background:var(--page); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
button, input, textarea, select { font:inherit; }
button { cursor:pointer; border:0; background:transparent; color:inherit; }
svg { width:1.35rem; height:1.35rem; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.phone-shell { position:relative; width:min(100vw,460px); min-height:100vh; margin:0 auto; background:#fff; overflow:clip; box-shadow:0 0 0 1px rgba(0,0,0,.04); }
.view { display:none; min-height:100vh; padding-bottom:calc(82px + env(safe-area-inset-bottom)); background:var(--page); }
.phone-shell[data-view="product"] .product-view,.phone-shell[data-view="checkout"] .checkout-view,.phone-shell[data-view="payment"] .payment-view,.phone-shell[data-view="shop"] .shop-view { display:block; }
.phone-shell[data-view="service"] .service-view { display:flex; }
.phone-shell[data-view="home"] .home-view { display:flex; flex-direction:column; min-height:100vh; }
/* product view float-back button */
.float-back { position:absolute; left:17px; top:18px; width:44px; height:44px; border-radius:50%; display:grid; place-items:center; color:#fff; background:rgba(54,58,64,.58); backdrop-filter:blur(8px); z-index:5; }
.float-back svg { width:22px; height:22px; }
.hero-wrap { position:relative; background:#fff; padding:14px 14px 0; }
.product-image { display:block; width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:2px; background:#ffe0d2; }
.float-cart { position:absolute; right:17px; top:18px; width:54px; height:54px; border-radius:50%; display:grid; place-items:center; color:#fff; background:rgba(54,58,64,.58); backdrop-filter:blur(8px); }
.float-cart svg { width:29px; height:29px; }
.pager { position:absolute; right:16px; bottom:68px; min-width:44px; height:34px; display:grid; place-items:center; border-radius:20px; background:rgba(70,73,79,.55); color:#fff; font-size:14px; }
.thumb-row { height:80px; display:flex; align-items:center; justify-content:flex-start; gap:8px; padding:10px 14px; background:#fff; border-bottom:1px solid var(--line); }
.thumb-row .next-thumb { margin-left:auto; }
.thumb { width:56px; height:56px; border:2px solid var(--orange); border-radius:9px; overflow:hidden; background:#fff; padding:0; }
.thumb img { width:100%; height:100%; object-fit:cover; }
.next-thumb { color:#a2a6ae; padding:12px; }
.price-card { position:relative; margin:0; padding:18px 20px 22px; min-height:76px; background:#fff; border-radius:0 0 14px 14px; }
.price-line { color:#e41d08; display:flex; align-items:baseline; gap:4px; }
.price-line span { font-size:18px; }
.price-line strong { font-size:34px; line-height:1; font-weight:500; }
.price-line em { color:#d53e2b; font-style:normal; font-size:13px; }
.summary-panel { margin-top:10px; padding:0 14px; background:#fff; }
.summary-panel div { display:flex; gap:14px; align-items:center; min-height:54px; border-bottom:1px solid var(--line); }
.summary-panel span { color:var(--muted); }
.summary-panel strong { font-size:15px; font-weight:600; }
.bottom-actions { position:fixed; left:50%; bottom:0; z-index:20; transform:translateX(-50%); width:min(100vw,460px); height:calc(68px + env(safe-area-inset-bottom)); padding:8px 12px calc(8px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:50px 50px 50px 1fr 1fr; gap:8px; align-items:center; background:#fff; box-shadow:0 -8px 20px rgba(24,30,38,.08); }
.icon-action { height:52px; display:grid; place-items:center; gap:2px; color:#5d626c; font-size:12px; }
.icon-action:first-child { color:var(--orange); }
.icon-action svg { width:23px; height:23px; }
.cart-button,.order-button { height:52px; border-radius:999px; font-weight:800; font-size:16px; }
.cart-button { background:#ffe8e3; color:#f04b17; }
.order-button { background:var(--orange); color:#fff; box-shadow:0 8px 18px rgba(255,75,16,.22); }
.page-header { position:sticky; top:0; z-index:10; height:58px; display:grid; grid-template-columns:54px 1fr 54px; align-items:center; background:rgba(255,255,255,.94); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.page-header h1 { margin:0; text-align:center; font-size:18px; }
.back-button { height:54px; display:grid; place-items:center; color:#30343b; }
.form-card,.order-brief,.submit-state { margin:12px; background:#fff; border-radius:12px; box-shadow:var(--shadow); }
.form-card { padding:16px; display:grid; gap:13px; }
.form-card h2 { margin:0 0 2px; font-size:18px; }
.form-card label { display:grid; gap:7px; color:#4c515a; font-size:14px; font-weight:700; }
.form-card input,.form-card textarea,.form-card select { width:100%; border:1px solid #dde2ea; border-radius:9px; background:#fbfcfe; min-height:46px; padding:11px 12px; color:#14171c; outline:none; }
.form-card input[readonly] { background:#f3f5f8; color:#30343b; }
.form-card textarea { resize:vertical; line-height:1.45; }
.form-card input:focus,.form-card textarea:focus,.form-card select:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(255,75,16,.12); }
.grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
/* channel tabs */
.channel-tabs { display:flex; gap:8px; margin-bottom:4px; }
.channel-tab { flex:1; height:44px; border:2px solid #e2e5ed; border-radius:10px; background:#fff; font-size:14px; font-weight:700; cursor:pointer; color:var(--muted); transition:all .15s; }
.channel-tab.active { border-color:var(--orange); color:var(--orange); background:#fff6f3; }
.price-mode-tabs { display:flex; gap:6px; margin-top:10px; }
.price-mode-tab { flex:1; height:34px; border:1.5px solid #e2e5ed; border-radius:8px; background:#fff; font-size:13px; font-weight:600; cursor:pointer; color:var(--muted); transition:all .15s; }
.price-mode-tab.active { border-color:var(--orange); color:var(--orange); background:#fff6f3; }
#codPriceNote { display:block; margin-top:6px; font-size:12px; color:var(--muted); }
.cod-note { margin:4px 0; padding:14px; background:#f0faf3; border:1px solid #b7e4c7; border-radius:10px; color:#276e47; font-size:14px; line-height:1.6; }
#codFeeNote { font-size:12px; color:var(--muted); margin-left:4px; font-weight:400; }
.otp-row { display:flex; gap:8px; align-items:stretch; }
.otp-row input { flex:1; min-width:0; }
.otp-btn { flex-shrink:0; white-space:nowrap; padding:0 12px; background:var(--orange); color:#fff; border:none; border-radius:10px; font-size:12px; font-weight:600; cursor:pointer; height:44px; }
.otp-btn:disabled { background:#c8ccd6; cursor:not-allowed; }
/* language bar */
.lang-bar { position:sticky; top:0; z-index:200; display:flex; justify-content:flex-end; gap:4px; padding:5px 12px; background:rgba(255,255,255,.92); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.lang-btn { padding:3px 12px; border-radius:20px; border:1.5px solid #e2e5ed; background:#fff; font-size:12px; font-weight:700; cursor:pointer; color:var(--muted); transition:all .15s; }
.lang-btn.active { border-color:var(--orange); color:var(--orange); background:#fff6f3; }
.order-brief { padding:12px; display:flex; gap:12px; align-items:center; }
.order-brief img { width:82px; height:82px; object-fit:cover; border-radius:8px; }
.order-brief div { display:grid; gap:6px; min-width:0; }
.order-brief strong { font-size:16px; }
.order-brief span { color:var(--muted); font-size:13px; }
.order-brief em { color:#e41d08; font-style:normal; font-size:19px; font-weight:800; }
.checkout-footer { position:fixed; left:50%; bottom:0; z-index:20; transform:translateX(-50%); width:min(100vw,460px); height:calc(68px + env(safe-area-inset-bottom)); padding:8px 12px calc(8px + env(safe-area-inset-bottom)); display:flex; align-items:center; justify-content:space-between; gap:16px; background:#fff; box-shadow:0 -8px 20px rgba(24,30,38,.08); }
.checkout-footer div { color:#4f545e; }
.checkout-footer strong { color:#e41d08; font-size:22px; }
.checkout-footer .order-button { min-width:150px; padding:0 24px; }
.payment-card { margin-top:16px; }
.check-line { grid-template-columns:22px 1fr; align-items:center; gap:9px!important; font-size:13px!important; font-weight:600!important; }
.check-line input { width:20px; min-height:20px; accent-color:var(--orange); }
.safe-note { margin:-4px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }

/* 店铺页 */
.shop-banner { height:160px; background:linear-gradient(135deg,#ff7ca8 0%,#ff4b10 60%,#ff8c42 100%); }
.shop-info-card { display:flex; align-items:center; gap:12px; padding:14px 16px; background:#fff; border-bottom:1px solid var(--line); }
.shop-avatar { width:52px; height:52px; border-radius:50%; background:var(--orange); display:grid; place-items:center; color:#fff; flex-shrink:0; margin-top:-28px; border:3px solid #fff; box-shadow:0 4px 12px rgba(255,75,16,.25); }
.shop-avatar svg { width:24px; height:24px; }
.shop-meta { flex:1; }
.shop-meta strong { display:block; font-size:16px; font-weight:700; }
.shop-meta span { font-size:12px; color:var(--muted); margin-top:4px; display:block; }
.shop-follow-btn { flex-shrink:0; height:34px; padding:0 18px; border-radius:999px; background:var(--orange); color:#fff; font-size:13px; font-weight:700; }
.shop-tabs { display:flex; background:#fff; border-bottom:1px solid var(--line); }
.shop-tabs button { flex:1; height:46px; font-size:15px; font-weight:600; color:var(--muted); position:relative; }
.shop-tabs button.active { color:var(--ink); }
.shop-tabs button.active::after { content:""; position:absolute; left:50%; bottom:0; width:28px; height:3px; border-radius:3px; transform:translateX(-50%); background:var(--orange); }
.shop-goods-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:12px; padding-bottom:calc(12px + 82px + env(safe-area-inset-bottom)); }
.shop-good-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:var(--shadow); }
.shop-good-img { height:140px; background:linear-gradient(145deg,#ffe8e3,#ffd5cc); }
.shop-good-name { padding:8px 10px 2px; font-size:13px; font-weight:600; }
.shop-good-price { padding:4px 10px 10px; font-size:14px; font-weight:700; color:#e41d08; }

/* 客服聊天 */
.service-view { flex-direction:column; padding-bottom:0; }
.chat-body { flex:1; overflow-y:auto; padding:14px 12px 80px; display:flex; flex-direction:column; gap:14px; }
.chat-notice { text-align:center; font-size:12px; color:var(--muted); background:#f0f2f6; border-radius:999px; padding:5px 14px; align-self:center; }
.chat-row { display:flex; gap:10px; align-items:flex-start; }
.chat-row.user { flex-direction:row-reverse; }
.chat-avatar { width:38px; height:38px; border-radius:50%; background:var(--orange); display:grid; place-items:center; color:#fff; flex-shrink:0; }
.chat-avatar svg { width:20px; height:20px; }
.chat-bubble { max-width:75%; padding:11px 14px; border-radius:14px; font-size:14px; line-height:1.6; background:#fff; box-shadow:0 2px 8px rgba(24,30,38,.07); }
.chat-row.user .chat-bubble { background:var(--orange); color:#fff; }
.chat-quick-btns { display:flex; flex-wrap:wrap; gap:8px; padding-left:48px; }
.chat-quick-btns button { height:32px; padding:0 12px; border-radius:999px; border:1px solid #dde2ea; font-size:13px; background:#fff; color:#30343b; }
.chat-quick-btns button:active { background:#f5f6f8; }
.chat-input-bar { position:fixed; left:50%; bottom:0; transform:translateX(-50%); width:min(100vw,460px); padding:10px 12px calc(10px + env(safe-area-inset-bottom)); display:flex; gap:8px; background:#fff; border-top:1px solid var(--line); box-shadow:0 -4px 12px rgba(24,30,38,.06); z-index:20; }
.chat-input { flex:1; height:42px; border:1px solid #dde2ea; border-radius:999px; padding:0 16px; font-size:14px; outline:none; background:#f7f8fa; }
.chat-input:focus { border-color:var(--orange); background:#fff; }
.chat-send-btn { flex-shrink:0; height:42px; padding:0 18px; border-radius:999px; background:var(--orange); color:#fff; font-size:14px; font-weight:700; }

/* 收藏 Toast */
.fav-toast { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%) scale(.8); background:rgba(22,24,30,.82); color:#fff; border-radius:16px; padding:18px 28px; display:flex; flex-direction:column; align-items:center; gap:10px; font-size:15px; font-weight:700; pointer-events:none; opacity:0; transition:opacity .2s,transform .2s; z-index:200; backdrop-filter:blur(6px); }
.fav-toast svg { width:36px; height:36px; stroke:#ff7ca8; fill:#ff7ca8; }
.fav-toast.show { opacity:1; transform:translate(-50%,-50%) scale(1); }
.submit-state { min-height:0; padding:0 14px; color:#146c43; font-weight:700; transition:all .2s ease; }
.submit-state:not(:empty) { padding:14px; min-height:48px; }
.submit-state.error { color:#b42318; }
.copy-order-wrap { display:flex; align-items:center; gap:10px; margin:0 12px 12px; padding:12px 14px; background:#f0faf4; border-radius:10px; border:1px solid #b7eacb; }
.copy-order-wrap[hidden] { display:none !important; }
.copy-order-id { flex:1; font-size:13px; color:#0f6f37; font-weight:600; word-break:break-all; }
.copy-order-btn { flex-shrink:0; height:34px; padding:0 14px; border-radius:8px; background:var(--orange); color:#fff; font-size:13px; font-weight:700; border:0; cursor:pointer; }
.copy-order-btn:active { opacity:.8; }
@media (max-width:360px) { .bottom-actions { grid-template-columns:42px 42px 42px 1fr 1fr; gap:5px; padding-inline:8px; } .cart-button,.order-button { font-size:14px; } .grid-3 { grid-template-columns:1fr; } }

/* ===== HOME VIEW ===== */
.home-view { background:var(--page); padding-bottom:0; min-height:unset; height:calc(100vh - 34px); overflow:hidden; flex-direction:column; }
.home-search-bar { padding:10px 12px 12px; background:linear-gradient(135deg,#ff5e2f 0%,#ff8fa3 100%); display:flex; gap:8px; align-items:center; flex-shrink:0; }
.search-wrap { flex:1; display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.94); border-radius:999px; padding:7px 14px; }
.search-wrap svg { width:16px; height:16px; color:#999; flex-shrink:0; }
.search-input { flex:1; border:0; background:transparent; outline:none; font-size:14px; color:#333; min-width:0; }
.search-input::placeholder { color:#aaa; }
.search-btn { padding:8px 16px; background:#fff; color:var(--orange); font-weight:800; font-size:14px; border-radius:999px; white-space:nowrap; flex-shrink:0; }
.home-cats { display:grid; grid-template-columns:repeat(5,1fr); background:#fff; padding:6px 4px 4px; margin-bottom:8px; flex-shrink:0; }
.cat-item { display:flex; flex-direction:column; align-items:center; gap:4px; padding:4px 2px; }
.cat-icon { width:40px; height:40px; border-radius:50%; display:grid; place-items:center; font-size:20px; }
.cat-item span { font-size:11px; color:#444; text-align:center; }
.flash-card { background:#fff; border-radius:14px; margin:0 8px 0; padding:12px; box-shadow:var(--shadow); overflow:hidden; flex:1; display:flex; flex-direction:column; min-height:0; }
.flash-header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.flash-brand { font-size:17px; font-weight:900; color:#111; letter-spacing:-.3px; }
.flash-timer { flex:1; font-size:14px; font-weight:700; color:#333; font-variant-numeric:tabular-nums; letter-spacing:2px; background:#111; color:#fff; padding:3px 10px; border-radius:6px; display:inline-block; }
.flash-more { font-size:13px; color:var(--muted); flex-shrink:0; }
.flash-list { display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; flex:1; }
.flash-list::-webkit-scrollbar { display:none; }
.flash-item { flex-shrink:0; width:136px; text-align:left; position:relative; border-radius:10px; padding:0; background:transparent; display:flex; flex-direction:column; }
.flash-item img { width:136px; flex:1; min-height:100px; object-fit:cover; border-radius:10px; display:block; }
.flash-badge { position:absolute; top:0; left:0; background:#e31c44; color:#fff; font-size:11px; font-weight:800; padding:3px 7px; border-radius:10px 0 10px 0; }
.flash-price { color:var(--orange); font-size:14px; font-weight:600; margin-top:6px; }
.flash-price strong { font-size:19px; font-weight:800; }
.flash-orig { font-size:12px; color:#bbb; text-decoration:line-through; }
.flash-tag { display:inline-block; background:#ffe9ea; color:#e31c44; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; margin-top:4px; }
.home-section-hd { padding:12px 14px 6px; font-size:17px; font-weight:800; color:#111; }
.home-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 8px 8px; }
.home-good { text-align:left; border-radius:12px; overflow:hidden; background:#fff; box-shadow:var(--shadow); padding:0; }
.home-good img { width:100%; aspect-ratio:1/1; object-fit:cover; display:block; }
.home-good-info { padding:8px 10px 10px; }
.home-good-info p { margin:0 0 5px; font-size:13px; color:#222; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.home-good-price { font-size:14px; color:var(--orange); font-weight:600; display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.home-good-price strong { font-size:18px; font-weight:800; }
.hg-badge { background:linear-gradient(90deg,#e31c44,#ff5e2f); color:#fff; font-size:10px; font-weight:800; padding:2px 5px; border-radius:4px; }
.home-good-sub { font-size:12px; color:#999; margin-top:3px; }
.home-nav { position:sticky; bottom:0; z-index:50; background:#fff; border-top:1px solid var(--line); display:grid; grid-template-columns:repeat(4,1fr); padding-bottom:env(safe-area-inset-bottom); flex-shrink:0; margin-top:8px; }
.home-nav-item { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:11px; color:var(--muted); height:58px; }
.home-nav-item svg { width:22px; height:22px; }
.home-nav-item.active { color:var(--orange); }

/* privacy badges */
.privacy-badges { margin-top:10px; background:#fff; padding:4px 14px 6px; display:grid; grid-template-columns:1fr 1fr; gap:0; }
.privacy-badge { display:flex; align-items:flex-start; gap:9px; padding:12px 8px 12px 0; border-bottom:1px solid var(--line); }
.privacy-badge:nth-child(odd) { border-right:1px solid var(--line); padding-right:14px; }
.privacy-badge:nth-child(even) { padding-left:14px; }
.privacy-badge:nth-last-child(-n+2) { border-bottom:0; }
.privacy-badge svg { width:20px; height:20px; flex-shrink:0; stroke:var(--orange); margin-top:2px; }
.privacy-badge strong { display:block; font-size:13px; font-weight:700; color:#1a1d23; margin-bottom:2px; }
.privacy-badge span { font-size:11px; color:var(--muted); line-height:1.4; }