﻿/* ============================
   åˆšåˆšå¥½ Â· Mobile UI v2
   æŽ’ç‰ˆä¼˜å…ˆï¼šå­—å·å±‚çº§ / è§¦æŽ§åŒº / ä¿¡æ¯å¯†åº¦
   å åœ¨ app.css ä¹‹ä¸Šï¼Œä¸æ”¹ä¸šåŠ¡é€»è¾‘
   ============================ */
:root {
    --ink: #14120f;
    --ink-soft: #3f3a34;
    --muted: #7a746c;
    --line: rgba(20, 18, 15, 0.08);
    --line-strong: rgba(20, 18, 15, 0.14);
    --paper: #f4f2ee;
    --paper-2: #ebe8e2;
    --surface: #ffffff;
    --accent: #c2410c;
    --accent-2: #ea580c;
    --ok: #0f766e;
    --danger: #be123c;
    --primary: #1c1917;
    --primary-light: #44403c;
    --primary-dark: #0c0a09;
    --primary-gradient: linear-gradient(135deg, #1c1917 0%, #292524 55%, #44403c 100%);
    --bg: var(--paper);
    --bg-elevated: var(--surface);
    --bg-card: var(--surface);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-tertiary: var(--muted);
    --border: var(--line);
    --border-strong: var(--line-strong);
    --shadow-sm: 0 1px 0 rgba(20, 18, 15, 0.04);
    --shadow-md: 0 10px 28px rgba(20, 18, 15, 0.08);
    --shadow-lg: 0 20px 48px rgba(20, 18, 15, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --header-height: 56px;
    --tabbar-height: 64px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --space: 16px;
    --touch: 44px;
}
/* ---------- é¡µé¢æ°›å›´ï¼šçº¸æ„Ÿï¼Œéžçº¯è‰²å¹³é“º ---------- */
body.app-body,
body.auth-page,
body.pay-page {
    color: var(--ink);
    background: var(--paper) !important;
}
body.app-body::before,
body.auth-page::before,
body.pay-page::before {
    background:
        radial-gradient(900px 480px at 0% -10%, rgba(234, 88, 12, 0.07), transparent 55%),
        radial-gradient(700px 420px at 100% 0%, rgba(28, 25, 23, 0.05), transparent 50%),
        linear-gradient(180deg, #f7f5f1 0%, #f1efe9 40%, #ebe8e2 100%) !important;
}
body.app-body::after,
body.auth-page::after,
body.pay-page::after {
    opacity: 0.35 !important;
    background-image:
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 11px,
            rgba(20, 18, 15, 0.015) 11px,
            rgba(20, 18, 15, 0.015) 12px
        ) !important;
    background-size: auto !important;
}
.app-main {
    padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px) + 12px);
}
/* ---------- é¡¶æ ï¼šå·¦å“ç‰Œ / å³æ“ä½œï¼Œç§»åŠ¨ç«¯æ›´æ‰ ---------- */
.app-header {
    height: var(--header-height);
    background: rgba(244, 242, 238, 0.88) !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.app-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--space) !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.app-logo { gap: 8px !important; min-width: 0; }
.app-logo-text {
    font-size: 15px !important;
    font-weight: 750 !important;
    letter-spacing: -0.04em;
    color: var(--ink) !important;
    background: none !important;
    -webkit-text-fill-color: var(--ink) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}
