:root{--p:#6d28d9;--p2:#8b5cf6;--p-dark:#3b0764;--bg:#f6f4fb;--card:#fff;--text:#1f1633;--muted:#8b8496;--line:#eee7f7;--price:#d81b60;--ok:#0a7f4b;--warn:#b45309}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text);padding-bottom:calc(64px + env(safe-area-inset-bottom))}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
.m-top{position:sticky;top:0;z-index:40;background:linear-gradient(135deg,#3b0764,#6d28d9 55%,#a855f7);color:#fff;padding:14px 14px 12px}
.m-top .bar{display:flex;align-items:center;gap:10px}
.m-top .store{font-size:17px;font-weight:900;line-height:1.25}
.m-top .sub{font-size:11px;opacity:.85;margin-top:3px}
.m-top .back{font-size:22px;line-height:1;opacity:.9}
.m-search{display:flex;gap:8px;margin-top:12px}
.m-search input{flex:1;height:38px;border:0;border-radius:12px;padding:0 12px;font-size:13px;background:rgba(255,255,255,.96);color:#333;outline:none}
.m-search button{height:38px;border:0;border-radius:12px;padding:0 14px;background:#fff;color:var(--p);font-weight:800;font-size:13px}
.m-wrap{max-width:720px;margin:0 auto;padding:12px 12px 18px}
.m-banner{background:linear-gradient(120deg,#ede9fe,#fce7f3);border-radius:16px;padding:14px;margin-bottom:10px}
.m-banner b{font-size:15px}.m-banner p{margin:6px 0 0;font-size:11px;color:#6b5b7d;line-height:1.6}
.m-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:none}
.m-chips::-webkit-scrollbar{display:none}
.m-chip{flex:0 0 auto;padding:7px 12px;border-radius:999px;background:#fff;border:1px solid var(--line);color:#5b2a86;font-size:12px}
.m-chip.on{background:var(--p);border-color:var(--p);color:#fff;font-weight:800}
.m-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.m-card{background:var(--card);border-radius:15px;overflow:hidden;box-shadow:0 4px 16px rgba(60,20,100,.06);display:flex;flex-direction:column}
.m-thumb{height:132px;display:flex;align-items:center;justify-content:center;font-size:38px;font-weight:900;color:#fff;position:relative;letter-spacing:1px}
.m-thumb:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(0,0,0,.08))}
.m-info{padding:9px 10px 10px;display:flex;flex-direction:column;flex:1}
.m-name{font-size:13px;font-weight:800;line-height:1.35;min-height:36px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.m-spec{font-size:10px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-price{color:var(--price);font-weight:900;font-size:17px;margin-top:6px}
.m-price small{font-size:10px;font-weight:400;color:var(--muted);margin-left:3px}
.m-stock{font-size:10px;color:var(--p);margin-top:2px}
.m-add{margin-top:8px;height:32px;border:0;border-radius:9px;background:var(--p);color:#fff;font-size:12px;font-weight:800}
.m-add:active{transform:scale(.98)}
.m-empty{background:#fff;border-radius:14px;padding:34px 18px;text-align:center;color:var(--muted);font-size:13px;line-height:1.8}
.m-bottom{position:fixed;left:0;right:0;bottom:0;z-index:60;background:#fff;border-top:1px solid var(--line);display:flex;padding:6px 0 calc(6px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px rgba(60,20,100,.07)}
.m-tab{flex:1;text-align:center;font-size:10px;color:#8b8496;padding:5px 0;position:relative}
.m-tab .ico{font-size:20px;display:block;line-height:1.25}
.m-tab.on{color:var(--p);font-weight:900}
.m-badge{position:absolute;top:0;right:calc(50% - 22px);background:var(--price);color:#fff;font-size:9px;min-width:16px;height:16px;border-radius:8px;line-height:16px;padding:0 4px;display:none}
.m-toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(10px);background:rgba(31,22,51,.94);color:#fff;padding:9px 14px;border-radius:10px;font-size:12px;opacity:0;transition:.2s;z-index:99;pointer-events:none;max-width:80%;text-align:center}
.m-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
/* 详情 */
.m-detail-thumb{height:260px;display:flex;align-items:center;justify-content:center;font-size:76px;color:#fff;font-weight:900}
.m-panel{background:#fff;border-radius:16px;padding:15px;margin:10px 12px;box-shadow:0 4px 16px rgba(60,20,100,.05)}
.m-detail-title{font-size:20px;font-weight:900;line-height:1.3}
.m-detail-sub{font-size:12px;color:var(--muted);margin-top:6px}
.m-detail-price{font-size:28px;color:var(--price);font-weight:900;margin-top:10px}
.m-kv{font-size:13px;color:#4b3f5c;line-height:2;margin-top:8px}
.m-kv span{color:var(--muted)}
.m-qty{display:flex;align-items:center;gap:10px;margin-top:14px}
.m-qty button{width:36px;height:36px;border-radius:10px;border:1px solid var(--line);background:#fff;font-size:18px}
.m-qty input{width:56px;height:36px;text-align:center;border:1px solid var(--line);border-radius:10px;font-size:14px}
.m-buybar{position:fixed;left:0;right:0;bottom:0;z-index:70;background:#fff;border-top:1px solid var(--line);display:flex;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px rgba(60,20,100,.07)}
.m-buybar a,.m-buybar button{flex:1;height:46px;border:0;border-radius:12px;font-size:14px;font-weight:900;display:flex;align-items:center;justify-content:center}
.m-buybar .ghost{background:#f3e8ff;color:var(--p)}
.m-buybar .main{background:var(--p);color:#fff}
/* 购物车 */
.m-line{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.m-line:last-child{border-bottom:0}
.m-line .li{flex:1;min-width:0}
.m-line .ln{font-size:13px;font-weight:800;line-height:1.35}
.m-line .lp{color:var(--price);font-weight:900;margin-top:3px;font-size:13px}
.m-step{display:flex;align-items:center;gap:5px}
.m-step button{width:28px;height:28px;border:1px solid var(--line);background:#fff;border-radius:8px;font-size:15px}
.m-step input{width:40px;height:28px;text-align:center;border:1px solid var(--line);border-radius:8px}
.m-del{width:28px;height:28px;border:0;background:#fff1f2;color:#c62828;border-radius:8px;font-size:11px}
.m-field{width:100%;height:42px;border:1px solid var(--line);border-radius:11px;padding:0 11px;font-size:13px;margin-bottom:9px;background:#fff}
textarea.m-field{height:66px;padding:10px 11px;resize:none}
.m-checkout{margin-top:10px}
.m-total{display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:10px 0}
.m-total b{color:var(--price);font-size:22px}
.m-submit{width:100%;height:46px;border:0;border-radius:12px;background:var(--p);color:#fff;font-size:15px;font-weight:900}
/* 订单 */
.m-order{background:#fff;border-radius:14px;padding:14px;margin-bottom:10px;box-shadow:0 4px 16px rgba(60,20,100,.05);display:block}
.m-order .top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.m-order .no{font-size:12px;color:var(--muted)}
.m-order .st{font-size:11px;font-weight:900;color:var(--p);background:#f3e8ff;border-radius:7px;padding:3px 8px;white-space:nowrap}
.m-order .items{font-size:12px;color:#5f546b;margin-top:8px;line-height:1.7}
.m-order .amt{color:var(--price);font-weight:900;font-size:18px;margin-top:6px}
.m-timeline{display:flex;justify-content:space-between;margin-top:14px}
.m-timeline div{flex:1;text-align:center;font-size:10px;color:#b3aabf;position:relative}
.m-timeline div:before{content:"";display:block;width:8px;height:8px;border-radius:50%;background:#ddd;margin:0 auto 5px}
.m-timeline div.on{color:var(--p);font-weight:800}
.m-timeline div.on:before{background:var(--p)}
.m-loading{padding:8px 0;text-align:center;color:var(--muted);font-size:11px}
@media(max-width:340px){.m-grid{grid-template-columns:1fr}.m-thumb{height:150px}}
