/**
 * Savan Mobile - Modern Mobile Store Design
 * Professional, Clean, Luxury & Responsive CSS
 */

/* ========================================
   1. RESET & BASE STYLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;

    /* Accent Colors */
    --accent: #f59e0b;
    --accent-dark: #d97706;

    /* Neutral Colors */
    --dark: #1f2937;
    --dark-light: #374151;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --gray-lighter: #e5e7eb;
    --light: #f9fafb;
    --white: #ffffff;

    /* Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Typography */
    --font-primary: 'Inter', 'Poppins', 'Noto Sans Lao Looped', 'Phetsarath', 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Inter', 'Poppins', 'Noto Sans Lao Looped', 'Phetsarath', 'Noto Sans Lao', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', 'Poppins', 'Noto Sans Lao Looped', 'Phetsarath', 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', 'Poppins', 'Noto Sans Lao Looped', 'Phetsarath', 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

button {
    font-family: 'Inter', 'Poppins', 'Noto Sans Lao Looped', 'Phetsarath', 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

/* ========================================
   2. UTILITY CLASSES
======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mt-5 {
    margin-top: var(--spacing-xl);
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.mb-5 {
    margin-bottom: var(--spacing-xl);
}

.py-1 {
    padding-top: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
}

.py-2 {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.py-3 {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.py-4 {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.py-5 {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

/* ========================================
   3. HEADER & NAVIGATION
======================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-top {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0.4rem 0;
    font-size: 0.8rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact i {
    margin-right: 0.25rem;
}

.header-contact span {
    margin-right: var(--spacing-md);
}

.header-social a {
    color: var(--white);
    margin-left: var(--spacing-sm);
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-social a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.header-main {
    padding: var(--spacing-md) 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.logo i {
    font-size: 2rem;
}

.search-bar {
    flex: 1;
    max-width: 600px;
}

.search-form {
    position: relative;
    display: flex;
}

.search-input {
    width: 100%;
    padding: 0.875rem var(--spacing-md);
    padding-right: 3.5rem;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: var(--transition);
}

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

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-action {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: var(--dark);
    font-size: 0.875rem;
}

.header-action i {
    font-size: 1.5rem;
}

.header-action:hover {
    color: var(--primary);
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: var(--white);
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 1.25rem;
    text-align: center;
}

.nav {
    background: var(--white);
    border-top: 1px solid var(--gray-lighter);
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-link {
    display: block;
    padding: var(--spacing-md) var(--spacing-md);
    color: var(--dark);
    font-weight: 500;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    font-size: 1.75rem;
    color: var(--dark);
    padding: 0.5rem;
}

/* ========================================
   4. HERO SECTION
======================================== */
.hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(30, 64, 175, 0.95) 100%),
        url('../img/hero-bg.jpg') center/cover;
    color: var(--white);
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.hero-stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========================================
   5. BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ========================================
   6. SECTIONS
======================================== */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: var(--spacing-md) auto 0;
}