.app-logo-dot {
    width: 9px !important; height: 9px !important;
    background: var(--accent-2) !important;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
}
.app-header-right { gap: 6px !important; flex-shrink: 0; }
.header-cart-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    font-size: 0 !important;
    color: var(--ink-soft);
    position: relative;
}
.header-cart-btn::before {
    content: '';
    width: 18px; height: 18px;
    display: block;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.header-cart-btn:hover { color: var(--ink); border-color: var(--line-strong) !important; }
.cart-badge {
    background: var(--accent) !important;
    border: 2px solid var(--paper) !important;
    font-weight: 700 !important;
}
.header-balance {
    border-radius: 12px !important;
    padding: 8px 12px !important;
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
}
.header-balance:hover { box-shadow: none !important; }
.balance-icon { display: none; }
.balance-text {
    color: var(--ink) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums;
}
.header-avatar {
    width: 36px !important; height: 36px !important;
    border: 0 !important;
    box-shadow: inset 0 0 0 1px var(--line) !important;
    background: #ddd6ce !important;
    color: var(--ink) !important;
    font-weight: 700 !important;
}
.header-login-btn,
.header-logout-btn {
    border-radius: 12px !important;
    font-weight: 700 !important;
    min-height: 40px;
}
.header-login-btn {
    padding: 0 16px !important;
    background: var(--ink) !important;
    color: #fff !important;
    box-shadow: none !important;
}
.header-login-btn:hover { filter: brightness(1.08); box-shadow: none !important; }
/* ---------- åº•æ ï¼šç­‰é«˜äº”æ ï¼Œå¼±åŒ–æ‚¬æµ®ä¸­å¿ƒ ---------- */
.app-tabbar {
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line) !important;
    box-shadow: 0 -1px 0 rgba(20, 18, 15, 0.03) !important;
}
.tab-item {
    gap: 3px !important;
    color: var(--muted) !important;
    padding-top: 8px !important;
}
.tab-item.active {
    color: var(--ink) !important;
}
.tab-item.active .tab-label {
    font-weight: 750 !important;
}
.tab-icon {
    font-size: 0 !important;
    width: 22px; height: 22px;
    filter: none !important;
    opacity: 0.7;
    background: currentColor;
    -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain;
    mask-position: center; mask-repeat: no-repeat; mask-size: contain;
}
.tab-item.active .tab-icon { opacity: 1; color: var(--ink); transform: none !important; }
.tab-icon--home {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E");
}
.tab-icon--orders {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
}
.tab-icon--cart {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 12.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E");
}
.tab-icon--user {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.tab-center { margin-top: 0 !important; }
.tab-center-btn {
    width: 40px !important; height: 40px !important;
    border-radius: 12px !important;
    border: 0 !important;
    background: var(--ink) !important;
    box-shadow: none !important;
}
.tab-center-icon {
    font-size: 0 !important;
    width: 18px; height: 18px;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Cpath d='M17.5 14v7M14 17.5h7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Cpath d='M17.5 14v7M14 17.5h7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tab-label { font-size: 10px !important; font-weight: 600 !important; letter-spacing: 0.04em; }
.tab-center-label { margin-top: 2px; }
/* ---------- æŒ‰é’® ---------- */
.btn {
    border-radius: 12px !important;
    font-weight: 700 !important;
    transition: transform .18s var(--ease), background .18s, border-color .18s !important;
}
.btn-primary {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #fff !important;
}
.btn-default {
    background: var(--surface) !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--ink) !important;
}
.btn-xs {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px; min-height: 32px; font-size: 12px;
    border-radius: 10px !important;
}
.btn-primary-gradient,
.btn-submit {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; min-height: 50px; padding: 12px 20px;
    border: none; border-radius: 14px !important;
    background: var(--primary-gradient) !important; color: #fff !important;
    font-size: 15px; font-weight: 750; cursor: pointer;
    box-shadow: none;
    letter-spacing: 0.04em;
}
.btn-primary-gradient:hover,
.btn-submit:hover { filter: brightness(1.06); transform: none; }
.tag {
    display: inline-flex; align-items: center; padding: 2px 8px;
    border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1.5;
    letter-spacing: 0.02em;
}
.tag-orange, .badge-warning { background: #fff7ed; color: #c2410c; }
.tag-green, .badge-success { background: #ecfdf5; color: #047857; }
.tag-gray, .badge-muted { background: #f5f5f4; color: #57534e; }
.tag-red, .badge-danger { background: #fff1f2; color: #be123c; }
/* ---------- å•†åŸŽï¼šæ¡Œé¢ä¾§æ  + ç½‘æ ¼ ---------- */
.mall-layout {
    max-width: 1180px; margin: 0 auto; padding: 18px var(--space) 28px !important;
}
.mall-sidebar {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: none !important;
    padding: 14px !important;
    position: sticky; top: calc(var(--header-height) + 12px);
}
.mall-sidebar h3 {
    font-size: 11px !important; font-weight: 750 !important;
    color: var(--muted) !important; letter-spacing: 0.12em;
    text-transform: uppercase; margin-bottom: 10px !important;
}
.cat-list a {
    border-radius: 10px !important; padding: 10px 12px !important;
    font-weight: 600 !important;
}
.cat-list a.active {
    background: #f5f5f4 !important; color: var(--ink) !important;
    box-shadow: inset 3px 0 0 var(--accent-2);
}
.mall-search-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.mall-search-form .mall-search-input { flex: 1; min-width: 160px; }
.mall-search-input {
    min-height: 44px !important; border-radius: 12px !important;
    border: 1px solid var(--line-strong) !important;
    background: var(--surface) !important; padding: 0 14px !important;
    font-size: 15px !important;
}
.mall-search-input:focus {
    border-color: var(--ink) !important;
    box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.08) !important;
    outline: none;
}
.filter-sort { gap: 6px !important; }
.filter-sort a {
    border-radius: 999px !important; padding: 8px 14px !important;
    font-weight: 650 !important; color: var(--ink-soft) !important;
    background: transparent; border: 1px solid transparent;
}
.filter-sort a.active {
    background: var(--ink) !important; color: #fff !important;
    border-color: var(--ink) !important;
}
.products-grid {
    gap: 14px !important;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
}
.product-card {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: border-color .2s, transform .2s var(--ease) !important;
}
.product-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--line-strong) !important;
}
.product-card .cover {
    aspect-ratio: 1 / 1 !important;
    background: #e7e5e4;
}
.product-card .cover .tag-top {
    background: var(--ink) !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}
.product-card .cover-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, #f5f5f4, #e7e5e4);
    color: var(--muted); font-family: var(--font-display);
    font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
}
.product-card .info { padding: 12px 13px 14px !important; }
.product-card .info .title {
    min-height: 40px !important; font-size: 14px !important;
    font-weight: 700 !important; margin-bottom: 6px !important;
    color: var(--ink) !important; letter-spacing: -0.01em;
}
.product-card .info .meta {
    margin-bottom: 8px !important; font-size: 12px !important; color: var(--muted) !important;
}
.product-card .info .price {
    font-size: 20px !important; color: var(--accent) !important;
    font-family: var(--font-display); font-weight: 800;
    font-variant-numeric: