/* ===============================================
   ANHTRAISTORE - MODERN E-COMMERCE v4.0
   Premium Design System
   =============================================== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary - Red Theme (matching login/register pages) */
    --primary: #e21b1b;
    --primary-dark: #c41515;
    --primary-light: #ff4444;
    --primary-bg: #fff5f5;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fff0f0;
    --info: #06b6d4;
    --info-bg: #ecfeff;
    
    /* Neutrals - Clean Dark */
    --dark: #1a1a2e;
    --slate-900: #1a1a2e;
    --slate-800: #2d2d44;
    --slate-700: #3d3d5c;
    --slate-600: #555577;
    --slate-500: #7070a0;
    --slate-400: #9999bb;
    --slate-300: #c0c0d9;
    --slate-200: #e0e0ee;
    --slate-100: #f0f0f8;
    --slate-50: #f8f9fb;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    
    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 20px rgba(226, 27, 27, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    background: var(--slate-50);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== UTILITIES ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===== TOPBAR ===== */
.topbar {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 10px 0;
    font-size: 0.8125rem;
    font-weight: 500;
}
.topbar-inner {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.topbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-item i { color: var(--primary-light); font-size: 0.875rem; }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}
.navbar-brand span { color: var(--primary); }

/* Search */
.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 500px;
}
.search-wrap input {
    width: 100%;
    background: var(--slate-100);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: 10px 16px 10px 44px;
    font-size: 0.875rem;
    outline: none;
    transition: all var(--transition-base);
}
.search-wrap input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}
.search-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: 4px;
    display: flex;
}
.search-btn:hover { color: var(--primary); }
.search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 300;
    max-height: 400px;
    overflow-y: auto;
}
.suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--slate-100);
}
.suggest-item:hover { background: var(--slate-50); }
.suggest-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--slate-100);
}
.suggest-name { font-weight: 600; font-size: 0.9rem; }
.suggest-price { font-size: 0.875rem; color: var(--primary); font-weight: 700; }
.suggest-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    border-top: 1px solid var(--slate-200);
}
.suggest-all:hover { background: var(--primary-bg); }

/* Navbar Actions (Wishlist, Cart, User) */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--slate-600);
    background: transparent;
    border: 1.5px solid var(--slate-200);
    transition: all 0.25s ease;
    font-size: 1.25rem;
    text-decoration: none;
}
.navbar-action:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
}
.navbar-action .action-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

/* Nav Links */
.nav-links { display: flex; gap: 2px; margin-right: auto; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-600);
    transition: all var(--transition-base);
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-bg); }

/* Cart */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;

    height: 40px;
    padding: 0 14px;

    background: var(--gradient-primary);
    color: #fff !important;
    border-radius: var(--radius-md);

    font-size: 0.85rem;
    font-weight: 700;

    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(226,27,27,0.3);

    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;

    box-sizing: border-box;
}
.cart-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226,27,27,0.4);
    color: #fff;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: var(--primary);
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Wishlist link trên navbar */
.wishlist-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    color: #fff;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border: none;
    transition: all 0.25s ease;
    font-size: 1rem;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.wishlist-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    color: #fff;
}
.wishlist-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--white);
    color: var(--danger);
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* Compare link trên navbar */
.compare-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    color: #fff;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border: none;
    transition: all 0.25s ease;
    font-size: 1rem;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.compare-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    color: #fff;
}
.compare-link.active {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}
.compare-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--white);
    color: var(--danger);
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* User Dropdown */
.user-dropdown { position: relative; }
.user-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
}
.user-dropdown-btn:hover { border-color: var(--primary); }
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    animation: dropdownIn 0.2s ease;
}
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.user-dropdown-menu.show { display: block; }
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(226,27,27,0.05) 100%);
}
.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.user-name { font-weight: 700; font-size: 0.9rem; }
.user-role { font-size: 0.75rem; color: var(--slate-500); }
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-700);
    transition: all var(--transition-fast);
}
.user-dropdown-item:hover { background: var(--slate-50); color: var(--primary); }
.user-dropdown-divider { height: 1px; background: var(--slate-200); }

/* User Area - đồng bộ với cart-link */
.user-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    height: 40px;
    padding: 0 14px;

    background: var(--gradient-primary);
    color: #fff !important;
    border-radius: var(--radius-md);

    font-size: 0.85rem;
    font-weight: 700;

    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(226,27,27,0.3);

    text-decoration: none;
    white-space: nowrap;

    width: auto;
    min-width: 0;
    flex-shrink: 0;

    cursor: pointer;
    border: none;

    box-sizing: border-box;
}
.user-area:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226,27,27,0.4);
    color: #fff;
}
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    height: 40px;
    padding: 0 14px;

    background: var(--gradient-primary);
    color: #fff !important;
    border-radius: var(--radius-md);

    font-size: 0.85rem;
    font-weight: 700;

    border: none;
    cursor: pointer;

    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(226,27,27,0.3);

    text-decoration: none;
    white-space: nowrap;

    width: auto;
    min-width: 0;
    flex-shrink: 0;

    box-sizing: border-box;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45); }
