/* ==========================================================================
   NexoMart - Main Style Sheet
   Owner: Hafiz Musa Ali Zafar
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES & RESET
   ========================================================================== */
:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fb923c;
    --primary-bg: #fff7ed;
    --secondary: #0f2b4b;
    --secondary-light: #1e3a5f;
    --secondary-dark: #091a2e;
    --bg-light: #f4f6fa;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(15, 43, 75, 0.08);
    --shadow-md: 0 10px 25px -5px rgba(15, 43, 75, 0.12);
    --shadow-lg: 0 20px 40px -10px rgba(15, 43, 75, 0.2);
    --shadow-xl: 0 30px 60px -15px rgba(15, 43, 75, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-light: #121212;
    --bg-white: #1e1e2e;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-light: #64748b;
    --border-color: #2d3748;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   3. UTILITY CLASSES
   ========================================================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-secondary); }
.text-white { color: var(--text-white); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    text-align: center;
    min-height: 48px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.45);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
    min-height: 56px;
}

.btn-full {
    width: 100%;
}

.btn-rounded {
    border-radius: var(--radius-full);
}

/* ==========================================================================
   5. CARDS
   ========================================================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   6. FORMS
   ========================================================================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-family);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================================
   7. HEADER & NAVIGATION
   ========================================================================== */
.top-bar {
    background: var(--secondary);
    color: var(--text-light);
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar a {
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--primary);
}

.header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    flex-shrink: 0;
}

.logo i {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.logo span {
    color: var(--primary);
}

/* Search Bar */
.search-wrapper {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    padding: 4px 6px 4px 18px;
    transition: var(--transition);
}

.search-bar:focus-within {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.92rem;
    color: var(--text-primary);
    padding: 8px 0;
    min-width: 0;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-btn i {
    font-size: 1rem;
}

.nav-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-white);
    min-width: 18px;
    text-align: center;
}

/* User Chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.user-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-chip .logout-btn {
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.user-chip .logout-btn:hover {
    color: #ef4444;
}

/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */
.hero-section {
    padding: 24px 0;
}

.hero-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.hero-banner::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 55%;
}

.hero-badge {
    display: inline-block;
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary-light);
    border: 1px solid var(--primary);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-title span {
    color: var(--primary-light);
}

.hero-desc {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 450px;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.hero-tag {
    background: var(--bg-white);
    color: var(--secondary);
    padding: 20px 28px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.hero-tag h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-tag p {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* ==========================================================================
   9. SECTION STYLES
   ========================================================================== */
.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 28px;
    background: var(--primary);
    border-radius: 4px;
}

.section-link {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.section-link:hover {
    color: var(--primary-dark);
    gap: 8px;
}

/* ==========================================================================
   10. CATEGORY GRID
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover,
.category-card.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.category-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary);
    transition: var(--transition);
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
    background: var(--primary);
    color: #fff;
}

.category-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.category-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   11. PRODUCT GRID
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.product-image-wrap {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 43, 75, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay .btn {
    background: #fff;
    color: var(--secondary);
    padding: 8px 18px;
    font-size: 0.8rem;
    border-radius: var(--radius-full);
    transform: scale(0.9);
    transition: var(--transition);
}

.product-card:hover .product-overlay .btn {
    transform: scale(1);
}

.product-details {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-category {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    cursor: pointer;
}

.product-name:hover {
    color: var(--primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.product-rating .stars {
    color: #f59e0b;
}

.product-rating .count {
    color: var(--text-secondary);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.product-price .current {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.product-price .old {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.btn-add-cart {
    width: 100%;
    background: var(--bg-white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--primary);
    color: #fff;
}

.btn-add-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   12. FILTER BAR
   ========================================================================== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--bg-white);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.filter-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-info span {
    color: var(--primary);
}

.filter-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-sort label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-sort select {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    outline: none;
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
}

/* ==========================================================================
   13. CART DRAWER
   ========================================================================== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 43, 75, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-white);
    z-index: 9999;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.cart-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.cart-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-light);
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.cart-item-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.cart-qty-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.cart-qty-btn:hover {
    background: var(--border-color);
}

.cart-qty-value {
    width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.cart-remove-btn {
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 4px;
}

.cart-remove-btn:hover {
    color: #ef4444;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.cart-empty i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 12px;
}

.cart-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-white);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.cart-summary.total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.cart-summary.total span:last-child {
    color: var(--primary);
}

/* ==========================================================================
   14. MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 43, 75, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-light);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    z-index: 10;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-image {
    min-height: 300px;
    background: var(--bg-light);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-content .product-name {
    font-size: 1.3rem;
    min-height: auto;
    -webkit-line-clamp: unset;
}

.modal-content .product-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 12px 0;
    line-height: 1.6;
}

/* ==========================================================================
   15. TOAST NOTIFICATION
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--secondary);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 11000;
    border-left: 4px solid var(--primary);
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.footer {
    background: var(--secondary);
    color: var(--text-light);
    padding-top: 50px;
    border-top: 4px solid var(--primary);
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.payment-methods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.payment-method {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==========================================================================
   17. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .hero-banner {
        padding: 30px 24px;
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-desc {
        max-width: 100%;
    }
    
    .hero-visual {
        margin-top: 20px;
    }
    
    .hero-tag {
        padding: 14px 24px;
    }
    
    .hero-tag h3 {
        font-size: 2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .category-card {
        padding: 12px 8px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .category-name {
        font-size: 0.7rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image-wrap {
        height: 160px;
    }
    
    .product-name {
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    .product-price .current {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        min-height: 200px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .cart-drawer {
        max-width: 100%;
        right: -100%;
    }
    
    .search-wrapper {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 8px;
    }
    
    .main-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .product-image-wrap {
        height: 140px;
    }
    
    .product-details {
        padding: 10px 12px 12px;
    }
    
    .product-name {
        font-size: 0.8rem;
        min-height: 32px;
    }
    
    .product-price .current {
        font-size: 0.9rem;
    }
    
    .btn-add-cart {
        padding: 8px;
        font-size: 0.75rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .category-card {
        padding: 8px 4px;
    }
    
    .category-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .category-name {
        font-size: 0.6rem;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-sort {
        flex-wrap: wrap;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-banner {
        padding: 20px 16px;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   18. LOADING STATES
   ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, var(--border-color) 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   19. THEME TOGGLE
   ========================================================================== */
.theme-toggle {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}