/* 酒界网 · H5 商城  移动端样式（红金质感） */
:root{
  --red:#c0182b; --red-deep:#8e0f1d; --gold:#d4af37; --gold-soft:#e8c96a;
  --ink:#1f1414; --muted:#8a7a7a; --bg:#f7f3ee; --card:#ffffff; --line:#efe4d8;
}
*{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(--ink); max-width:480px; margin:0 auto;
  min-height:100vh; padding-bottom:64px;
}
.app-bar{
  position:sticky; top:0; z-index:20; background:linear-gradient(135deg,var(--red),var(--red-deep));
  color:#fff; padding:14px 16px; display:flex; align-items:center; justify-content:space-between;
}
.app-bar .brand{font-size:18px; font-weight:800; letter-spacing:1px;}
.app-bar .brand span{color:var(--gold-soft);}
.app-bar .me{font-size:13px; background:rgba(255,255,255,.18); padding:6px 12px; border-radius:20px;}
.hero{
  margin:14px; padding:22px 18px; border-radius:18px; color:#fff;
  background:linear-gradient(135deg,var(--red),var(--gold)); text-align:center;
}
.hero h1{margin:0 0 6px; font-size:22px;}
.hero p{margin:0; opacity:.95; font-size:13px;}
.section-title{margin:18px 16px 10px; font-size:16px; font-weight:800;}
.section-title small{color:var(--muted); font-weight:400; font-size:12px; margin-left:6px;}