/* ========================================
   7. CATEGORY CARDS
======================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

/* ========================================
   8. PRODUCT CARDS
======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--danger);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.product-badge.new {
    background: var(--success);
}

.product-badge.trending {
    background: var(--accent);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: var(--spacing-sm);
    opacity: 0;
    transition: var(--transition);
}

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

.product-action-btn {
    width: 45px;
    height: 45px;
    background: var(--white);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
}

.product-action-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.product-body {
    padding: var(--spacing-md);
}

.product-category {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
}

.stars {
    color: var(--accent);
    font-size: 0.875rem;
}

.rating-count {
    color: var(--gray);
    font-size: 0.875rem;
}

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

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.product-old-price {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.add-to-cart-btn {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

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

/* ========================================
   9. BRANDS SECTION
======================================== */
.brands-slider {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.brand-item {
    opacity: 0.6;
    transition: var(--transition);
    filter: grayscale(100%);
}

.brand-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.brand-item img {
    max-height: 60px;
    width: auto;
}

/* ========================================
   10. FEATURES SECTION
======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.feature-desc {
    color: var(--gray);
    font-size: 0.9375rem;
}

/* ========================================
   11. FOOTER
======================================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding-top: var(--spacing-2xl);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget h3 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

.footer-widget p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.footer-contact i {
    color: var(--primary-light);
    margin-top: 0.25rem;
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: var(--transition);
}

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

.footer-bottom {
    padding: var(--spacing-lg) 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   12. FORMS
======================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.875rem var(--spacing-md);
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Inter', 'Poppins', 'Noto Sans Lao Looped', 'Phetsarath', 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ========================================
   13. ALERTS
======================================== */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* ========================================
   14. RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-2xl: 3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }

    /* Header Top - Hide on Mobile */
    .header-top {
        display: none;
    }

    /* Header Main - Simplified Layout */
    .header-main {
        padding: 0.75rem 0;
    }

    .header-main .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
        align-items: center;
    }

    /* Logo - Compact */
    .logo {
        font-size: 1.25rem;
        gap: 0.5rem;
        grid-column: 2;
        justify-self: center;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .logo span {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Mobile Menu Toggle - Left Side */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        grid-column: 1;
        font-size: 1.5rem;
    }

    /* Search Bar - Hidden, Show as Icon */
    .search-bar {
        display: none;
    }

    /* Header Actions - Compact Right Side */
    .header-actions {
        grid-column: 3;
        display: flex;
        gap: 0;
        align-items: center;
    }

    .header-action {
        padding: 0.5rem;
        min-width: 44px;
        height: 44px;
        justify-content: center;
    }

    .header-action span {
        display: none;
    }

    .header-action i {
        font-size: 1.25rem;
    }

    .header-action.user {
        display: none;
        /* Hide user on mobile, show in menu */
    }

    .header-action .badge {
        top: 2px;
        right: 2px;
        font-size: 0.625rem;
        min-width: 1rem;
        height: 1rem;
        padding: 0 0.25rem;
    }

    /* Navigation - Mobile Menu */
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-2xl);
        z-index: 9999;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        display: block;
        transform: translateX(0);
    }

    /* Mobile Menu Overlay */
    .nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        width: calc(100vw - 280px);
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Mobile Menu Header */
    .nav .container {
        padding: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .nav-list::before {
        content: '';
        display: block;
        padding: 1.5rem;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        font-size: 1.25rem;
        font-weight: 700;
    }

    .nav-list::before {
        content: 'Savanmobile Chanel';
    }

    .nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .nav-link i {
        width: 24px;
        text-align: center;
        font-size: 1.125rem;
    }

    .nav-link::after {
        display: none;
    }

    /* Add User Section in Mobile Menu */
    .nav-list li:first-child {
        background: var(--light);
        border-bottom: 2px solid var(--gray-lighter);
    }

    /* Content Adjustments */
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero h2 {
        font-size: 1.25rem;
    }

    .hero p {
        font-size: 0.9375rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .logo span {
        font-size: 1rem;
        max-width: 120px;
    }

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

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

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

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* ========================================
   15. ANIMATIONS
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* ========================================
   16. LOADING SPINNER
======================================== */
.spinner {
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

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

/* Product Price Section */
.product-price-top {
    margin-bottom: 1rem;
}

.price-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.product-actions-bottom {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.product-actions .order-btn,
.product-actions-bottom .order-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 0.5rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    height: 2.25rem;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
    line-height: 1.2;
}

.product-actions .order-btn:hover,
.product-actions-bottom .order-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.product-actions .add-to-cart-btn,
.product-actions-bottom .add-to-cart-btn {
    background: #059669 !important;
    color: #ffffff !important;
    border: 1px solid #059669 !important;
    padding: 0.5rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1.2;
    height: 2.25rem;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    line-height: 1.2;
}

.product-actions .add-to-cart-btn:hover,
.product-actions-bottom .add-to-cart-btn:hover {
    background: #047857 !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(4, 120, 87, 0.3);
}

/* Order Modal */
.order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.order-modal.active {
    opacity: 1;
    visibility: visible;
}

.order-modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.order-modal.active .order-modal-content {
    transform: translateY(0);
}

.order-modal h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.25rem;
}

.order-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.order-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-option.whatsapp {
    background: #25D366;
}

.order-option.whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.order-option.call {
    background: #3b82f6;
}

.order-option.call:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.order-option i {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.order-option-text {
    text-align: left;
}

.order-option-text .phone-number {
    font-size: 0.9rem;
    opacity: 0.9;
}

.close-modal {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #4b5563;
}

/* ========================================
   NEW HEADER TOP DROPDOWN STYLES
======================================== */

.header-top-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-toggle i:last-child {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.user-dropdown-toggle.active i:last-child {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-lighter);
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-lighter);
    font-size: 0.875rem;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-lighter);
    margin: 0.5rem 0;
}

.user-login-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn.register {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-btn.register:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.login-btn.login {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
}

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

.header-cart {
    position: relative;
    color: var(--white);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.header-cart:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.header-cart .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Mobile Responsive for Header Top */
@media (max-width: 768px) {
    .header-top {
        padding: 0.3rem 0;
    }

    .header-top .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-contact {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .header-top-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .user-dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 180px;
    }

    .user-dropdown-menu.show {
        transform: translateX(-50%) translateY(0);
    }

    .login-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   NOTIFICATION STYLES
======================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.notification-success .notification-icon {
    color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.notification-error .notification-icon {
    color: #ef4444;
}

.notification-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.notification-warning .notification-icon {
    color: #f59e0b;
}

.notification-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.notification-info .notification-icon {
    color: #3b82f6;
}

.notification-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-message {
    color: #374151;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
}

/* Mobile notification styles */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        padding: 0.875rem 1rem;
    }

    .notification-message {
        font-size: 0.9rem;
    }
}

/* Animation for cart icon bounce */
@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        transform: translate3d(0, -8px, 0);
    }

    70% {
        transform: translate3d(0, -4px, 0);
    }

    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.bounce {
    animation: bounce 0.5s ease-in-out;
}















/* ========================================
   MOBILE MENU STYLES - SIMPLIFIED
======================================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.75rem;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1001;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 1000;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-lighter);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.mobile-menu-header h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid var(--gray-lighter);
}

.mobile-nav-list a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.mobile-nav-list a i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
    font-size: 1.125rem;
    color: var(--primary);
}

.mobile-nav-list a:hover {
    background: var(--light);
    color: var(--primary);
}

.mobile-user-info {
    background: var(--light);
    border-bottom: 2px solid var(--gray-lighter) !important;
}

.mobile-user-info a {
    background: var(--light);
    font-weight: 600;
}

.mobile-nav-list .logout {
    color: var(--danger);
}

.mobile-nav-list .logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

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

    /* Hide desktop navigation on mobile */
    .nav {
        display: none;
    }

    .header-top {
        display: none;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        top: 0.75rem;
        right: 0.75rem;
        width: 2.75rem;
        height: 2.75rem;
    }

    .mobile-menu-header {
        padding: 1rem;
    }

    .mobile-nav-list a {
        padding: 0.875rem 1rem;
    }
}


















/* ========================================
   IMPROVED RESPONSIVE DESIGN
======================================== */

@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }

    .header-main .container {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }

    .search-bar {
        max-width: 400px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {

    /* Header Top - Improved Mobile Layout */
    .header-top {
        padding: 0.5rem 0;
        font-size: 0.75rem;
    }

    .header-top .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .header-contact {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .header-contact span {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }

    .header-top-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Header Main - Optimized Mobile Layout */
    .header-main {
        padding: 0.75rem 0;
    }

    .header-main .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
        align-items: center;
    }

    .logo {
        font-size: 1.1rem;
        justify-self: center;
    }

    .logo span {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Search Bar - Mobile Optimized */
    .search-bar {
        display: none;
    }

    .mobile-search-active .search-bar {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        z-index: 1000;
    }

    /* Header Actions - Compact Mobile */
    .header-actions {
        gap: 0.5rem;
    }

    .header-action {
        padding: 0.375rem;
        min-width: 44px;
        height: 44px;
    }

    .header-action span {
        display: none;
    }

    .header-action i {
        font-size: 1.1rem;
    }

    /* Navigation - Improved Mobile Menu */
    .nav {
        display: none;
    }

    .nav.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-2xl);
        z-index: 9999;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        padding: 0;
        height: 100%;
    }

    .nav-list::before {
        content: 'Savanmobile Menu';
        display: block;
        padding: 1.5rem;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        text-align: center;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 0.95rem;
    }

    .nav-link i {
        width: 20px;
        text-align: center;
    }

    .nav-link::after {
        display: none;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--white);
        border: 1px solid var(--gray-lighter);
        border-radius: var(--radius-md);
        font-size: 1.25rem;
        color: var(--dark);
        cursor: pointer;
        transition: var(--transition);
    }

    .mobile-menu-toggle:hover {
        background: var(--light);
    }

    /* Content Adjustments */
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }

    .header-top {
        font-size: 0.7rem;
    }

    .logo span {
        max-width: 120px;
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

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

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Improved Mobile Navigation */
    .nav.active {
        width: 100%;
    }

    .nav-link {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }

    /* Footer Mobile Optimization */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .header-actions {
        gap: 0.25rem;
    }

    .header-action {
        min-width: 40px;
        height: 40px;
        padding: 0.25rem;
    }

    .logo span {
        max-width: 100px;
        font-size: 0.9rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   TOUCH-FRIENDLY IMPROVEMENTS
======================================== */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover::after {
        width: 0;
    }

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

    .btn:hover {
        transform: none;
    }

    /* Improve touch targets */
    .nav-link {
        padding: 1rem 1.25rem;
    }

    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .form-control {
        min-height: 44px;
    }
}

/* ========================================
   DARK MODE SUPPORT
======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --dark: #f9fafb;
        --light: #1f2937;
        --white: #374151;
        --gray-lighter: #4b5563;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {

    .header,
    .footer,
    .mobile-menu-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}










/* ========================================
   MOBILE NAVIGATION FIXES
======================================== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Navigation Mobile Styles */
.nav {
    transition: transform 0.3s ease;
}

.nav-list .mobile-user-item {
    display: none;
}

/* Mobile Navigation Active State */
body.nav-open {
    overflow: hidden;
}

.nav.active {
    transform: translateX(0);
}

.nav-link {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-2xl);
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        padding: 0;
        height: 100%;
    }

    .nav-list::before {
        content: 'Savanmobile Menu';
        display: block;
        padding: 1.5rem;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        text-align: center;
        margin: 0;
    }

    .nav-list .mobile-user-item {
        display: block;
        background: var(--light);
        border-bottom: 2px solid var(--gray-lighter);
    }

    .nav-list .mobile-user-item .nav-link {
        background: var(--light);
        font-weight: 600;
        color: var(--primary);
    }

    .nav-link {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1rem;
        min-height: 60px;
    }

    .nav-link i {
        width: 20px;
        text-align: center;
        font-size: 1.1rem;
    }

    .nav-link:hover,
    .nav-link:active {
        background: var(--light);
        color: var(--primary);
    }

    .nav-link::after {
        display: none;
    }

    /* Header Main Mobile Layout */
    .header-main .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        align-items: center;
    }

    .logo {
        justify-self: center;
        grid-column: 2;
    }

    .mobile-menu-toggle {
        grid-column: 1;
    }

    .header-actions {
        grid-column: 3;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav {
        width: 100%;
    }

    .nav-link {
        padding: 1.5rem 1.5rem;
        font-size: 1.1rem;
    }

    .nav-link i {
        font-size: 1.25rem;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 1.25rem 1.5rem;
        min-height: 60px;
    }

    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .nav-link:hover::after {
        width: 0;
    }
}

/* High-resolution devices */
@media (max-width: 768px) and (min-resolution: 2dppx) {
    .nav-link {
        border-bottom-width: 0.5px;
    }
}








/* ========================================
   LOGO LINK STYLES
======================================== */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.logo i {
    font-size: 2rem;
    transition: var(--transition);
}

.logo:hover i {
    transform: scale(1.1);
}

/* ========================================
   MOBILE NAVIGATION FIXES
======================================== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Navigation Mobile Styles */
.nav {
    transition: transform 0.3s ease;
}

.nav-list .mobile-user-item {
    display: none;
}

/* Mobile Navigation Active State */
body.nav-open {
    overflow: hidden;
}

.nav.active {
    transform: translateX(0);
}

.nav-link {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-2xl);
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        padding: 0;
        height: 100%;
    }

    .nav-list::before {
        content: 'Savanmobile Menu';
        display: block;
        padding: 1.5rem;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        text-align: center;
        margin: 0;
    }

    .nav-list .mobile-user-item {
        display: block;
        background: var(--light);
        border-bottom: 2px solid var(--gray-lighter);
    }

    .nav-list .mobile-user-item .nav-link {
        background: var(--light);
        font-weight: 600;
        color: var(--primary);
    }

    .nav-link {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--gray-lighter);
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1rem;
        min-height: 60px;
        color: var(--dark);
    }

    .nav-link i {
        width: 20px;
        text-align: center;
        font-size: 1.1rem;
        color: var(--primary);
    }

    .nav-link:hover,
    .nav-link:active {
        background: var(--light);
        color: var(--primary);
    }

    .nav-link.active {
        background: var(--primary);
        color: var(--white);
    }

    .nav-link.active i {
        color: var(--white);
    }

    .nav-link::after {
        display: none;
    }

    /* Header Main Mobile Layout */
    .header-main .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        align-items: center;
    }

    .logo {
        justify-self: center;
        grid-column: 2;
        font-size: 1.25rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .logo span {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu-toggle {
        grid-column: 1;
    }

    .header-actions {
        grid-column: 3;
    }

    /* Hide search bar on mobile */
    .search-bar {
        display: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav {
        width: 100%;
    }

    .nav-link {
        padding: 1.5rem 1.5rem;
        font-size: 1.1rem;
    }

    .nav-link i {
        font-size: 1.25rem;
    }

    .logo span {
        max-width: 120px;
        font-size: 1.1rem;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 1.25rem 1.5rem;
        min-height: 60px;
    }

    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .logo {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .nav-link:hover::after {
        width: 0;
    }

    .logo:hover {
        transform: none;
    }
}




/* ========================================
   NOTIFICATION STYLES
======================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    min-width: 300px;
    border-left: 4px solid;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.notification-success i {
    color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.notification-error i {
    color: #ef4444;
}

.notification-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.notification-warning i {
    color: #f59e0b;
}

.notification-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.notification-info i {
    color: #3b82f6;
}







/* ========================================
   MOBILE NAVIGATION FIXES - COMPLETE SOLUTION
======================================== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Navigation Styles for Mobile */
@media (max-width: 768px) {

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hide desktop navigation by default */
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-2xl);
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    /* Show navigation when active */
    .nav.active {
        display: block;
        transform: translateX(0);
    }

    /* Navigation list styles */
    .nav-list {
        flex-direction: column;
        padding: 0;
        margin: 0;
        height: 100%;
    }

    /* Mobile menu header */
    .nav-list::before {
        content: 'Savanmobile Menu';
        display: block;
        padding: 1.5rem;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        text-align: center;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Navigation items */
    .nav-list li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid var(--gray-lighter);
    }

    /* Mobile user item */
    .nav-list .mobile-user-item {
        background: var(--light);
        border-bottom: 2px solid var(--gray-lighter);
    }

    .nav-list .mobile-user-item .nav-link {
        background: var(--light);
        font-weight: 600;
        color: var(--primary);
    }

    /* Navigation links */
    .nav-link {
        padding: 1.25rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1rem;
        min-height: 60px;
        color: var(--dark);
        text-decoration: none;
        transition: var(--transition);
        width: 100%;
        border: none;
    }

    .nav-link:hover,
    .nav-link:active {
        background: var(--light);
        color: var(--primary);
    }

    .nav-link.active {
        background: var(--primary);
        color: var(--white);
    }

    .nav-link.active i {
        color: var(--white);
    }

    .nav-link i {
        width: 20px;
        text-align: center;
        font-size: 1.1rem;
        color: var(--primary);
    }

    .nav-link::after {
        display: none;
    }

    /* Header layout for mobile */
    .header-main .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        align-items: center;
    }

    .logo {
        justify-self: center;
        grid-column: 2;
        font-size: 1.25rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        grid-column: 1;
    }

    .header-actions {
        grid-column: 3;
    }

    /* Hide search bar on mobile */
    .search-bar {
        display: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav {
        width: 100%;
    }

    .nav-link {
        padding: 1.5rem 1.5rem;
        font-size: 1.1rem;
    }

    .nav-link i {
        font-size: 1.25rem;
    }
}

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

/* Desktop styles - ensure nav is visible */
@media (min-width: 769px) {
    .nav {
        display: block !important;
        position: static;
        width: auto;
        height: auto;
        transform: none;
        background: transparent;
        box-shadow: none;
    }

    .nav-list {
        flex-direction: row;
    }

    .nav-list::before {
        display: none;
    }

    .nav-list .mobile-user-item {
        display: none;
    }

    .nav-link {
        padding: var(--spacing-md) var(--spacing-md);
        min-height: auto;
    }

    .nav-link::after {
        display: block;
    }
}












/* ========================================
   MOBILE NAVIGATION - WORKING FIX
======================================== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Navigation Styles */
.nav {
    transition: all 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hide nav on mobile by default */
    .nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    /* Show nav when active */
    .nav.active {
        left: 0;
    }

    /* Navigation list */
    .nav-list {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    /* Mobile menu header */
    .nav-list::before {
        content: 'Savanmobile Menu';
        display: block;
        padding: 20px;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        text-align: center;
        margin: 0;
    }

    /* Navigation items */
    .nav-list li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    /* Navigation links */
    .nav-link {
        padding: 15px 20px;
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 1rem;
        color: #333;
        text-decoration: none;
        width: 100%;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        background: #f8f9fa;
        color: var(--primary);
    }

    .nav-link i {
        width: 20px;
        text-align: center;
        color: var(--primary);
    }

    /* Mobile user item */
    .mobile-user-item {
        background: #f8f9fa;
        border-bottom: 2px solid #e9ecef !important;
    }

    .mobile-user-item .nav-link {
        background: #f8f9fa;
        font-weight: 600;
        color: var(--primary);
    }

    /* Header layout - Hamburger on RIGHT */
    .header-main .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding-right: 20px !important;
        /* Space from right edge */
    }

    .logo {
        order: 1 !important;
        margin-right: auto !important;
        /* Push everything else to the right */
    }

    .header-actions {
        order: 2 !important;
        display: flex !important;
        gap: 10px !important;
    }

    .mobile-menu-toggle {
        order: 3 !important;
        /* Last = rightmost */
        margin-left: 15px !important;
    }

    /* Hide search bar */
    .search-bar {
        display: none !important;
    }

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

/* Desktop styles */
@media (min-width: 769px) {
    .nav {
        position: static !important;
        width: auto !important;
        height: auto !important;
        left: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .nav-list::before {
        display: none !important;
    }

    .mobile-user-item {
        display: none !important;
    }

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

/* ========================================
   FORCE MOBILE MENU - FINAL FIX
======================================== */
@media (max-width: 768px) {

    /* Force hide nav on mobile */
    .nav {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2) !important;
        z-index: 10000 !important;
        overflow-y: auto !important;
    }

    /* Show nav ONLY when active */
    .nav.active {
        display: block !important;
    }

    /* Always show hamburger on mobile */
    .mobile-menu-toggle {
        display: flex !important;
        margin-right: 30px !important;
        /* Force space from right edge */
    }

    /* Overlay active */
    .mobile-menu-overlay.active {
        display: block !important;
        z-index: 9999 !important;
    }
}

/* Desktop - always show nav */
@media (min-width: 769px) {
    .nav {
        display: block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
    }

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

/* ============================================
   FINAL MOBILE HEADER OVERRIDE - DO NOT REMOVE
   ============================================ */
@media (max-width: 768px) {

    /* Force header container layout */
    .header-main .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 25px !important;
        /* Space from right edge */
        box-sizing: border-box !important;
    }

    /* Logo on LEFT */
    .logo {
        order: 1 !important;
        flex-shrink: 0 !important;
        margin-right: auto !important;
    }

    /* Actions in MIDDLE */
    .header-actions {
        order: 2 !important;
        display: flex !important;
        flex-shrink: 0 !important;
        gap: 8px !important;
    }

    /* Hamburger on FAR RIGHT with guaranteed spacing */
    .mobile-menu-toggle {
        order: 3 !important;
        display: flex !important;
        flex-shrink: 0 !important;
        margin-left: 15px !important;
        margin-right: 0 !important;
        /* padding-right on container handles this */
        position: static !important;
        right: auto !important;
    }
}