.hamburger-nav { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--dark); padding: 6px; }

/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
}
.mobile-menu-overlay.open { display: block; }
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: var(--white);
    z-index: 201;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.mobile-menu.open { display: block; transform: translateX(0); }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--slate-200); }
.mobile-menu-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.mobile-search { padding: 12px 20px; }
.mobile-search input {
    width: 100%;
    background: var(--slate-100);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    font-size: 0.9rem;
    outline: none;
}
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate-700);
}
.mobile-nav-item:hover { background: var(--primary-bg); color: var(--primary); }
.mobile-nav-divider { height: 1px; background: var(--slate-200); margin: 8px 0; }

/* ===== BREADCRUMB ===== */
.breadcrumb-bar {
    background: var(--white);
    border-bottom: 1px solid var(--slate-100);
    padding: 14px 0;
}
.breadcrumb-bar .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}
.breadcrumb-bar a { color: var(--slate-500); }
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar span { color: var(--dark); font-weight: 500; }
.breadcrumb-bar i { font-size: 0.625rem; color: var(--slate-400); }

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--dark);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(226,27,27,0.2) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 100%, rgba(236,72,153,0.15) 0%, transparent 50%);
}
.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.main-banner {
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: 40px 40px 46px;
    min-height: 420px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.4);
}
.main-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}
.banner-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
    width: fit-content;
}
.banner-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.18;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}
.banner-title span { display: block; font-size: 1rem; font-weight: 600; color: rgba(255,255,255,0.85); margin-top: 6px; }
.btn-banner {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: var(--primary);
    padding: 10px 18px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.82rem;
    transition: all var(--transition-base);
    width: fit-content;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-banner:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.side-banners { display: flex; flex-direction: column; gap: 20px; }
.side-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: var(--radius-2xl);
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(245,158,11,0.4);
}
.side-banner.side-2 { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 10px 30px -5px rgba(16,185,129,0.4); }
.side-banner::before { content: ''; position: absolute; top: -50%; right: -30%; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%); }
.side-banner-tag { font-size: 0.7rem; font-weight: 700; color: rgba(0,0,0,0.5); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.side-banner-title { font-size: 1.2rem; font-weight: 800; color: #000; line-height: 1.3; }

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.section-title { font-size: 1.75rem; font-weight: 800; color: var(--dark); display: flex; align-items: center; gap: 12px; letter-spacing: -0.02em; }
.section-title i { color: var(--primary); }
.section-link { display: flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 0.9rem; transition: all var(--transition-base); }
.section-link:hover { gap: 10px; }

/* ===== PRODUCT GRID ===== */
.products-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.product-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-slow);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover { border-color: var(--primary); box-shadow: var(--shadow-xl); transform: translateY(-8px); }
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(239,68,68,0.4);
}
.product-stock-badge {
    right: 12px;
    left: auto;
    background: var(--slate-500);
    box-shadow: 0 4px 12px rgba(100,116,139,0.3);
}
.product-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-50) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.08); }
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-brand { font-size: 0.65rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.product-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.product-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
    margin-top: auto;
    max-width: 100%;
}
.product-price { font-size: 1.25rem; font-weight: 800; color: var(--primary); word-break: break-word; line-height: 1.2; }
.product-old-price { font-size: 0.8rem; color: var(--slate-400); text-decoration: line-through; word-break: break-word; line-height: 1.2; }
.btn-add-cart {
    width: 100%;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(226,27,27,0.3);
}
.btn-add-cart:hover { box-shadow: 0 6px 20px rgba(226,27,27,0.4); }
.btn-add-cart.btn-out-of-stock,
.btn-add-cart.btn-out-of-stock:hover {
    background: var(--slate-300);
    color: var(--slate-500);
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h3 { font-weight: 700; color: var(--dark); margin-bottom: 8px; font-size: 1.25rem; }
.empty-state p { color: var(--slate-500); font-size: 0.9375rem; }
.empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }

