:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

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

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
}

.main-content {
    flex: 1;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-block {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background-color: #fffbeb;
    color: var(--warning);
    border: 1px solid #fde68a;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.navbar {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow-x: hidden;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
    overflow: hidden;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.navbar-nav a,
.navbar-nav button {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav a:hover,
.navbar-nav button:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
}

.navbar-nav a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.navbar-nav a svg,
.navbar-nav button svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
}

.navbar-nav a:hover svg,
.navbar-nav button:hover svg {
    opacity: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
}

.user-info strong {
    color: var(--text);
    font-weight: 600;
}

.role-badge {
    display: inline-flex;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge.customer {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   TABLET STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    /* Mobile menu overlay - BELOW sidebar (menu) so it doesn't block clicks */
    .mobile-menu-overlay {
        z-index: 9998 !important;
        pointer-events: none !important;
        background: transparent !important;
    }
    
    .mobile-menu-overlay.active {
        z-index: 9998 !important;
        pointer-events: none !important;
        background: transparent !important;
        display: none !important;
    }
    
    /* Hamburger Menu - Show on tablet */
    .hamburger {
        display: flex !important;
    }
    
    /* Navbar on tablet */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 105;
    }
    
    .navbar-content {
        padding: 0 16px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Mobile Menu - Slides from RIGHT on tablet */
    .navbar-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        transform: translateX(100%);
        width: 280px;
        max-width: 85vw;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin: 0;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        border-radius: 16px 0 0 16px;
        pointer-events: auto;
    }
    
    /* Menu open state */
    .navbar-nav.active,
    .navbar-nav.mobile-open {
        transform: translateX(0);
    }
    
    /* Menu header with gradient */
    .navbar-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 20px;
        background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
        color: white;
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 16px 0 0 0;
    }
    
    .navbar-nav-header h3 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
        flex-shrink: 0;
        padding-right: 16px;
    }
    
    /* Close button */
    .navbar-nav-close {
        width: 32px;
        height: 32px;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        border-radius: 8px;
        color: white;
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
        line-height: 1;
    }
    
    .navbar-nav-close:hover {
        background: #dc2626;
        transform: scale(1.1);
    }
    
    /* Menu links */
    .navbar-nav a,
    .navbar-nav button {
        font-size: 15px;
        padding: 14px 20px;
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 14px;
        border-radius: 0;
        color: #334155;
        background: transparent;
        border-left: none;
        border-right: none;
        border-top: none;
    }
    
    .navbar-nav a:hover,
    .navbar-nav button:hover {
        background: #f8fafc;
        color: var(--primary);
    }
    
    .navbar-nav a svg,
    .navbar-nav button svg {
        width: 20px;
        height: 20px;
        opacity: 0.6;
        color: var(--primary);
        flex-shrink: 0;
    }
    
    .navbar-nav a:hover svg,
    .navbar-nav button:hover svg {
        opacity: 1;
    }
    
    /* Register button in menu */
    .navbar-nav a.btn {
        margin: 16px 20px;
        padding: 14px 20px;
        background: var(--primary);
        color: white;
        border-radius: 10px;
        border-bottom: none;
        justify-content: center;
        font-weight: 600;
    }
    
    .navbar-nav a.btn:hover {
        background: var(--primary-hover);
    }
    
    .navbar-nav a.btn svg {
        opacity: 1;
        color: white;
    }
    
    /* User info section */
    .user-info {
        padding: 14px 20px;
        font-size: 14px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: #f8fafc;
    }
    
    .role-badge {
        width: fit-content;
    }
    
    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Products Page */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .products-controls {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .search-filter-row {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    
    .search-form {
        flex: 1 !important;
        min-width: 200px !important;
        flex-direction: row !important;
        gap: 10px !important;
    }
    
    .search-form input {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
    }
    
    .search-form .btn {
        padding: 10px 18px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .sort-select {
        min-width: 160px !important;
        max-width: 180px !important;
        padding: 10px 36px 10px 14px !important;
        font-size: 14px !important;
    }
    
    .categories-scroll {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .categories {
        gap: 8px !important;
        flex-wrap: nowrap !important;
        max-width: max-content !important;
    }
    
    .category-link {
        padding: 8px 14px !important;
        font-size: 13px !important;
        flex-shrink: 0 !important;
    }
    
    .products-info {
        margin-bottom: 12px !important;
    }
    
    .results-count {
        font-size: 13px !important;
        padding: 6px 14px !important;
    }
    
    .pagination {
        gap: 6px !important;
        margin-top: 32px !important;
        padding: 16px 0 !important;
    }
    
    .pagination-btn {
        min-width: 40px !important;
        height: 40px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
    }
    
    /* Product Card */
    .product-card {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px !important;
    }
    
    .product-media {
        aspect-ratio: 1 !important;
        width: 100% !important;
    }
    
    .product-info {
        padding: 12px !important;
    }
    
    .product-name {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin-bottom: 4px !important;
    }
    
    .product-category {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    .product-price {
        font-size: 16px !important;
    }
    
    .product-price.sale {
        font-size: 16px !important;
    }
    
    .product-price.regular {
        font-size: 12px !important;
    }
    
    .add-to-cart-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
    
    /* Product Detail Page */
    .product-detail {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
        padding: 16px !important;
        max-width: 100% !important;
    }
    
    .product-gallery {
        position: relative !important;
        top: 0 !important;
    }
    
    .main-image {
        max-height: 400px !important;
        border-radius: 12px !important;
        aspect-ratio: 1 !important;
        position: relative !important;
    }
    
    .main-image video {
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 1 !important;
        position: relative !important;
    }
    
    .thumbnail-grid {
        gap: 8px !important;
        margin-top: 12px !important;
    }
    
    .thumbnail {
        width: 60px !important;
        height: 60px !important;
    }
    
    .product-category-tag {
        font-size: 12px !important;
        padding: 4px 12px !important;
        margin-bottom: 12px !important;
    }
    
    .product-title {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    .product-price-detail {
        font-size: 26px !important;
    }
    
    .product-price-detail.sale {
        font-size: 28px !important;
    }
    
    .product-price-detail.regular {
        font-size: 18px !important;
    }
    
    .sale-tag {
        font-size: 12px !important;
        padding: 4px 12px !important;
    }
    
    .stock-status {
        font-size: 13px !important;
        padding: 8px 14px !important;
        margin-bottom: 16px !important;
    }
    
    .add-to-cart-section {
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .quantity-selector {
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 11 !important;
    }
    
    .btn-lg {
        flex: 1 !important;
        min-width: 160px !important;
        max-width: 300px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        position: relative !important;
        z-index: 12 !important;
        pointer-events: auto !important;
    }
    
    .add-to-cart-section .btn-primary {
        position: relative !important;
        z-index: 12 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    .product-description {
        margin-bottom: 24px !important;
    }
    
    .product-meta {
        padding-top: 20px !important;
    }
    
    /* Pricing Tiers */
    .pricing-tiers-section {
        padding: 12px !important;
        margin-bottom: 14px !important;
        overflow-x: auto !important;
    }
    
    .savings-display {
        padding: 12px 14px !important;
        margin-bottom: 14px !important;
    }
    
    .progress-suggestion {
        padding: 12px 14px !important;
        margin-bottom: 14px !important;
    }
    
    /* Variations */
    .variation-selectors {
        padding: 16px !important;
        margin-bottom: 20px !important;
    }
    
    .variation-btn {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    
    /* Frequently Bought Together */
    .frequently-bought-section {
        margin-top: 32px !important;
        padding: 16px 0 !important;
    }
    
    .fbt-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
    }
    
    /* Main content wrapper */
    .main-content {
        max-width: 100% !important;
        padding: 16px !important;
        overflow-x: hidden !important;
    }
    
        /* Footer */
        .footer {
            padding: 32px 16px !important;
        }
        
        /* Cart Sidebar */
        .cart-sidebar {
            max-width: 360px !important;
            z-index: 1200 !important;
        }
        
        .cart-overlay {
            z-index: 1150 !important;
        }
        
        /* Grid layout on tablet */
        .grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 16px !important;
        }
        
        /* Homepage section title */
        .section-title {
            margin-bottom: 24px !important;
        }
        
        .section-title h2 {
            font-size: 24px !important;
        }
        
        .section-title p {
            font-size: 14px !important;
        }
    }

/* ============================================
   MOBILE NAVIGATION STYLES
   ============================================ */

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span:not(:last-child) {
    margin-bottom: 5px;
}

.hamburger:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.hamburger.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.hamburger.active span {
    background: var(--primary);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay - Behind menu but covering rest of screen */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9998;
    pointer-events: none;
    transition: background 0.3s ease;
}

.mobile-menu-overlay.active {
    display: none;
    background: transparent;
    pointer-events: none;
    z-index: 9998;
}

/* Ensure navbar has proper z-index */
.navbar {
    position: sticky;
    top: 0;
    z-index: 900;
}

/* Mobile Menu Panel - Fixed to right side */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
    }

    /* Navbar container */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .navbar-content {
        padding: 0 16px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-brand {
        font-size: 20px;
    }

    .navbar-brand-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    /* Mobile Menu - Slides from RIGHT */
    .navbar-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        transform: translateX(100%);
        width: 280px;
        max-width: 85vw;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin: 0;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        border-radius: 16px 0 0 16px;
    }

    /* Menu open state */
    .navbar-nav.active,
    .navbar-nav.mobile-open {
        transform: translateX(0);
    }

    /* Menu header with gradient */
    .navbar-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 20px;
        background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
        color: white;
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 16px 0 0 0;
    }

    .navbar-nav-header h3 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
        flex-shrink: 0;
        padding-right: 16px;
    }

    /* Close button */
    .navbar-nav-close {
        width: 32px;
        height: 32px;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        border-radius: 8px;
        color: white;
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
        line-height: 1;
    }

    .navbar-nav-close:hover {
        background: #dc2626;
        transform: scale(1.1);
    }

    /* Menu links */
    .navbar-nav a,
    .navbar-nav button {
        font-size: 15px;
        padding: 14px 20px;
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 14px;
        border-radius: 0;
        color: #334155;
        background: transparent;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .navbar-nav a:hover,
    .navbar-nav button:hover {
        background: #f8fafc;
        color: var(--primary);
    }

    .navbar-nav a svg,
    .navbar-nav button svg {
        width: 20px;
        height: 20px;
        opacity: 0.6;
        color: var(--primary);
        flex-shrink: 0;
    }

    .navbar-nav a:hover svg,
    .navbar-nav button:hover svg {
        opacity: 1;
    }

    /* Register button in menu */
    .navbar-nav a.btn {
        margin: 16px 20px;
        padding: 14px 20px;
        background: var(--primary);
        color: white;
        border-radius: 10px;
        border-bottom: none;
        justify-content: center;
        font-weight: 600;
    }

    .navbar-nav a.btn:hover {
        background: var(--primary-hover);
    }

    .navbar-nav a.btn svg {
        opacity: 1;
        color: white;
    }

    /* User info section */
    .user-info {
        padding: 14px 20px;
        font-size: 14px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: #f8fafc;
    }

    .role-badge {
        width: fit-content;
    }

    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
    }

    /* Prevent clicks on main content when overlay active */
    body.menu-open .main-content {
        pointer-events: none;
    }
}

@media (max-width: 480px) {
    .navbar-content {
        padding: 0 12px;
        height: 56px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .navbar-brand-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
    }

    .hamburger span {
        width: 20px;
    }
}

@media (min-width: 769px) {
    .navbar-left {
        display: flex;
        align-items: center;
    }

    .navbar-right {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .navbar-brand {
        font-size: 24px;
        font-weight: 800;
        color: var(--primary);
        letter-spacing: -0.5px;
    }

    .navbar-nav {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .navbar-nav a,
    .navbar-nav button {
        font-size: 14px;
        font-weight: 500;
        color: #64748b;
        background: none;
        border: none;
        cursor: pointer;
        transition: color 0.2s;
        text-decoration: none;
    }

    .navbar-nav a:hover,
    .navbar-nav button:hover {
        color: var(--primary);
    }

    .hamburger {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .add-to-cart-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .add-to-cart-section {
        flex-direction: column;
    }

    .quantity-selector {
        width: 100%;
        justify-content: center;
    }

    .btn-lg {
        width: 100%;
    }
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 12px;
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px 8px;
    }
}

.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 16px;
    margin-bottom: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 32px;
    position: relative;
}

.hero .btn-primary {
    background: white;
    color: var(--primary);
    font-weight: 600;
    padding: 14px 32px;
    font-size: 16px;
    position: relative;
}

.hero .btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    font-size: 14px;
    color: var(--text-muted);
}

.user-info strong {
    color: var(--text);
}

.role-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    text-transform: uppercase;
    font-weight: 600;
}

.role-badge.admin {
    background: var(--error);
}

.role-badge.customer {
    background: var(--success);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-title p {
    font-size: 18px;
    color: var(--text-muted);
}

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-body {
    padding: 28px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.card-text {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}

.card-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.card-icon.orders { background: #dbeafe; }
.card-icon.orders svg { color: #2563eb; }
.card-icon.products { background: #dcfce7; }
.card-icon.products svg { color: #16a34a; }
.card-icon.revenue { background: #fef3c7; }
.card-icon.revenue svg { color: #d97706; }
.card-icon.users { background: #fce7f3; }
.card-icon.users svg { color: #db2777; }

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .auth-card {
        padding: 24px;
    }
}

.products-header {
    margin-bottom: 32px;
}

.products-controls {
    background: var(--surface);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.search-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-form {
    display: flex;
    gap: 12px;
    flex: 1;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-form .btn {
    padding: 12px 20px;
}

.sort-select {
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 14px center;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.sort-select:hover {
    border-color: var(--primary);
}

.categories-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
}

.categories-scroll::-webkit-scrollbar {
    height: 4px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 4px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

.categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
    max-width: max-content;
}

.category-link {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-link:hover,
.category-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.products-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.results-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

@media (max-width: 480px) {
    .products-info {
        margin-bottom: 16px;
    }
    
    .results-count {
        font-size: 12px;
        padding: 6px 12px;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .products-controls {
        padding: 10px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    
    .products-info {
        margin-bottom: 10px;
    }
    
    .search-filter-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .search-form {
        flex: 1;
        min-width: calc(100% - 110px);
        flex-direction: row;
        gap: 6px;
    }
    
    .search-form input {
        flex: 1;
        padding: 8px 10px;
        font-size: 13px;
        min-width: 0;
    }
    
    .search-form .btn {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .sort-select {
        width: auto;
        min-width: 100px;
        max-width: 140px;
        padding: 8px 30px 8px 10px;
        font-size: 13px;
    }
    
    .categories-scroll {
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .categories {
        gap: 6px;
    }
    
    .category-link {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100%;
        max-width: 100%;
    }
    
    .product-card {
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    .product-media {
        aspect-ratio: 1;
        width: 100%;
    }
    
    .product-card .sale-badge {
        position: absolute;
        top: 4px;
        left: 4px;
        padding: 2px 5px;
        font-size: 8px;
        border-radius: 4px;
    }
    
    .product-info {
        padding: 6px;
    }
    
    .product-name {
        font-size: 11px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        white-space: normal;
        margin-bottom: 2px;
        word-break: break-word;
    }
    
    .product-category {
        font-size: 9px;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    
    .price-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 3px;
        flex-wrap: nowrap;
    }
    
    .product-price {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .product-price.sale {
        font-size: 12px;
    }
    
    .product-price.regular {
        font-size: 9px;
        white-space: nowrap;
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 5px 6px;
        font-size: 10px;
        justify-content: center;
        border-radius: 4px;
    }
    
    .add-to-cart-btn svg {
        width: 10px;
        height: 10px;
    }
    
    .out-of-stock {
        font-size: 9px;
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 8px;
    }
    
    .product-info {
        padding: 6px;
    }
    
    .product-name {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    
    .product-price {
        font-size: 12px;
    }
    
    .product-price.sale {
        font-size: 12px;
    }
    
    .product-price.regular {
        font-size: 9px;
    }
    
    .add-to-cart-btn {
        padding: 5px 6px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .product-info {
        padding: 6px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 48px;
    padding: 24px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 600;
    background: white;
    border: 2px solid var(--border);
    color: var(--text);
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.pagination-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pagination-btn svg {
    width: 18px;
    height: 18px;
}

.pagination-ellipsis {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
}

.pagination-info {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .pagination {
        gap: 4px;
        margin-top: 32px;
        padding: 16px 0;
    }
    
    .pagination-btn {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 50%;
    }
    
    .pagination-btn svg {
        width: 16px;
        height: 16px;
    }
}

.product-card {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.product-media {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
    position: relative;
}

.product-media img,
.product-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-media img,
.product-card:hover .product-media video {
    transform: scale(1.05);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.4;
}

.product-category {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price.sale {
    color: #ef4444;
    font-size: 22px;
}

.product-price.regular {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 500;
}

.sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    display: flex !important;
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.add-to-cart-form {
    display: inline;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.out-of-stock {
    font-size: 12px;
    color: var(--error);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
}

.admin-table {
    width: 100%;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.admin-table td {
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.stock-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: #dcfce7;
    color: #166534;
}

.stock-badge.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.media-count {
    display: inline-block;
    margin-right: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-danger {
    background: var(--error);
    color: white;
}

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

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

.form-section,
.media-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.form-section h3,
.media-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.upload-form {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-type {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 2px 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 11px;
    border-radius: 4px;
    text-transform: uppercase;
}

.btn-remove-media {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.no-media {
    color: var(--text-muted);
    font-size: 14px;
}

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

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    gap: 16px;
    background: var(--surface);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

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

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.item-price {
    color: var(--text-muted);
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--surface);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.quantity-control span {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
}

.item-total {
    font-weight: 600;
    color: var(--primary);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--error);
    font-size: 13px;
    cursor: pointer;
}

.btn-remove:hover {
    text-decoration: underline;
}

.cart-summary {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
}

.guest-notice {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.status-badge,
.payment-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.processing { background: #dbeafe; color: #1e40af; }
.status-badge.shipped { background: #e0e7ff; color: #4338ca; }
.status-badge.delivered { background: #dcfce7; color: #166534; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

.payment-badge.paid { background: #dcfce7; color: #166534; }
.payment-badge.pending { background: #fef3c7; color: #92400e; }
.payment-badge.failed { background: #fee2e2; color: #991b1b; }

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

.detail-card {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.detail-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.detail-card p {
    font-size: 14px;
    margin-bottom: 8px;
}

.order-items {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.order-items h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

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

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.item-details p {
    font-size: 13px;
    color: var(--text-muted);
}

.item-total {
    font-weight: 600;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 18px;
    font-weight: 700;
}

.checkout-form {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.checkout-form h2 {
    margin-bottom: 24px;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
}

.delivery-option:hover,
.delivery-option.selected {
    border-color: var(--primary);
    background: #f8fafc;
}

.delivery-option input {
    display: none;
}

.delivery-option .option-content {
    flex: 1;
}

.delivery-option .option-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.delivery-option .option-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.payment-options {
    display: flex;
    gap: 12px;
}

.payment-option {
    flex: 1;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--primary);
    background: #f8fafc;
}

.payment-option input {
    display: none;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.checkout-total .label {
    font-size: 16px;
}

.checkout-total .amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .form-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 12px;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1100;
}

.cart-icon svg {
    width: 22px;
    height: 22px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error);
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

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

.cart-sidebar-header h3 {
    font-size: 18px;
}

.cart-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.cart-close:hover {
    background: #e2e8f0;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

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

.cart-item-mini {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 12px;
}

.cart-item-mini-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}

.cart-item-mini-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-mini-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
}

.cart-item-mini-details {
    flex: 1;
    min-width: 0;
}

.cart-item-mini-details h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-mini-details p {
    font-size: 13px;
    color: var(--text-muted);
}

.cart-item-mini-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-control-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-radius: 4px;
    padding: 2px;
}

.qty-control-mini button {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.qty-control-mini button:hover {
    background: var(--primary);
    color: white;
}

.qty-control-mini span {
    min-width: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

.remove-item {
    background: none;
    border: none;
    color: var(--error);
    font-size: 12px;
    cursor: pointer;
}

.remove-item:hover {
    text-decoration: underline;
}

.cart-item-mini-total {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.cart-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.cart-sidebar-footer .btn {
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .cart-sidebar {
        max-width: 100%;
        right: -100%;
    }
}

/* ============================================
   CHECKOUT PAGE MOBILE STYLES
   ============================================ */

.checkout-page {
    max-width: 100%;
    padding: 20px 16px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 24px;
}

.checkout-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.checkout-note {
    font-size: 14px;
    color: var(--text-muted);
}

.checkout-form {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.checkout-form .form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.checkout-form .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-form .form-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text);
}

.checkout-form .form-group {
    margin-bottom: 16px;
}

.checkout-form .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.checkout-form .form-group input,
.checkout-form .form-group select,
.checkout-form .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
}

.checkout-form .form-group input:focus,
.checkout-form .form-group select:focus,
.checkout-form .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.checkout-form .form-group input:disabled {
    background: #f1f5f9;
    color: var(--text-muted);
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
    border-top: 2px solid var(--border);
    font-size: 18px;
}

.checkout-total .amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.delivery-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-option,
.payment-option {
    display: block;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.delivery-option:hover,
.payment-option:hover {
    border-color: var(--primary-light);
}

.delivery-option.selected,
.payment-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.delivery-option input,
.payment-option input {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-content svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.option-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.option-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.payment-option-content svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.payment-option-content div {
    display: flex;
    flex-direction: column;
}

.payment-option-content strong {
    font-size: 14px;
    color: var(--text);
}

.payment-option-content span {
    font-size: 12px;
    color: var(--text-muted);
}

.cart-items {
    margin-top: 24px;
}

.cart-items h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.cart-item-image .product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 10px;
    color: var(--text-muted);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h3 {
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info .item-price {
    font-size: 13px;
    color: var(--text-muted);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.cart-item-actions .item-total {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

@media (max-width: 480px) {
    .checkout-form {
        padding: 16px;
        border-radius: 12px;
    }
    
    .checkout-form .form-section {
        padding: 16px;
        margin-left: -16px;
        margin-right: -16px;
        border-bottom: none;
        border-top: 1px solid var(--border);
    }
    
    .checkout-form .form-section:first-of-type {
        border-top: none;
        margin-top: -16px;
    }
    
    .checkout-form .form-group input,
    .checkout-form .form-group select,
    .checkout-form .form-group textarea {
        padding: 14px 12px;
        font-size: 16px;
    }
    
    .checkout-total {
        padding: 16px;
        background: #f8fafc;
        border-radius: 12px;
        margin: 16px -16px 16px;
    }
    
    .delivery-option,
    .payment-option {
        padding: 12px;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 8px;
    }
}

/* ============================================
   PROFILE PAGE MOBILE STYLES
   ============================================ */

.profile-page {
    max-width: 100%;
    padding: 20px 16px;
}

.profile-header {
    text-align: center;
    margin-bottom: 24px;
}

.profile-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.profile-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.profile-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.profile-form .form-group {
    margin-bottom: 16px;
}

.profile-form .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}

.profile-form .form-group input,
.profile-form .form-group select,
.profile-form .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
}

.profile-form .form-group input:focus,
.profile-form .form-group select:focus,
.profile-form .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.password-section {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
}

.password-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .profile-card {
        padding: 16px;
        border-radius: 12px;
    }
    
    .profile-form .form-group input,
    .profile-form .form-group select,
    .profile-form .form-group textarea {
        padding: 14px 12px;
        font-size: 16px;
    }
    
    .password-section {
        padding: 12px;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }
}

/* ============================================
   IMPROVED MOBILE MENU STYLES
   ============================================ */

.hamburger {
    position: relative;
}

.hamburger::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
}

@media (max-width: 768px) {
    .hamburger {
        width: 44px;
        height: 44px;
        background: #fff;
        border: 2px solid #e2e8f0;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .hamburger:hover {
        background: #f8fafc;
        border-color: var(--primary);
    }
    
    .hamburger.active {
        background: var(--primary-light);
        border-color: var(--primary);
    }
    
    .hamburger span {
        display: block;
        width: 20px;
        height: 2.5px;
        background: #334155;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}
