/* Neo Mall Design System v2 */
:root {
    --neo-bg: #F4F6FA;
    --neo-surface: #FFFFFF;
    --neo-text: #0F172A;
    --neo-muted: #64748B;
    --neo-accent: #6366F1;
    --neo-accent-2: #8B5CF6;
    --neo-danger: #EF4444;
    --neo-success: #10B981;
    --neo-gold: #C9A227;
    --neo-radius: 16px;
    --neo-radius-lg: 24px;
    --neo-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    --neo-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
    --neo-safe-bottom: env(safe-area-inset-bottom, 16px);
    --neo-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    --neo-max: 500px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.neo-body {
    font-family: var(--neo-font);
    background: var(--neo-bg);
    color: var(--neo-text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}
a { text-decoration: none; color: inherit; }
svg.neo-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

.neo-wrap { max-width: var(--neo-max); margin: 0 auto; min-height: 100vh; position: relative; }
.neo-pb-nav { padding-bottom: calc(130px + var(--neo-safe-bottom)); }

/* Glass header */
.neo-topbar {
    position: sticky; top: 0; z-index: 100;
    padding: 12px 16px;
    background: rgba(244, 246, 250, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.neo-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--neo-surface);
    border-radius: 100px;
    padding: 12px 18px;
    box-shadow: var(--neo-shadow);
    border: 1px solid rgba(15, 23, 42, 0.04);
}
.neo-search input {
    flex: 1; border: none; background: transparent;
    font-size: 14px; font-weight: 500; color: var(--neo-text);
}
.neo-search input::placeholder { color: #94A3B8; }

/* Notice */
.neo-notice {
    margin: 8px 16px;
    background: linear-gradient(120deg, #1E293B, #334155);
    border-radius: var(--neo-radius);
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    overflow: hidden;
}
.neo-notice span {
    color: #FDE68A; font-size: 13px; font-weight: 600;
    white-space: nowrap; animation: neo-marquee 18s linear infinite;
}
@keyframes neo-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Category pills */
.neo-cats {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    padding: 8px 16px 12px; position: sticky; top: 62px; z-index: 99;
    background: rgba(244, 246, 250, 0.88);
    backdrop-filter: blur(16px);
}
.neo-cats::-webkit-scrollbar { display: none; }
.neo-cat {
    white-space: nowrap; font-size: 13px; font-weight: 600;
    padding: 8px 18px; border-radius: 100px;
    background: var(--neo-surface); color: var(--neo-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer; transition: all 0.25s;
    border: 1px solid transparent;
}
.neo-cat.active {
    background: linear-gradient(135deg, var(--neo-accent), var(--neo-accent-2));
    color: #fff; box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* Product grid */
.neo-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; padding: 0 16px 16px;
}
.neo-card {
    background: var(--neo-surface);
    border-radius: var(--neo-radius);
    overflow: hidden;
    box-shadow: var(--neo-shadow);
    cursor: pointer;
    transition: transform 0.2s;
}
.neo-card:active { transform: scale(0.97); }
.neo-card img {
    width: 100%; aspect-ratio: 1; object-fit: cover; background: #E2E8F0;
}
.neo-card-body { padding: 10px 12px 12px; }
.neo-card-title {
    font-size: 13px; font-weight: 700; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 36px;
}
.neo-card-meta { font-size: 11px; color: var(--neo-muted); margin: 4px 0 8px; }
.neo-card-foot { display: flex; justify-content: space-between; align-items: center; }
.neo-price { color: var(--neo-danger); font-size: 17px; font-weight: 900; }
.neo-price::before { content: '¥'; font-size: 11px; }
.neo-btns { display: flex; gap: 6px; }
.neo-btn-sm {
    border: none; border-radius: 8px; font-size: 11px; font-weight: 800;
    padding: 6px 10px; cursor: pointer;
}
.neo-btn-cart { background: #EEF2FF; color: var(--neo-accent); }
.neo-btn-buy {
    background: linear-gradient(135deg, var(--neo-danger), #F87171);
    color: #fff;
}

/* Dock nav */
.neo-dock {
    position: fixed;
    bottom: calc(var(--neo-safe-bottom) + 12px);
    left: 50%; transform: translateX(-50%);
    width: min(92%, var(--neo-max));
    height: 62px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 100px;
    box-shadow: var(--neo-shadow-lg);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 9999; border: 1px solid rgba(255,255,255,0.9);
}
.neo-dock-item {
    display: flex; flex-direction: column; align-items: center;
    font-size: 10px; color: #94A3B8; gap: 3px; flex: 1;
}
.neo-dock-item svg { width: 22px; height: 22px; stroke: #94A3B8; fill: none; stroke-width: 2; }
.neo-dock-item.active { color: var(--neo-text); font-weight: 800; }
.neo-dock-item.active svg { stroke: var(--neo-accent); }

/* Auth pages */
.neo-auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #0F172A 0%, #1E293B 40%, #312E81 100%);
}
.neo-auth-card {
    width: 100%; max-width: 380px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--neo-radius-lg);
    padding: 40px 28px;
    box-shadow: var(--neo-shadow-lg);
}
.neo-auth-logo { text-align: center; margin-bottom: 32px; }
.neo-auth-logo h1 { font-size: 22px; color: #fff; font-weight: 800; letter-spacing: 1px; }
.neo-auth-logo p { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 8px; }
.neo-field { margin-bottom: 16px; position: relative; }
.neo-field input {
    width: 100%; padding: 16px 16px 16px 48px;
    border-radius: 14px; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.25); color: #fff; font-size: 15px;
}
.neo-field input:focus { border-color: var(--neo-accent); outline: none; }
.neo-field .ico {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    opacity: 0.4;
}
.neo-btn-primary {
    width: 100%; padding: 16px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, var(--neo-accent), var(--neo-accent-2));
    color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
    margin-top: 8px; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.neo-auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: rgba(255,255,255,0.5); }
.neo-auth-switch a { color: #A5B4FC; font-weight: 700; cursor: pointer; }

.neo-empty { grid-column: 1 / -1; text-align: center; padding: 48px; color: var(--neo-muted); font-size: 14px; }
.neo-loading { text-align: center; padding: 20px; color: var(--neo-muted); font-size: 12px; }

/* Cart dock */
.neo-cart-dock {
    position: fixed; left: 50%; transform: translateX(-50%);
    width: min(92%, var(--neo-max));
    bottom: -120px;
    background: #0F172A; border-radius: 100px;
    padding: 10px 16px; display: flex; align-items: center; justify-content: space-between;
    z-index: 9910; transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--neo-shadow-lg);
}
.neo-cart-dock.show { bottom: calc(88px + var(--neo-safe-bottom)); }
