:root{--red:#E53E3E;--banner-from:#F6AD55;--banner-to:#E53E3E;--dark:#1A202C;--muted:#718096;--white:#fff;--shadow:0 4px 14px rgba(26,32,44,.08)}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;background:#f7fafc;color:var(--dark)}
.header{background:var(--white);display:flex;align-items:center;justify-content:space-between;padding:16px 24px;max-width:1280px;margin:0 auto}
.header-actions{display:flex;align-items:center;gap:8px}
.btn-login{padding:8px 16px;border-radius:8px;border:1px solid #e2e8f0;background:var(--white);color:var(--dark);font-weight:600;font-size:.9rem;cursor:pointer;font-family:inherit}
.btn-login:hover{border-color:#cbd5e0;background:#f7fafc}
.btn-login[hidden],.user-bar[hidden]{display:none!important}
.user-bar{display:flex;align-items:center;gap:10px;max-width:min(220px,50vw)}
.user-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;background:#edf2f7;flex-shrink:0;border:1px solid #e2e8f0}
.user-nickname{font-weight:600;font-size:.9rem;color:var(--dark);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn-logout{flex-shrink:0;padding:4px 8px;border:none;background:transparent;color:var(--muted);font-size:.8rem;cursor:pointer;font-family:inherit}
.btn-logout:hover{color:var(--red)}
.login-overlay{position:fixed;inset:0;z-index:1000;background:rgba(26,32,44,.45);display:flex;align-items:center;justify-content:center;padding:20px}
.login-overlay[hidden]{display:none}
.login-dialog{width:100%;max-width:400px;background:var(--white);border-radius:14px;box-shadow:0 20px 50px rgba(26,32,44,.2);overflow:hidden}
.login-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #edf2f7}
.login-dialog-head h2{margin:0;font-size:1.1rem;font-weight:700}
.login-close{width:36px;height:36px;border:none;background:transparent;border-radius:8px;cursor:pointer;color:var(--muted);font-size:1.4rem;line-height:1}
.login-close:hover{background:#edf2f7;color:var(--dark)}
.login-tabs{display:flex;border-bottom:1px solid #edf2f7}
.login-tab{flex:1;padding:12px 8px;border:none;background:#f7fafc;color:var(--muted);font-weight:600;font-size:.9rem;cursor:pointer;font-family:inherit}
.login-tab--active{background:var(--white);color:var(--dark);box-shadow:inset 0 -2px 0 var(--red)}
.login-body{padding:20px 18px 22px}
.login-field{margin-bottom:14px}
.login-field label{display:block;font-size:.85rem;color:var(--muted);margin-bottom:6px}
.login-field input{width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:1rem;font-family:inherit}
.login-field input:focus{outline:none;border-color:var(--red);box-shadow:0 0 0 3px rgba(229,62,62,.15)}
.login-row-sms{display:flex;gap:10px}
.login-row-sms input{flex:1}
.btn-send-code{flex-shrink:0;padding:10px 12px;white-space:nowrap;border:1px solid #e2e8f0;border-radius:8px;background:var(--white);font-weight:600;font-size:.85rem;cursor:pointer;font-family:inherit}
.btn-send-code:disabled{opacity:.65;cursor:not-allowed}
.btn-send-code:not(:disabled):hover{border-color:var(--red);color:var(--red)}
.btn-login-submit{width:100%;margin-top:8px;padding:12px;border:none;border-radius:8px;background:var(--dark);color:var(--white);font-weight:600;font-size:.95rem;cursor:pointer;font-family:inherit}
.btn-login-submit:hover{opacity:.92}
.login-msg{min-height:1.4em;font-size:.85rem;color:var(--muted);margin-top:12px;text-align:center}
.login-msg--error{color:var(--red)}
.logo{display:flex;align-items:center;gap:10px;font-weight:700;font-size:1.25rem;color:var(--dark);text-decoration:none}
.logo svg{flex-shrink:0}
.cart{position:relative;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--dark)}
.cart-badge{position:absolute;top:4px;right:2px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--red);color:var(--white);font-size:11px;font-weight:600;line-height:18px;text-align:center}
.banner{background:linear-gradient(90deg,var(--banner-from),var(--banner-to));padding:40px 24px 48px;text-align:center}
.banner h1{margin:0 0 20px;color:var(--white);font-size:clamp(1.25rem,4vw,1.75rem);font-weight:700;line-height:1.35}
.countdown-label{color:rgba(255,255,255,.95);font-size:.95rem;margin-bottom:12px}
.countdown{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.countdown-box{background:rgba(26,32,44,.85);color:var(--white);font-weight:700;font-size:1.35rem;min-width:56px;padding:10px 14px;border-radius:10px;font-variant-numeric:tabular-nums}
.main{max-width:1280px;margin:0 auto;padding:28px 20px 40px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.card{background:var(--white);border-radius:12px;box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column}
.card-img-wrap{position:relative;aspect-ratio:1/1;background:#edf2f7}
.card-img-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.badge{position:absolute;top:10px;left:10px;background:var(--red);color:var(--white);font-size:.75rem;font-weight:600;padding:4px 8px;border-radius:6px}
.card-body{padding:16px;flex:1;display:flex;flex-direction:column}
.card-title{margin:0 0 12px;font-size:1rem;font-weight:700;line-height:1.4}
.price-row{margin-bottom:14px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.price-now{color:var(--red);font-weight:700;font-size:1.25rem}
.price-old{color:var(--muted);font-size:.9rem;text-decoration:line-through}
.card-actions{display:flex;gap:8px;margin-top:auto;align-items:stretch}
.btn-buy{flex:1;padding:12px 10px;border:none;border-radius:8px;background:var(--dark);color:var(--white);font-weight:600;font-size:.9rem;cursor:pointer;font-family:inherit}
.btn-buy:hover{opacity:.92}
.btn-add-cart{flex-shrink:0;width:44px;height:44px;padding:0;border:1px solid #e2e8f0;border-radius:8px;background:var(--white);color:var(--dark);cursor:pointer;display:flex;align-items:center;justify-content:center}
.btn-add-cart:hover{border-color:var(--red);color:var(--red);background:#fff5f5}
.btn-add-cart svg{display:block}
.cart-badge--pop{animation:cartPop .4s ease}
@keyframes cartPop{0%,100%{transform:scale(1)}40%{transform:scale(1.2)}}
.order-overlay{position:fixed;inset:0;z-index:1001;background:rgba(26,32,44,.5);display:flex;align-items:center;justify-content:center;padding:16px}
.order-overlay[hidden]{display:none}
.order-dialog{width:100%;max-width:min(760px,100%);background:var(--white);border-radius:14px;box-shadow:0 20px 50px rgba(26,32,44,.22);overflow:hidden;max-height:calc(100vh - 32px);display:flex;flex-direction:column}
.order-dialog-head{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #edf2f7}
.order-dialog-head h2{margin:0;font-size:1.05rem;font-weight:700}
.order-dialog-body{padding:0;flex:1;min-height:0;overflow:auto}
.order-layout{display:flex;flex-wrap:wrap;align-items:stretch;min-height:min(420px,70vh)}
.order-col{flex:1 1 280px;padding:18px 20px 22px;display:flex;flex-direction:column}
.order-col--goods{background:#f8fafc;border-right:1px solid #edf2f7}
.order-col--pay{background:var(--white);min-width:min(100%,300px)}
.order-side-title{margin:0 0 14px;font-size:.9rem;font-weight:700;color:var(--dark)}
.order-goods-preview{width:100%;aspect-ratio:1;max-height:200px;border-radius:10px;overflow:hidden;background:#edf2f7;border:1px solid #e2e8f0;margin-bottom:14px}
.order-goods-preview img{width:100%;height:100%;object-fit:cover;display:block}
.order-summary{flex:1}
.order-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:.9rem;border-bottom:1px solid #e2e8f0}
.order-row-total{border-bottom:none;padding-top:12px;margin-top:4px;font-weight:700}
.order-k{color:var(--muted);flex-shrink:0}
.order-v{text-align:right;word-break:break-all}
.order-price{color:var(--red);font-weight:600}
.order-old-line{color:var(--muted);text-decoration:line-through;font-size:.88rem}
.order-total{color:var(--red);font-size:1.15rem}
.order-note{margin:12px 0 0;font-size:.72rem;color:var(--muted);line-height:1.5}
.wx-pay-box{border-radius:12px;overflow:hidden;border:1px solid #e2e8f0;flex:1;display:flex;flex-direction:column;min-height:0}
.wx-pay-head{flex-shrink:0;background:#07C160;color:#fff;padding:11px 14px;font-weight:600;display:flex;align-items:center;gap:10px;font-size:.95rem}
.wx-pay-icon{width:26px;height:26px;border-radius:6px;background:rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;font-size:.75rem}
.wx-pay-tag{margin-left:auto;font-size:.7rem;font-weight:500;opacity:.95;background:rgba(0,0,0,.12);padding:2px 8px;border-radius:999px}
.wx-pay-main{flex:1;padding:18px 16px 16px;background:#f7fafc;text-align:center;display:flex;flex-direction:column;justify-content:center}
.wx-qr-placeholder{width:min(200px,55vw);height:min(200px,55vw);max-width:100%;margin:0 auto 14px;background:#fff;border:2px dashed #cbd5e0;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:.8rem;line-height:1.45;padding:12px;flex-shrink:0}
.wx-pay-tip{margin:0 0 8px;font-size:.88rem;color:var(--dark);font-weight:500}
.wx-pay-mock{margin:0 0 14px;font-size:.78rem;color:var(--muted);line-height:1.55;text-align:left}
.wx-pay-actions{display:flex;justify-content:center;flex-shrink:0}
.wx-btn-mock{padding:10px 20px;border:none;border-radius:8px;background:#07C160;color:#fff;font-weight:600;font-size:.88rem;cursor:pointer;font-family:inherit}
.wx-btn-mock:hover{filter:brightness(1.05)}
@media (max-width:620px){
.order-layout{flex-direction:column;min-height:0}
.order-col--goods{border-right:none;border-bottom:1px solid #edf2f7}
.order-goods-preview{max-height:160px}
}
.site-footer{background:#2d3748;color:#a0aec0;text-align:center;padding:20px 16px;font-size:.8rem;line-height:1.6}
.site-footer a{color:#cbd5e0;text-decoration:none}
.site-footer a:hover{text-decoration:underline}
@media (max-width:1024px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.grid{grid-template-columns:1fr}.header{padding:14px 16px}.banner{padding:32px 16px 40px}}