.grid{display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:0 14px;}
.card{
  background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; transition:transform .2s, box-shadow .2s;
}
.card:active{transform:scale(.98);}
.card{position:relative;}
.card .thumb{height:120px; background:#f0e6da center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size:40px;}
.badge-normal{position:absolute; top:8px; left:8px; z-index:2; background:linear-gradient(135deg,var(--gold),#b8902a); color:#fff; font-size:10px; font-weight:700; padding:3px 9px; border-radius:10px; box-shadow:0 2px 6px rgba(0,0,0,.18);}
.card .body{padding:10px 12px; flex:1; display:flex; flex-direction:column;}
.card .name{font-size:14px; font-weight:700; line-height:1.3;}
.card .price{color:var(--red); font-weight:800; margin:6px 0; font-size:16px;}
.card .price small{color:var(--muted); font-weight:400; font-size:11px;}
.btn{
  border:none; border-radius:24px; padding:11px 16px; font-size:14px; font-weight:700;
  background:linear-gradient(135deg,var(--red),var(--red-deep)); color:#fff; cursor:pointer; width:100%;
  transition:opacity .2s;
}
.btn:active{opacity:.85;}
.btn.gold{background:linear-gradient(135deg,var(--gold),#b8902a);}
.btn.ghost{background:#fff; color:var(--red); border:1px solid var(--red);}
.btn:disabled{opacity:.5;}

/* 会员中心 */
.panel{margin:14px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px;}
.panel h3{margin:0 0 12px; font-size:15px;}
.kv{display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--line); font-size:13px;}
.kv:last-child{border-bottom:none;}
.kv .k{color:var(--muted);}
.kv .v{font-weight:700;}
.invite-box{background:linear-gradient(135deg,#fff7e8,#fdeccb); border:1px dashed var(--gold); border-radius:14px; padding:14px; text-align:center; margin-bottom:12px;}
.invite-box .code{font-size:26px; font-weight:900; color:var(--red); letter-spacing:3px;}
.invite-box .link{font-size:11px; color:var(--muted); word-break:break-all; margin-top:6px;}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px;}
.stat{background:var(--bg); border-radius:12px; padding:12px; text-align:center;}
.stat .n{font-size:20px; font-weight:900; color:var(--red);}
.stat .t{font-size:11px; color:var(--muted); margin-top:2px;}
.list-item{display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line); font-size:13px;}
.list-item:last-child{border-bottom:none;}
.tag{font-size:10px; padding:2px 7px; border-radius:10px; background:#fbe7e9; color:var(--red);}
.tag.g{background:#fcf3d8; color:#9a7415;}

/* 模态 */
.mask{position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:50; display:none; align-items:center; justify-content:center; padding:20px;}
.mask.show{display:flex;}
.modal{background:#fff; border-radius:18px; width:100%; max-width:340px; padding:20px;}
.modal h3{margin:0 0 14px; text-align:center; font-size:17px;}
.field{margin-bottom:12px;}
.field input{width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px;}
.field .hint{font-size:11px; color:var(--muted); margin-top:4px;}
/* 验证码行 */
.code-row{display:flex; gap:8px; align-items:flex-start; flex-wrap:wrap;}
.code-input{flex:1; min-width:130px;}
.code-input input{width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; box-sizing:border-box;}
.code-btn{flex:0 0 auto; width:auto; padding:11px 14px; font-size:13px; white-space:nowrap;}
.code-btn:disabled{opacity:.55; cursor:not-allowed;}
.code-row .hint{width:100%;}
.tabs{display:flex; gap:8px; margin-bottom:14px;}
.tabs button{flex:1; padding:8px; border:1px solid var(--line); background:#fff; border-radius:10px; font-size:13px; color:var(--muted);}
.tabs button.on{background:var(--red); color:#fff; border-color:var(--red);}
.toast{position:fixed; left:50%; bottom:80px; transform:translateX(-50%); background:rgba(0,0,0,.85); color:#fff; padding:10px 18px; border-radius:22px; font-size:13px; z-index:99; opacity:0; transition:opacity .25s; pointer-events:none;}
.toast.show{opacity:1;}

/* 底部导航 */
.tabbar{position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; display:flex; background:#fff; border-top:1px solid var(--line); z-index:30;}
.tabbar a{flex:1; text-align:center; padding:8px 0; font-size:12px; color:var(--muted); text-decoration:none;}
.tabbar a.on{color:var(--red); font-weight:700;}
.tabbar a .ic{font-size:18px; display:block;}

.hidden{display:none !important;}
.admin-entry{text-align:center; font-size:12px; color:var(--muted); margin:18px 0 4px;}

/* 产品详情页 */
.pd-bar{position:sticky; top:0; z-index:20; background:linear-gradient(135deg,var(--red),var(--red-deep)); color:#fff; height:48px; display:flex; align-items:center; justify-content:center; padding:0 14px;}
.pd-bar .pd-back{position:absolute; left:14px; font-size:15px; cursor:pointer; line-height:1;}
.pd-bar .pd-bar-t{font-size:16px; font-weight:800; letter-spacing:1px;}
.pd-hero{position:relative; margin:14px; border-radius:18px; overflow:hidden; background:#f0e6da;}
.pd-hero .pd-img{height:300px; background:center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size:80px;}
.pd-hero .badge-member{position:absolute; top:10px; left:10px; z-index:2; background:linear-gradient(135deg,var(--red),var(--red-deep)); color:#fff; font-size:11px; font-weight:700; padding:4px 10px; border-radius:12px; box-shadow:0 2px 6px rgba(0,0,0,.2);}
.pd-info{margin:0 16px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px;}
.pd-info .pd-name{font-size:19px; font-weight:800;}
.pd-info .pd-price{color:var(--red); font-weight:800; font-size:22px; margin:8px 0;}
.pd-info .pd-price small{color:var(--muted); font-weight:400; font-size:12px;}
.pd-info .pd-desc{font-size:13px; color:var(--muted); line-height:1.6;}
.pd-detail{margin:16px;}
.pd-rich{font-size:14px; line-height:1.8; color:var(--ink); word-break:break-word;}
.pd-rich img{max-width:100%; border-radius:10px; margin:6px 0;}
.pd-rich h1,.pd-rich h2,.pd-rich h3{color:var(--red); margin:14px 0 8px;}
.pd-buybar{position:sticky; bottom:0; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); background:rgba(255,255,255,.96); border-top:1px solid var(--line); backdrop-filter:blur(6px);}
.admin-entry a{color:var(--gold);}
