/* ============================================================
   LumiNya Shop · 商城样式
   复用 main/css/main.css 的设计令牌（CSS 变量 / blob / 玻璃拟态）
   ============================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 亮色主题 ===== */
:root {
    --bg-gradient: linear-gradient(145deg, #f6faff 0%, #e6f4f1 100%);
    --primary-blue: #6B9FD4;
    --primary-mint: #75BFA7;
    --primary-coral: #F0B8A8;
    --primary-purple: #B8A9D4;
    --text-dark: #2C3E50;
    --text-medium: #5A6B7C;
    --text-light: #8A9BAE;
    --border-light: rgba(0, 0, 0, 0.04);
    --shadow-light: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --btn-gradient: linear-gradient(135deg, #6B9FD4, #75BFA7);
    --hero-gradient: linear-gradient(135deg, #6B9FD4, #75BFA7);
    --bg-soft: rgba(255, 255, 255, 0.3);
    --widget-bg: rgba(255, 255, 255, 0.5);
    --footer-bg: rgba(255, 255, 255, 0.2);
    --danger: #E07070;
    --warn: #E0A860;
    --ok: #75BFA7;
}

/* ===== 暗色主题 ===== */
[data-theme="dark"] {
    --bg-gradient: linear-gradient(145deg, #1c2128 0%, #242c34 100%);
    --primary-blue: #8AB8E0;
    --primary-mint: #8DD4BA;
    --primary-coral: #E8B8A8;
    --primary-purple: #C8B9E0;
    --text-dark: #E8EDF3;
    --text-medium: #9AA8B9;
    --text-light: #6A7B8C;
    --border-light: rgba(255, 255, 255, 0.04);
    --shadow-light: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    --btn-gradient: linear-gradient(135deg, #4a8ec4, #5aa88d);
    --hero-gradient: linear-gradient(135deg, #8AB8E0, #8DD4BA);
    --bg-soft: rgba(255, 255, 255, 0.05);
    --widget-bg: rgba(255, 255, 255, 0.06);
    --footer-bg: rgba(255, 255, 255, 0.04);
    --danger: #E88;
    --warn: #E8C088;
    --ok: #8DD4BA;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    transition: background 0.4s ease, color 0.3s ease;
    margin: 0;
}

a { color: var(--primary-blue); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ===== 装饰性模糊图形 ===== */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    transition: background 0.4s ease;
}
.blob--1 { width: 300px; height: 300px; background: rgba(107,159,212,0.10); top: -80px; right: -60px; }
.blob--2 { width: 250px; height: 250px; background: rgba(117,191,167,0.10); bottom: 40px; left: -40px; }
.blob--3 { width: 200px; height: 200px; background: rgba(240,184,168,0.08); top: 60%; right: 10px; }
[data-theme="dark"] .blob--1 { background: rgba(138,184,224,0.05); }
[data-theme="dark"] .blob--2 { background: rgba(141,212,186,0.05); }
[data-theme="dark"] .blob--3 { background: rgba(232,184,168,0.03); }

/* ===== Header ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}
.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.logo .accent {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo .tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-medium);
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    padding: 0.05rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.4rem;
}
.logo::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-mint);
    border-radius: 50%;
    margin-left: 4px;
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

.nav-wrapper { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a { color: var(--text-medium); transition: color 0.2s; position: relative; }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-links a:hover { color: var(--text-dark); }
.nav-links a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.8rem; }

.cart-badge {
    position: relative;
    background: var(--bg-soft);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--text-medium);
    transition: all 0.25s;
    box-shadow: var(--shadow-light);
}
.cart-badge:hover { border-color: var(--primary-blue); color: var(--text-dark); transform: scale(1.05); }
.cart-badge .count {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

.theme-toggle {
    background: var(--bg-soft);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 44px; height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-medium);
    transition: all 0.25s;
    box-shadow: var(--shadow-light);
}
.theme-toggle:hover { border-color: var(--primary-blue); color: var(--text-dark); transform: scale(1.05) rotate(8deg); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-sun { display: block; }

.user-chip {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--bg-soft);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--text-medium);
}
.user-chip a { font-weight: 600; }

/* ===== 公告条 ===== */
.announcement {
    background: var(--bg-soft);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 0.7rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-medium);
    text-align: center;
    box-shadow: var(--shadow-light);
}

/* ===== Hero ===== */
.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}
.hero-content h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 0.5rem;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-content .subhead { font-size: 1.15rem; color: var(--text-medium); font-weight: 500; }
.hero-content .bio { font-size: 0.98rem; color: var(--text-medium); max-width: 85%; margin: 0.6rem 0 1.6rem; }
.hero-visual {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.hero-badge {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: var(--bg-soft);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-light);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: var(--shadow-light);
    font-size: 3rem;
}
.hero-badge .name { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); }
.hero-badge .role { font-size: 0.7rem; color: var(--text-medium); }

/* ===== 按钮 ===== */
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn--primary {
    background: var(--btn-gradient);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(107,159,212,0.35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 32px -8px rgba(107,159,212,0.5); }
.btn--outline { background: transparent; color: var(--text-dark); border: 1.5px solid var(--text-light); }
.btn--outline:hover { border-color: var(--primary-blue); color: var(--primary-blue); transform: translateY(-3px); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--ghost { background: var(--bg-soft); border: 1px solid var(--border-light); color: var(--text-medium); }
.btn--small { padding: 0.4rem 1rem; font-size: 0.82rem; }

/* ===== 区块标题 ===== */
.section-header { margin-bottom: 0.5rem; }
.section-title { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-dark); }
.section-subtitle { font-size: 0.95rem; color: var(--text-medium); margin-top: 0.1rem; }
.section-divider {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem;
}
.section-divider .line { flex: 1; height: 1px; background: var(--border-light); }
.section-divider .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-blue); opacity: 0.3; }
.section-wrapper { margin-bottom: 3rem; position: relative; z-index: 2; }

/* ===== 分类筛选 ===== */
.category-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.6rem; }
.category-chip {
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    background: var(--bg-soft);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-light);
    color: var(--text-medium);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
}
.category-chip:hover { border-color: var(--primary-blue); color: var(--primary-blue); transform: translateY(-2px); }
.category-chip.active { background: var(--btn-gradient); color: #fff; border-color: transparent; }

/* ===== 商品网格 ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.3rem;
}
.product-card {
    display: flex; flex-direction: column;
    border-radius: 18px;
    background: var(--widget-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}
.product-card:hover { transform: translateY(-8px); border-color: var(--primary-blue); box-shadow: 0 16px 36px -12px rgba(0,0,0,0.1); }
.product-card .thumb {
    aspect-ratio: 4/3;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-card .title { font-weight: 700; font-size: 1rem; color: var(--text-dark); line-height: 1.4; }
.product-card .summary {
    font-size: 0.82rem; color: var(--text-medium);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-card .price { font-weight: 800; font-size: 1.2rem; background: var(--hero-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.product-card .type-tag {
    font-size: 0.68rem; padding: 0.1rem 0.6rem; border-radius: 20px;
    background: var(--bg-soft); border: 1px solid var(--border-light); color: var(--text-medium);
}
.product-card .sold { font-size: 0.75rem; color: var(--text-light); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-light); }

/* ===== 商品详情 ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 0.5rem; }
.gallery { display: flex; flex-direction: column; gap: 0.8rem; }
.gallery .main-img {
    aspect-ratio: 1;
    border-radius: 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem;
    overflow: hidden;
}
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.gallery .thumbs .t {
    width: 64px; height: 64px; border-radius: 12px;
    background: var(--bg-soft); border: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
    cursor: pointer; overflow: hidden; transition: all 0.2s;
}
.gallery .thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs .t.active { border-color: var(--primary-blue); box-shadow: 0 0 0 2px rgba(107,159,212,0.3); }

.detail-info .title { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.detail-info .summary { color: var(--text-medium); margin: 0.4rem 0 1rem; }
.detail-info .price { font-size: 2rem; font-weight: 800; background: var(--hero-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.2rem; }
.detail-info .stock { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; }
.detail-info .stock.out { color: var(--danger); }

.variant-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.variant-item {
    padding: 0.5rem 1rem; border-radius: 12px;
    background: var(--bg-soft); border: 1px solid var(--border-light);
    cursor: pointer; font-size: 0.88rem; color: var(--text-medium);
    transition: all 0.2s;
}
.variant-item:hover { border-color: var(--primary-blue); }
.variant-item.active { background: var(--btn-gradient); color: #fff; border-color: transparent; }
.variant-item.disabled { opacity: 0.4; cursor: not-allowed; }

.qty-row { display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border-light); border-radius: 40px; overflow: hidden; background: var(--bg-soft); }
.qty-stepper button {
    width: 36px; height: 36px; border: none; background: transparent;
    cursor: pointer; font-size: 1.1rem; color: var(--text-medium);
}
.qty-stepper button:hover { color: var(--primary-blue); }
.qty-stepper .qty-num { min-width: 36px; text-align: center; font-weight: 600; }

.detail-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.5rem; }
.detail-desc {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--widget-bg);
    border: 1px solid var(--border-light);
    white-space: pre-wrap;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.8;
}

/* ===== 购物车 / 列表卡片 ===== */
.cart-list { display: flex; flex-direction: column; gap: 0.8rem; }
.cart-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: var(--widget-bg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
}
.cart-item .thumb {
    width: 64px; height: 64px; border-radius: 12px;
    background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; overflow: hidden; flex-shrink: 0;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info .name { font-weight: 700; font-size: 0.98rem; }
.cart-item .info .sku { font-size: 0.8rem; color: var(--text-light); }
.cart-item .info .unit { font-size: 0.9rem; color: var(--text-medium); }
.cart-item .subtotal { font-weight: 700; color: var(--text-dark); min-width: 90px; text-align: right; }
.cart-item .remove { background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 1.1rem; }
.cart-item .remove:hover { color: var(--danger); }

.cart-summary {
    margin-top: 1.4rem;
    padding: 1.4rem;
    border-radius: 18px;
    background: var(--widget-bg);
    border: 1px solid var(--border-light);
    display: flex; flex-direction: column; gap: 0.6rem;
}
.cart-summary .row { display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--text-medium); }
.cart-summary .row.total { font-size: 1.3rem; font-weight: 800; color: var(--text-dark); border-top: 1px solid var(--border-light); padding-top: 0.8rem; margin-top: 0.4rem; }

/* ===== 表单 ===== */
.form-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 20px;
    background: var(--widget-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
}
.form-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.3rem; }
.form-card .hint { color: var(--text-medium); font-size: 0.9rem; margin-bottom: 1.4rem; }
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-medium); margin-bottom: 0.35rem; }
.form-field input, .form-field textarea, .form-field select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-soft);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border 0.2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--primary-blue); }
.form-field textarea { min-height: 90px; resize: vertical; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: -0.5rem; margin-bottom: 0.8rem; min-height: 1.2em; }
.form-switch { display: flex; gap: 0.5rem; font-size: 0.85rem; color: var(--text-medium); margin-top: 0.6rem; }
.form-switch a { font-weight: 600; }