/* ===== FOOTER ===== */
footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 80px 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.footer-brand span { color: var(--primary-light); }
.footer-desc { font-size: 0.9rem; line-height: 1.8; margin-bottom: 20px; max-width: 300px; }
.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badge { background: rgba(255,255,255,0.1); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-full); display: flex; align-items: center; gap: 6px; }
.footer-heading { font-size: 0.75rem; font-weight: 700; color: #fff; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1.5px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 0.9rem; transition: all var(--transition-fast); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact-item { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; margin-bottom: 14px; }
.footer-contact-item i { color: var(--primary-light); width: 20px; }
.footer-bottom { margin-top: 60px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,0.4); align-items: center; }

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal-box { background: var(--white); border-radius: var(--radius-2xl); width: 100%; max-width: 560px; max-height: 90vh; overflow: hidden; box-shadow: var(--shadow-2xl); animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--slate-200); }
.modal-header h3 { font-size: 1.2rem; font-weight: 700; margin: 0; }
.modal-close { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--slate-100); cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: all var(--transition-base); }
.modal-close:hover { background: var(--slate-200); transform: rotate(90deg); }
.modal-body { padding: 28px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 28px; border-top: 1px solid var(--slate-200); background: var(--slate-50); }
.modal-footer button { padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: all var(--transition-base); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius-lg); font-weight: 700; font-size: 0.9375rem; border: none; cursor: pointer; transition: all var(--transition-base); }
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: 0 4px 14px rgba(226,27,27,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(226,27,27,0.45); }
.btn-secondary { background: var(--slate-100); color: var(--slate-700); }
.btn-secondary:hover { background: var(--slate-200); }
.btn-outline { background: transparent; border: 2px solid var(--slate-200); color: var(--dark); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--gradient-danger); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,0.35); }
.btn-success { background: var(--gradient-success); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,0.35); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 18px 36px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; color: var(--dark); margin-bottom: 8px; font-size: 0.9rem; }
.form-label span { color: var(--danger); }
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--white);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-bg); }
.form-input::placeholder { color: var(--slate-400); }
.form-input:disabled { background: var(--slate-100); color: var(--slate-500); cursor: not-allowed; }
select.form-input { cursor: pointer; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .side-banners { display: none; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger-nav { display: block; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .navbar-inner { height: 64px; gap: 16px; }
    .search-wrap { display: none; }
    .hero-section { padding: 48px 0; }
    .main-banner { min-height: 320px; padding: 24px 24px 42px; }
    .banner-title { font-size: 1.55rem; }
    .banner-title span { font-size: 0.9rem; }
    .section { padding: 48px 0; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    
    /* Mobile menu */
    .hamburger-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        z-index: 10001;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-2xl);
        padding: 80px 24px 24px;
        overflow-y: auto;
    }
    .hamburger-nav.open { left: 0; }
    .hamburger-nav .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .hamburger-nav .nav-links a {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--slate-100);
        font-size: 1.1rem;
    }
    .hamburger-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .hamburger-overlay.open {
        opacity: 1;
        visibility: visible;
    }
    .hamburger-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        border: none;
        background: var(--slate-100);
        border-radius: 50%;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Chatbox mobile */
    .uc-container { bottom: 16px !important; right: 16px !important; }
    .uc-window { width: calc(100vw - 32px) !important; height: 70vh !important; bottom: 80px !important; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    
    /* Product card mobile */
    .product-card .product-info { padding: 12px; }
    .product-card .product-name { font-size: 0.9rem; }
    .product-card .product-price { font-size: 1rem; }
    
    /* Form mobile */
    .form-group { margin-bottom: 16px; }
    .btn { width: 100%; padding: 14px 24px; font-size: 1rem; }
    
    /* Cart mobile */
    .cart-item { flex-direction: column; gap: 12px; }
    .cart-item img { width: 80px; height: 80px; object-fit: cover; }
    
    /* Header mobile */
    .navbar-inner { height: 56px; padding: 0 12px; }
    .logo { font-size: 1.2rem; }
    .header-actions { gap: 8px; }
    
    /* Banner mobile */
    .main-banner { min-height: 240px; padding: 20px 20px 38px; }
    .banner-title { font-size: 1.3rem; }
    .banner-title span { font-size: 0.82rem; }
    
    /* Chatbox mobile small */
    .uc-window { width: calc(100vw - 16px) !important; right: 8px !important; bottom: 72px !important; }
    .uc-toggle { width: 52px; height: 52px; }
}

/* Toast Notification */
.custom-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    margin-bottom: 80px;
}
.custom-toast.success { background: linear-gradient(135deg, #22c55e 0%, #059669 100%); color: #fff; }
.custom-toast.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #fff; }
.custom-toast.info { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); color: #fff; }
.custom-toast.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; }
.custom-toast i { font-size: 1.2rem; }
@keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastSlideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* Custom Confirm Dialog */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.confirm-icon i, .confirm-icon .bi { font-size: 28px; color: #f59e0b; }
.confirm-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.confirm-message { font-size: 0.9rem; color: #64748b; margin-bottom: 24px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 12px; }
.confirm-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.confirm-btn.cancel { background: #f1f5f9; color: #475569; }
.confirm-btn.cancel:hover { background: #e2e8f0; }
.confirm-btn.confirm { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.confirm-btn.confirm:hover { box-shadow: 0 4px 12px rgba(239,68,68,0.4); transform: translateY(-1px); }

/* ===== PRODUCT VARIANT SELECTOR ===== */
.variant-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--slate-50);
    border-radius: var(--radius-xl);
}

.variant-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 12px;
}

.variant-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variant-storage-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-row-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-top: 10px;
    margin-bottom: 6px;
}

.variant-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.variant-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
    font-size: 0.875rem;
    gap: 6px;
}

.variant-chip:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.variant-chip.active,
.variant-chip.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-weight: 600;
}

.variant-storage-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
    min-width: 100px;
}

.variant-storage-chip:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.variant-storage-chip.active,
.variant-storage-chip.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.variant-storage-chip.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--slate-100);
}

.chip-storage {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}

.chip-price {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

.variant-storage-chip.out-of-stock .chip-storage {
    text-decoration: line-through;
    color: var(--slate-400);
}

.selected-variant-info {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--success-bg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-variant-info i {
    font-size: 1rem;
}
