/* ============================================
   智享家电 - 科技感主题样式
   H5响应式布局 · 深色科技风格
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* 主色调 */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #161d2a;
    --bg-card-hover: #1c2536;
    --bg-surface: #1e293b;

    /* 强调色 */
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-warm: #f59e0b;
    --accent-danger: #ef4444;
    --accent-success: #10b981;

    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, #00d4ff, #7c3aed);
    --gradient-accent: linear-gradient(135deg, #7c3aed, #f59e0b);
    --gradient-dark: linear-gradient(180deg, #0a0e17, #111827);

    /* 文字 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    /* 边框 */
    --border-color: #1e293b;
    --border-hover: #334155;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(0,212,255,0.15);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-secondary); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */
.header {
    background: rgba(10,14,23,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.logo:hover { color: var(--accent-primary); }
.logo-icon { width: 28px; height: 28px; color: var(--accent-primary); }

/* Search */
.search-bar {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
}
.search-bar form {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-bar form:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 18px;
    outline: none;
    font-size: 0.9rem;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
    background: var(--gradient-primary);
    border: none;
    color: var(--text-inverse);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.search-bar button:hover { opacity: 0.9; }
.search-bar svg { width: 18px; height: 18px; }

/* Nav */
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--accent-primary);
    background: rgba(0,212,255,0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
}
.cart-btn:hover { color: var(--accent-primary); background: rgba(0,212,255,0.08); }
.cart-btn svg { width: 20px; height: 20px; }
.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-dropdown { position: relative; }
.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all 0.2s;
}
.user-btn:hover { color: var(--text-primary); background: var(--bg-surface); }
.user-btn svg { width: 18px; height: 18px; }

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
}
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.15s;
}
.dropdown-menu a:hover { color: var(--accent-primary); background: rgba(0,212,255,0.06); }

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 9px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-outline:hover { background: rgba(0,212,255,0.08); color: var(--accent-primary); }
.btn-lg { padding: 12px 32px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 16px; font-size: 0.8rem; }
.btn-block { width: 100%; display: flex; }
.btn-text { background: none; border: none; color: var(--text-secondary); font-size: 0.85rem; padding: 4px 8px; transition: color 0.2s; }
.btn-text:hover { color: var(--accent-primary); }
.btn-danger { color: var(--accent-danger); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-dark);
}
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,212,255,0.1), transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,0.1), transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; }

.hero-right { display: flex; justify-content: center; }
.hero-float-icons {
    position: relative;
    width: 300px;
    height: 300px;
}
.float-icon {
    position: absolute;
    width: 72px;
    height: 72px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-md);
}
.float-icon svg { width: 40px; height: 40px; }
.fi-1 { top: 20px; left: 20px; animation-delay: 0s; }
.fi-2 { top: 120px; right: 20px; animation-delay: 2s; }
.fi-3 { bottom: 40px; left: 80px; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------- Category Nav ---------- */
.category-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}
.category-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 90px;
}
.cat-item:hover { color: var(--accent-primary); background: rgba(0,212,255,0.06); }
.cat-icon { width: 32px; height: 32px; }
.cat-name { font-size: 0.8rem; }

/* ---------- Section ---------- */
.section { padding: 60px 0; }
.section-dark {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}
.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.dark-title { color: var(--text-primary); }
.dark-subtitle { color: var(--text-muted); }
.section-more {
    font-size: 0.9rem;
    color: var(--accent-primary);
}
.dark-more { color: var(--accent-primary); }

/* ---------- Product Grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s;
}
.product-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.product-img-wrap {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img-wrap img {
    object-fit: contain;
    width: 80%;
    height: 80%;
    transition: transform 0.4s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}
.tag-hot { background: var(--accent-danger); color: #fff; }
.tag-new { background: var(--accent-success); color: #fff; }
.tag-rec { background: var(--accent-warm); color: #000; }

.product-info { padding: 14px; }
.product-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-name:hover { color: var(--accent-primary); }
.product-model {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.product-price-row { display: flex; align-items: baseline; gap: 8px; }
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--accent-warm); }
.product-price-original { font-size: 0.8rem; color: var(--text-muted); text-decoration: line-through; }

/* ---------- Product Detail ---------- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.product-gallery { }
.gallery-main {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
}
.gallery-main img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
}
.gallery-thumbs img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-card);
    transition: border-color 0.2s;
    padding: 6px;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--accent-primary); }

.product-meta { display: flex; flex-direction: column; gap: 16px; }
.product-badges { display: flex; gap: 6px; }
.product-badges .tag { position: static; font-size: 0.75rem; }
.product-title { font-size: 1.6rem; font-weight: 700; }
.product-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.detail-price-row { display: flex; align-items: baseline; gap: 12px; }
.detail-price { font-size: 2rem; font-weight: 800; color: var(--accent-warm); }
.detail-original-price { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }
.detail-discount { background: var(--accent-danger); color: #fff; padding: 2px 10px; border-radius: var(--radius-sm); font-size: 0.8rem; }

.detail-meta { display: flex; gap: 24px; font-size: 0.85rem; color: var(--text-muted); }

.detail-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.detail-actions .btn-primary svg { width: 18px; height: 18px; }

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.quantity-control input {
    width: 48px;
    height: 40px;
    text-align: center;
    border: none;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    -moz-appearance: textfield;
}
.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty-btn {
    width: 36px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.qty-btn:hover { background: var(--accent-primary); color: var(--text-inverse); }

/* Tabs */
.product-tabs { margin-top: 48px; }
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.product-desc-content {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    color: var(--text-secondary);
    line-height: 1.8;
    min-height: 200px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}
.specs-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.specs-table td:first-child {
    color: var(--text-muted);
    width: 30%;
    font-weight: 600;
}

.related-section { margin-top: 48px; }
.related-section h3 { font-size: 1.3rem; margin-bottom: 20px; }

/* ---------- Products Page ---------- */
.page-banner {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
}
.page-banner h1 { font-size: 1.5rem; font-weight: 700; }
.page-banner p { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

.products-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }

.products-sidebar { }
.filter-block {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}
.filter-block h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; color: var(--text-primary); }
.filter-list { list-style: none; }
.filter-list li { margin-bottom: 4px; }
.filter-list a {
    display: block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.15s;
}
.filter-list a:hover { color: var(--accent-primary); background: rgba(0,212,255,0.06); }
.filter-list a.active { color: var(--accent-primary); background: rgba(0,212,255,0.1); font-weight: 600; }

.price-range { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.price-range input {
    width: 90px;
    padding: 6px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    font-size: 0.8rem;
}
.price-range input:focus { border-color: var(--accent-primary); }

.products-main { }
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.products-count { font-size: 0.85rem; color: var(--text-muted); }
.products-sort { display: flex; gap: 4px; }
.products-sort a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: all 0.15s;
}
.products-sort a:hover { color: var(--accent-primary); }
.products-sort a.active { color: var(--accent-primary); background: rgba(0,212,255,0.1); font-weight: 600; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 40px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.15s;
}
.page-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.page-btn.active { background: var(--accent-primary); color: var(--text-inverse); border-color: var(--accent-primary); }

/* ---------- Cart ---------- */
.cart-table-wrap { overflow-x: auto; }
.cart-table {
    width: 100%;
    border-collapse: collapse;
}
.cart-table th, .cart-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.cart-table th {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cart-product { display: flex; align-items: center; gap: 12px; }
.cart-product img {
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    object-fit: contain;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.cart-total { font-size: 1.2rem; color: var(--text-secondary); }
.cart-total strong { font-size: 1.5rem; color: var(--accent-warm); margin-left: 8px; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }

.checkout-main { }
.checkout-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}
.checkout-block h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.address-list { display: flex; flex-direction: column; gap: 10px; }
.address-card {
    display: block;
    cursor: pointer;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.address-card input[type="radio"] { display: none; }
.address-card:hover { border-color: var(--accent-primary); }
.address-card.selected {
    border-color: var(--accent-primary);
    background: rgba(0,212,255,0.06);
}
.addr-phone { margin-left: 8px; color: var(--text-muted); font-size: 0.85rem; }
.address-card p { margin-top: 4px; font-size: 0.85rem; color: var(--text-secondary); }
.address-card .tag { position: static; display: inline-block; margin-left: 8px; }

.checkout-items { }
.checkout-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.checkout-item:last-child { border-bottom: 0; }
.checkout-item img {
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    object-fit: contain;
}
.checkout-item-info { flex: 1; font-size: 0.9rem; display: flex; gap: 8px; }
.checkout-item-price { font-weight: 700; color: var(--accent-warm); }

.checkout-sidebar { position: sticky; top: 84px; }
.checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}
.checkout-card h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.summary-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 1.1rem;
    color: var(--text-primary);
}
.summary-total strong { font-size: 1.3rem; color: var(--accent-warm); }

/* ---------- Auth ---------- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}
.input::placeholder { color: var(--text-muted); }
textarea.input { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 16px; }
.alert-error { background: rgba(239,68,68,0.1); color: var(--accent-danger); border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: rgba(16,185,129,0.1); color: var(--accent-success); border: 1px solid rgba(16,185,129,0.2); }

.text-muted { color: var(--text-muted); }
.text-green { color: var(--accent-success); }

/* ---------- User ---------- */
.user-layout { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.user-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    height: fit-content;
}
.user-sidebar h3 { font-size: 1rem; margin-bottom: 16px; }
.user-sidebar a {
    display: block;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.15s;
    margin-bottom: 2px;
}
.user-sidebar a:hover { color: var(--accent-primary); background: rgba(0,212,255,0.06); }
.user-sidebar a.active { color: var(--accent-primary); background: rgba(0,212,255,0.1); font-weight: 600; }

.user-main { }
.profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}
.profile-section h4 { font-size: 1rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }

.form-inline .form-group { max-width: 360px; }

/* ---------- Orders ---------- */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}
.order-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.order-date { color: var(--text-muted); margin-left: auto; }
.order-status { font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 12px; }
.status-pending { background: rgba(245,158,11,0.15); color: var(--accent-warm); }
.status-paid { background: rgba(0,212,255,0.15); color: var(--accent-primary); }
.status-shipped { background: rgba(124,58,237,0.15); color: var(--accent-secondary); }
.status-done { background: rgba(16,185,129,0.15); color: var(--accent-success); }
.status-cancel { background: rgba(239,68,68,0.15); color: var(--accent-danger); }

.order-body { padding: 14px 20px; font-size: 0.85rem; color: var(--text-secondary); }
.order-body p { margin-bottom: 4px; }
.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
}

/* ---------- Order Detail ---------- */
.order-detail { }
.order-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}
.order-info-row {
    padding: 8px 0;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.order-info-row .order-status { margin-left: 16px; }
.order-total-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
}
.order-total-bar strong { font-size: 1.5rem; color: var(--accent-warm); }

/* ---------- Address ---------- */
.address-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 16px;
    margin-bottom: 20px;
}
.address-form-wrap h4 { margin-bottom: 16px; }
.address-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.address-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.address-card-item .tag { position: static; display: inline-block; margin-left: 8px; }
.address-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Features Banner ---------- */
.features-banner {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}
.feature-item svg {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.feature-item strong { display: block; font-size: 0.9rem; }
.feature-item span { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h4 { font-size: 0.95rem; margin-bottom: 16px; color: var(--text-primary); }
.footer-col a {
    display: block;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent-primary); }
.footer-phone { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary) !important; }
.footer-contact p { font-size: 0.8rem; color: var(--text-muted); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 50;
    box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state svg { width: 80px; height: 80px; margin-bottom: 16px; opacity: 0.5; }
.empty-state p { font-size: 1rem; margin-bottom: 16px; }

/* ---------- Search ---------- */
.search-keyword { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; }
.search-keyword strong { color: var(--accent-primary); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-primary); }

/* ---------- Admin Styles ---------- */
.admin-body {
    background: #f0f2f5;
    color: #333;
    font-family: var(--font-sans);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: #001529;
    color: #fff;
    padding: 0;
    flex-shrink: 0;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-logo svg { width: 28px; height: 28px; color: #1890ff; }

.admin-nav { padding: 12px 0; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav a.active { color: #fff; background: #1890ff; }

.admin-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    z-index: 10;
}

.admin-header-right { display: flex; align-items: center; gap: 16px; }
.admin-user { font-size: 0.85rem; color: #666; }

.admin-content {
    flex: 1;
    padding: 24px;
    background: #f0f2f5;
}

.admin-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-card-header h3 { font-size: 1.1rem; font-weight: 600; color: #333; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.admin-table tr:hover td { background: #fafafa; }

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn:hover { border-color: #1890ff; color: #1890ff; }

.admin-btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.admin-btn-primary:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }

.admin-btn-danger { color: #ff4d4f; border-color: #ff4d4f; }
.admin-btn-danger:hover { background: #ff4d4f; color: #fff; }

.admin-btn-sm { padding: 4px 12px; font-size: 0.8rem; }

.admin-form-group { margin-bottom: 16px; }
.admin-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.admin-input {
    width: 100%;
    max-width: 480px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.12); }

.admin-textarea {
    resize: vertical;
    min-height: 120px;
    width: 100%;
    max-width: 640px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}

.admin-textarea:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.12); }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-stat-value { font-size: 2rem; font-weight: 700; color: #1890ff; }
.admin-stat-label { font-size: 0.85rem; color: #999; margin-top: 4px; }

.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-blue { background: #e6f7ff; color: #1890ff; }
.badge-green { background: #f6ffed; color: #52c41a; }
.badge-orange { background: #fff7e6; color: #fa8c16; }
.badge-red { background: #fff1f0; color: #ff4d4f; }

.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #001529;
}

.admin-login-card {
    width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.admin-login-card h1 { text-align: center; font-size: 1.4rem; margin-bottom: 8px; color: #333; }
.admin-login-card .auth-subtitle { text-align: center; color: #999; margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .search-bar { order: 3; max-width: 100%; width: 100%; margin-top: 8px; }
    .nav-links { display: none; }

    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero-title { font-size: 2rem; }
    .hero-actions { justify-content: center; }
    .hero-right { display: none; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .products-layout { grid-template-columns: 1fr; }
    .products-sidebar { display: none; }

    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .detail-actions { flex-wrap: wrap; }

    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-sidebar { position: static; }

    .user-layout { grid-template-columns: 1fr; }
    .user-sidebar { display: flex; overflow-x: auto; padding: 12px; }
    .user-sidebar h3 { display: none; }
    .user-sidebar a { white-space: nowrap; padding: 8px 14px; }

    .features-grid { grid-template-columns: 1fr 1fr; }

    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-nav { display: flex; overflow-x: auto; }
    .admin-nav a { white-space: nowrap; }

    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) { display: none; }

    .order-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
}