/* ===== 订单 ===== */
.order-card {
    padding: 1.2rem;
    border-radius: 16px;
    background: var(--widget-bg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
    margin-bottom: 0.8rem;
}
.order-card .head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.6rem; }
.order-card .order-no { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.order-card .order-time { font-size: 0.8rem; color: var(--text-light); }
.order-card .items { font-size: 0.9rem; color: var(--text-medium); margin-bottom: 0.5rem; }
.order-card .total { font-weight: 700; color: var(--text-dark); }

.status-badge { display: inline-block; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.status-pending { background: rgba(224,168,96,0.15); color: var(--warn); }
.status-paid { background: rgba(117,191,167,0.15); color: var(--ok); }
.status-shipped { background: rgba(107,159,212,0.18); color: var(--primary-blue); }
.status-completed { background: rgba(117,191,167,0.2); color: var(--ok); }
.status-cancelled { background: rgba(224,112,112,0.12); color: var(--danger); }
.status-expired { background: rgba(138,155,174,0.15); color: var(--text-light); }

.code-box {
    background: var(--bg-soft);
    border: 1px dashed var(--primary-blue);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    margin: 0.3rem 0;
    word-break: break-all;
}

/* ===== 订单操作 / 信息盒 ===== */
.order-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.info-box {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    margin: 0.4rem 0;
    word-break: break-all;
    line-height: 1.7;
}
.info-box strong { color: var(--text-dark); font-weight: 600; }
.tracking-no { border-color: var(--primary-blue); border-style: dashed; }
.cart-item .qty-stepper { flex-shrink: 0; }

/* ===== Toast ===== */
.toast-wrap { position: fixed; top: 1.2rem; right: 1.2rem; z-index: 999; display: flex; flex-direction: column; gap: 0.6rem; }
.toast {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: var(--widget-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    color: var(--text-dark);
    animation: toastIn 0.3s ease both;
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ===== 管理后台 ===== */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.admin-side {
    border-radius: 18px;
    background: var(--widget-bg);
    border: 1px solid var(--border-light);
    padding: 1rem;
    position: sticky; top: 1rem;
    display: flex; flex-direction: column; gap: 0.3rem;
}
.admin-side a {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    color: var(--text-medium);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s;
}
.admin-side a:hover { background: var(--bg-soft); color: var(--text-dark); }
.admin-side a.active { background: var(--btn-gradient); color: #fff; }
.admin-main { min-width: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    padding: 1.2rem;
    border-radius: 16px;
    background: var(--widget-bg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
}
.stat-card .value { font-size: 1.8rem; font-weight: 800; background: var(--hero-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-card .label { font-size: 0.82rem; color: var(--text-medium); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { padding: 0.7rem 0.6rem; text-align: left; border-bottom: 1px solid var(--border-light); }
.admin-table th { color: var(--text-light); font-weight: 600; font-size: 0.8rem; }
.admin-table tr:hover td { background: var(--bg-soft); }

.admin-toolbar { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.35);
    display: flex; align-items: center; justify-content: center; z-index: 998; padding: 1rem;
    animation: fadeIn 0.2s ease both;
}
.modal {
    width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
    background: var(--widget-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.6rem;
    box-shadow: 0 24px 60px -20px rgba(0,0,0,0.3);
}
.modal h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hidden { display: none !important; }

/* ===== 响应式 ===== */
@media (max-width: 820px) {
    body { padding: 1.5rem 1rem; }
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-content .bio { max-width: 100%; }
    .btn-group { justify-content: center; }
    .product-detail { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-side { position: static; flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 480px) {
    body { padding: 1rem 0.7rem; }
    .logo { font-size: 1.25rem; }
    .nav-links { gap: 0.8rem; font-size: 0.82rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .product-card .thumb { font-size: 2.2rem; }
    .cart-item { flex-wrap: wrap; }
    .cart-item .subtotal { text-align: left; min-width: 0; }
    .form-card { padding: 1.4rem; }
    .detail-info .title { font-size: 1.4rem; }
    .hero-badge { width: 110px; height: 110px; font-size: 2.5rem; }
    .admin-table { font-size: 0.78rem; }
    .admin-table th, .admin-table td { padding: 0.5rem 0.35rem; }
}
