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

/* DARK THEME ONLY - NO TOGGLE */
:root {
    /* Primary Colors - Modern Blue */
    --primary: #3b82f6;
    --primary-light: #1e3a8a;
    --primary-dark: #60a5fa;
    
    --secondary: #8b5cf6;
    --secondary-light: #5b21b6;
    --secondary-dark: #a78bfa;
    
    --accent: #f97316;
    --accent-light: #c2410c;
    
    --success: #10b981;
    --success-light: #047857;
    
    --warning: #f59e0b;
    --warning-light: #b45309;
    
    --error: #ef4444;
    --error-light: #b91c1c;
    
    --info: #06b6d4;
    --info-light: #0e7490;
    
    /* Text Colors */
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-light: #ffffff;
    
    /* Background Colors - Dark Theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    --border-color: #334155;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
    
    --header-height: 70px;
    --container-width: 1200px;
    --sidebar-width: 300px;
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --z-index-dropdown: 1000;
    --z-index-sticky: 1020;
    --z-index-modal: 1050;
    --z-index-popover: 1070;
    --z-index-tooltip: 1080;
}

/* ================== BASE STYLES ================== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal);
    animation: pageFadeIn 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ================== TYPOGRAPHY ================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

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

.text-primary {
    color: var(--primary);
}

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

.text-tertiary {
    color: var(--text-tertiary);
}

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

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

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

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

.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 800;
}

/* ================== UTILITY CLASSES ================== */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.mr-4 { margin-right: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 2rem; padding-bottom: 2rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }
.gap-6 { gap: 3rem; }

.flex-1 { flex: 1; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }

.self-start { align-self: flex-start; }
.self-center { align-self: center; }
.self-end { align-self: flex-end; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.rounded { border-radius: var(--border-radius-sm); }
.rounded-sm { border-radius: calc(var(--border-radius-sm) / 2); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-full { border-radius: 9999px; }

.border { border: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-l { border-left: 1px solid var(--border-color); }
.border-r { border-right: 1px solid var(--border-color); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-error { background-color: var(--error); }
.bg-info { background-color: var(--info); }
.bg-white { background-color: #ffffff; }

.text-white { color: #ffffff; }
.text-black { color: #000000; }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.select-none { user-select: none; }
.select-text { user-select: text; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }

.visible { visibility: visible; }
.invisible { visibility: hidden; }

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-auto { z-index: auto; }

.transition-all { transition: all var(--transition-normal); }
.transition-colors { transition: color var(--transition-normal), background-color var(--transition-normal); }
.transition-transform { transition: transform var(--transition-normal); }
.transition-opacity { transition: opacity var(--transition-normal); }

.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.translate-x-0 { --tw-translate-x: 0px; }
.translate-x-full { --tw-translate-x: 100%; }
.-translate-x-full { --tw-translate-x: -100%; }

.scale-0 { transform: scale(0); }
.scale-50 { transform: scale(0.5); }
.scale-75 { transform: scale(0.75); }
.scale-90 { transform: scale(0.9); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }
.scale-110 { transform: scale(1.1); }

.origin-top { transform-origin: top; }
.origin-top-right { transform-origin: top right; }
.origin-bottom { transform-origin: bottom; }
.origin-bottom-right { transform-origin: bottom right; }
.origin-left { transform-origin: left; }
.origin-right { transform-origin: right; }

/* ================== NOTIFICATION BANNER ================== */
.offers-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: var(--z-index-sticky);
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.banner-text {
    font-weight: 500;
    font-size: 0.95rem;
}

.promo-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-banner {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-banner:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.close-banner i {
    font-size: 1rem;
}

.offers-banner::before,
.offers-banner::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.offers-banner::before {
    left: 0;
    background: linear-gradient(to right, var(--primary), transparent);
}

.offers-banner::after {
    right: 0;
    background: linear-gradient(to left, var(--secondary), transparent);
}

/* ================== HEADER & NAVIGATION ================== */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-index-sticky);
    height: var(--header-height);
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: var(--bg-secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform var(--transition-normal);
}


/* ================== NAVIGATION LINKS - RED UNDERLINE INDICATOR ================== */

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    margin: 0 8px;
    border-radius: 0;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    background: transparent !important;
}

/* Red underline for active state - CLEAN & PROFESSIONAL */
.nav-link.active {
    color: var(--primary);
    background: transparent !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: 3px;
    animation: underlineSlide 0.3s ease-out;
}

/* Hover effect - subtle text color change, no background */
.nav-link:hover {
    color: var(--primary);
    background: transparent !important;
    transform: translateY(-1px);
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: 3px;
    opacity: 0.5;
}

/* Underline slide animation */
@keyframes underlineSlide {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* For mobile menu, keep the indicator but make it left-aligned instead of underline */

@media (max-width: 768px) {
    .nav-link {
        padding: 12px 16px;
        margin: 4px 0;
        border-radius: var(--border-radius);
        justify-content: flex-start;
    }
    
    .nav-link.active {
        background: rgba(239, 68, 68, 0.1) !important;
        border-left: 3px solid #ef4444;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-link:hover {
        background: rgba(239, 68, 68, 0.05) !important;
        transform: none;
    }
    
    .nav-link:hover::after {
        display: none;
    }
}



/* ================== USER PROFILE & NOTIFICATIONS ================== */

.user-profile {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    color: var(--text-primary);
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Header avatar – man icon (no circle background) */
.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    background: transparent !important;
    width: auto;
    height: auto;
    padding: 0;
}

/* Username text next to avatar */
.user-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: white;
    display: inline-block !important;
    margin-left: 4px;
}

/* Dropdown avatar – initials with gradient circle (visible in all themes) */
.user-avatar-lg {
    width: 30px !important;
    height: 30px !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    color: white !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-shadow: none !important;
}

/* Dropdown header */
.user-profile-header {
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* Light mode specific – ensure header background contrasts */
[data-theme="light"] .user-profile-header {
    background: #f1f5f9;
}

.user-profile-info {
    margin-top: 10px;
}

.user-profile-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-profile-email {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 2px;
}

.user-profile-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.user-profile-menu {
    padding: 10px 0;
}

.user-profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}

.user-profile-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Ensure the icon inside the header button doesn't block clicks */
.user-profile-btn .user-avatar i {
    pointer-events: none;
}

/* Dropdown container */
.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: var(--z-index-dropdown);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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


.notification-bell {
    position: relative;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    background: var(--bg-secondary);
}


/* Desktop cart badge */
#cartCount,
.notification-count {
    position: absolute;
    top: -2px;
    right: -8px;
    min-width: 14px;
    height: 14px;
    font-size: 0.6rem;
    padding: 0 3px;
    line-height: 1;
    border-radius: 10px;
    background: #ef4444;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Desktop notification bell wrapper */
.notification-bell {
    position: relative;
}

.icon-btn {
    position: relative;
}

@keyframes softPulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    overflow: hidden;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.notifications-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

.notification-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    display: flex;
    gap: 12px;
    position: relative;
    min-width: min-content;
    width: 100%;
    align-items: flex-start;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--primary);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: white;
}

.notification-item.success .notification-icon {
    background: var(--success);
}

.notification-item.error .notification-icon {
    background: var(--error);
}

.notification-item.warning .notification-icon {
    background: var(--warning);
}

.notification-item.info .notification-icon {
    background: var(--info);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.notification-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-delete:hover {
    background: #ef4444;
    color: white;
}

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

.empty-notifications i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ================== BUTTONS ================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: 1px solid var(--primary-dark);
    position: relative;
    z-index: 1;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

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

.btn-outline:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #d81b60 100%);
    color: white;
    border: 1px solid var(--error);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #d81b60 0%, var(--error) 100%);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    color: var(--text-primary);
    border: 1px solid var(--warning);
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #f59e0b 0%, var(--warning) 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
    border: 1px solid var(--success);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a 0%, var(--success) 100%);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn-xl {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    padding: 8px;
    width: 40px;
    height: 40px;
}

.button-loading {
    position: relative;
    color: transparent !important;
}

.button-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-outline.button-loading::after,
.btn-ghost.button-loading::after {
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: var(--primary);
}

.btn-danger.button-loading::after {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

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

/* ================== MAIN CONTENT & SECTIONS ================== */
.main-content {
    min-height: calc(100vh - var(--header-height) - 200px);
    padding: 2rem 0;
}

.section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ================== HERO SECTION ================== */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-radius: var(--border-radius-lg);
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle at 70% 50%, var(--primary-light) 0%, transparent 50%);
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
    background-size: 200% auto;
    animation: softGradientShift 3s ease infinite;
}

@keyframes softGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================== FILTERS & SEARCH ================== */
.filters-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 1rem;
    align-items: end;
}

.search-container {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    animation: softBorderPulse 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes softBorderPulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

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

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

/* ================== PRODUCTS GRID ================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
    margin-bottom: 3rem;
}

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

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

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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


/* ================== PRODUCT CARD ================== */
.product-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.6, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    will-change: transform, box-shadow;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 16px 36px rgba(0,0,0,0.3);
}

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.product-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 3px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-featured {
    background: #d32f2f;
}

.badge-trending {
    background: #b71c1c;
}

.badge-sale {
    background: #f44336;
}

.badge-new {
    background: #c62828;
}

.product-image {
    height: 220px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    animation: softImageLoad 0.5s ease-out;
}

@keyframes softImageLoad {
    from { opacity: 0; filter: blur(5px); }
    to { opacity: 1; filter: blur(0); }
}

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

.product-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3rem;
}

.product-category {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--warning);
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

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

.stars .filled {
    color: #ffc107;
}

.stars .empty {
    color: #4b5563;
}

.review-count {
    color: var(--text-tertiary);
    font-size: 0.65rem;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0.25rem 0 0.5rem;
}

.price-main {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.product-card:hover .price-main {
    transform: scale(1.05);
    color: var(--primary-dark);
}

.price-old {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.price-sale {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f87171;
}

.price-current {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card .btn-sm,
.product-card .btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.product-card .btn i {
    font-size: 0.8rem;
}

.product-card .btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .product-image {
        height: 180px;
    }
    .product-title {
        font-size: 0.85rem;
        min-height: 2.1rem;
    }
    .price-main {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .product-image {
        height: 160px;
    }
    .product-info {
        padding: 0.6rem;
    }
    .product-title {
        font-size: 0.8rem;
    }
    .price-main {
        font-size: 0.85rem;
    }
    .product-card .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .product-image {
        height: 140px;
    }
    .product-info {
        padding: 0.5rem;
    }
    .product-title {
        font-size: 0.75rem;
        min-height: 1.8rem;
    }
    .product-rating {
        font-size: 0.65rem;
    }
}

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(31, 41, 55, 0.9);
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    color: var(--error);
    background: var(--bg-card);
}

.wishlist-btn.active {
    animation: softHeartBeat 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    color: var(--error);
}

@keyframes softHeartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--error); }
}

.badge {
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ================== FEATURED PRODUCTS GRID ================== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}
/* ================== FEATURED PRODUCTS – COMPACT BOTTOM AREA ================== */
.featured-product {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;                     /* ensures consistent height */
}

/* Image area – let it grow as much as possible */
.featured-product-image {
    flex: 1;                         /* takes remaining space */
    min-height: 160px;               /* minimum height, will expand if card is taller */
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.featured-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;               /* covers the area nicely */
    transition: transform 0.3s ease;
}

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

/* Info area – squeezed to the bottom */
.featured-product-info {
    padding: 0.2rem 0.2rem !important;
    text-align: center;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.featured-product-info h4 {
    font-size: 1.0rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-price {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

/* Remove any extra spacing from the actions (since button is gone) */
.featured-product-actions {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .featured-product-info h4 {
        font-size: 1.0rem;
        white-space: normal;
        line-height: 1.2;
        min-height: 2.2rem;
    }
    .featured-price {
        font-size: 1.0rem;
    }
}

@media (max-width: 576px) {
    .featured-product-info {
        padding: 0.2rem !important;
    }
    .featured-product-info h4 {
        font-size: 1.0rem;
    }
}
/* ================== STATISTICS CARDS ================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
}

.stat-icon.bg-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%);
}

.stat-icon.bg-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stat-icon.bg-gradient-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.stat-icon.bg-gradient-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.stat-title {
    font-size: 0.80rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.05);
    color: var(--primary);
}

/* ================== CART SECTION ================== */
.cart-items-list {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

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

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

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

.cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.cart-item-category {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

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

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

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

.qty-btn:active {
    transform: scale(0.9);
}

.quantity {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-summary {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.summary-actions {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ================== ORDERS SECTION ================== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.order-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: var(--warning-light);
    color: var(--warning);
}

.status-processing {
    background: var(--info-light);
    color: var(--info);
}

.status-shipped {
    background: var(--primary-light);
    color: var(--primary);
}

.status-delivered {
    background: var(--success-light);
    color: var(--success);
}

.status-cancelled {
    background: var(--error-light);
    color: var(--error);
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-item span:first-child {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.order-item span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.order-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ================== ADMIN SECTION ================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--border-radius) - 4px);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.admin-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    animation: softTabActive 0.3s ease;
}

@keyframes softTabActive {
    from { transform: scale(0.95); }
    to { transform: scale(1); }
}

.admin-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab-content.active {
    display: block;
}

.dashboard-stats {
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow: hidden;
}

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

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.table tr:hover td {
    background: var(--bg-secondary);
}

.table tr {
    transition: all 0.2s ease;
}

.table tr:hover {
    transform: translateX(5px);
}

.product-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

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

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-email {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

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

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn.view:hover {
    background: var(--info-light);
    color: var(--info);
}

.action-btn.edit:hover {
    background: var(--warning-light);
    color: var(--warning);
}

.action-btn.delete:hover {
    background: var(--error-light);
    color: var(--error);
}

/* ================== SWITCH TOGGLE ================== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-tertiary);
    transition: var(--transition-fast);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.switch-label {
    margin-left: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

/* ================== CONTACT SECTION ================== */
.contact-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.contact-icon.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.contact-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.social-link:nth-child(1):hover { background: #1877f2; color: white; }
.social-link:nth-child(2):hover { background: #1da1f2; color: white; }
.social-link:nth-child(3):hover { background: #e4405f; color: white; }
.social-link:nth-child(4):hover { background: #25d366; color: white; }
.social-link:nth-child(5):hover { background: #0077b5; color: white; }
.social-link:nth-child(6):hover { background: #ff0000; color: white; }
.social-link:nth-child(7):hover { background: #000000; color: white; }

/* ================== FORM STYLES ================== */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-label.required::after {
    content: " *";
    color: var(--error);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

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

.form-hint {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-input:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ================== PANELS (WISHLIST, CART) ================== */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: var(--z-index-modal);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
}

.cart-panel.active {
    transform: translateX(0);
    animation: softPanelSlide 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes softPanelSlide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

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

.panel-close:hover {
    background: var(--error-light);
    color: var(--error);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.wishlist-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    margin-bottom: 1rem;
    align-items: center;
}

.wishlist-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

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

.wishlist-item-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.wishlist-item-info p {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.wishlist-item-category {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.wishlist-item-actions {
    display: flex;
    gap: 6px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

.empty-wishlist,
.empty-state,
.error-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-tertiary);
}

.empty-wishlist i,
.empty-state i,
.error-state i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-title,
.error-state h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.empty-state-text,
.error-state p {
    font-size: 1.1rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ================== MODALS ================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
}

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

.modal-card {
    position: relative;
    width: 90%;
    max-width: 550px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: visible;
    transform: scale(0.95);
    transition: transform 0.25s ease, opacity 0.25s ease;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    cursor: default;
    border: 1px solid var(--border-color);
}

.modal-card.dragging {
    cursor: grabbing;
    transition: none !important;
    transform: none !important;
    opacity: 0.95;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.modal-card.dragging * {
    user-select: none;
    pointer-events: none;
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
    cursor: grab;
    user-select: none;
}

.modal-header:active {
    cursor: grabbing;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.modal-title i {
    font-size: 1.4rem;
    color: var(--primary);
}

.close-modal {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.close-modal:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: scale(1.05);
}

.close-modal:active {
    transform: scale(0.95);
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.modal-card-lg {
    max-width: 800px;
}

.modal-card-xl {
    max-width: 1200px;
    width: 95%;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-card);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

/* Draggable modal positioning */
.modal-card.draggable-position {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-card.dragging {
    position: fixed;
    transform: none !important;
    margin: 0;
    transition: none;
}

@media (min-width: 769px) {
    .modal-card {
        max-width: 550px;
        min-width: 400px;
    }
    .modal-card-lg {
        max-width: 800px;
        min-width: 500px;
    }
    .modal-header {
        padding: 24px 28px;
    }
    .modal-title {
        font-size: 1.4rem;
    }
    .close-modal {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .modal-backdrop {
        align-items: flex-end;
        justify-content: center;
        background: rgba(0, 0, 0, 0.6);
    }
    .modal-card {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        margin: 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    .modal-backdrop.active .modal-card {
        transform: translateY(0);
    }
    .modal-header {
        cursor: default;
    }
    .modal-header:active { cursor: default; }
    .modal-title { font-size: 1.2rem; }
    .close-modal {
        width: 40px;
        height: 40px;
        border-radius: 20px;
    }
    .modal-content {
        padding: 20px;
        max-height: calc(90vh - 130px);
        -webkit-overflow-scrolling: touch;
    }
    .modal-footer {
        padding: 16px 20px 30px;
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
        margin: 0;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .modal-card {
        max-height: 92vh;
        border-radius: 24px 24px 0 0;
    }
    .modal-header {
        padding: 18px 20px;
    }
    .modal-title {
        font-size: 1.1rem;
    }
    .modal-title i {
        font-size: 1.2rem;
    }
    .close-modal {
        width: 36px;
        height: 36px;
    }
    .modal-content {
        padding: 18px;
    }
    .modal-footer {
        padding: 14px 18px 25px;
    }
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@supports (padding: env(safe-area-inset-bottom)) {
    .modal-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    .notification-dropdown .notifications-list {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ================== CHECKOUT & ORDER MODAL ================== */
.checkout-form-section,
.order-summary-section {
    margin-bottom: 2rem;
}

.checkout-form-section h4,
.order-summary-section h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-items {
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.summary-totals {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
}

.order-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-details-image {
    margin-bottom: 1.5rem;
}

.product-details-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.product-category,
.product-rating,
.product-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-stock.in-stock {
    color: var(--success);
}

.product-stock.out-of-stock {
    color: var(--error);
}

.product-description {
    margin-bottom: 2rem;
}

.product-description h4 {
    margin-bottom: 1rem;
}

.product-price-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.price-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.sale-badge {
    background: var(--error);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ================== FOOTER ================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.95rem;
    position: relative;
    display: inline-block;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.footer-link:hover::after {
    width: 100%;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ================== NOTIFICATION TOAST ================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 10000 !important;
    animation: softSlideInRight 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border-color);
}

@keyframes softSlideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.notification.success {
    border-left-color: var(--success);
}
.notification.error {
    border-left-color: var(--error);
}
.notification.warning {
    border-left-color: var(--warning);
}
.notification.info {
    border-left-color: var(--info);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.notification.success .notification-content i { color: var(--success); }
.notification.error .notification-content i { color: var(--error); }
.notification.warning .notification-content i { color: var(--warning); }
.notification.info .notification-content i { color: var(--info); }

.notification-content span {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.notification-close:hover {
    background: var(--bg-secondary);
    color: var(--error);
}

/* ================== LOADING STATES ================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-tertiary);
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.2, 0.9, 0.4, 1.1) infinite;
}

.loading-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ================== ANIMATIONS ================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.fade-in {
    animation: fadeInUp 0.3s ease;
}

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

@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .featured-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
    .filters-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .filters-container .search-container {
        grid-column: 1 / -1;
    }
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    :root {
        --header-height: 60px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .notification-dropdown {
        width: 320px;
    }
    .user-profile-dropdown {
        width: 280px;
    }
    .cart-panel {
        width: 350px;
    }
    .order-details-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .charts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .chart-card canvas {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .container {
        padding: 0 20px;
    }
    .mobile-menu-btn {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        z-index: var(--z-index-dropdown);
        border-top: 1px solid var(--border-color);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        align-items: stretch;
    }
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav-link {
        padding: 12px 16px;
        justify-content: flex-start;
    }
    .nav-link .badge {
        position: relative;
        top: 0;
        right: 0;
        margin-left: auto;
    }
    .filters-container {
        grid-template-columns: 1fr;
    }
    .hero-section {
        padding: 3rem 1.5rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
    }
    .cart-item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }
    .admin-tabs {
        overflow-x: auto;
        padding: 4px;
    }
    .admin-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .table th, .table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    .modal-card {
        max-width: 95%;
    }
    .cart-panel {
        width: 100%;
        max-width: 400px;
    }
    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        max-height: 80vh;
    }
    .notification-dropdown.active {
        transform: translateY(0);
    }
    .notification-dropdown .notifications-header {
        padding: 18px 20px;
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 10;
        border-radius: 20px 20px 0 0;
    }
    .notification-dropdown .notifications-list {
        max-height: calc(80vh - 70px);
    }
    .notification-item {
        padding: 14px 16px;
    }
    .notification-title {
        font-size: 0.95rem;
    }
    .notification-message {
        font-size: 0.85rem;
    }
    .user-profile-dropdown {
        width: 280px;
        right: -20px;
    }
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .offers-banner {
        padding: 8px 12px;
    }
    .marquee-content {
        animation: marqueeScroll 20s linear infinite;
    }
    .marquee-item {
        padding: 4px 14px;
        font-size: 0.9rem;
        margin-right: 20px;
    }
    .marquee-separator {
        margin-right: 20px;
        font-size: 1rem;
    }
    .offers-banner::before,
    .offers-banner::after {
        width: 25px;
    }
    /* Charts horizontal scroll */
    .charts-container {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        align-items: stretch;
    }
    .chart-card {
        flex: 0 0 85%;
        min-width: 300px;
        scroll-snap-align: start;
        min-height: 320px;
        display: flex;
        flex-direction: column;
    }
    .chart-card canvas {
        max-height: 220px;
        width: 100% !important;
        height: auto !important;
        min-height: 200px;
        aspect-ratio: 16 / 9;
    }
    .charts-container::-webkit-scrollbar {
        height: 6px;
    }
    .charts-container::-webkit-scrollbar-track {
        background: var(--bg-tertiary);
        border-radius: 10px;
    }
    .charts-container::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }
    .charts-container::-webkit-scrollbar-thumb:hover {
        background: var(--primary-dark);
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    .container {
        padding: 0 15px;
    }
    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .section-title {
        font-size: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .product-image {
        height: 130px;
    }
    .featured-product-image {
        height: 90px;
    }
    .cart-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        text-align: center;
    }
    .cart-item-image {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }
    .cart-item-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .summary-actions {
        flex-direction: column;
    }
    .summary-actions .btn {
        width: 100%;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .admin-tabs {
        flex-wrap: nowrap;
    }
    .admin-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .notification {
        left: 15px;
        right: 15px;
        min-width: auto;
        max-width: none;
    }
    .modal-header,
    .modal-content,
    .modal-footer {
        padding: 1rem;
    }
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .product-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom {
        padding-top: 1.5rem;
    }
    .offers-banner {
        padding: 6px 8px;
    }
    .marquee-content {
        animation: marqueeScroll 15s linear infinite;
    }
    .marquee-item {
        padding: 3px 10px;
        font-size: 0.8rem;
        margin-right: 12px;
    }
    .marquee-item i {
        font-size: 0.75rem;
    }
    .marquee-separator {
        margin-right: 12px;
    }
    .close-banner {
        width: 26px;
        height: 26px;
    }
    .offers-banner::before,
    .offers-banner::after {
        width: 20px;
    }
    .chart-card {
        flex: 0 0 92%;
        min-width: 280px;
        padding: 1rem;
        min-height: 300px;
    }
    .chart-card h3 {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    .chart-card canvas {
        max-height: 200px;
        min-height: 180px;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .offers-banner {
        padding: 6px 8px;
    }
    .marquee-content {
        animation: marqueeScroll 15s linear infinite;
    }
    .marquee-item {
        padding: 3px 10px;
        font-size: 0.8rem;
        margin-right: 12px;
    }
    .marquee-item i {
        font-size: 0.75rem;
    }
    .marquee-separator {
        margin-right: 12px;
    }
    .close-banner {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        gap: 1rem;
    }
    .product-image {
        height: 110px;
    }
    .featured-product-image {
        height: 80px;
    }
    .cart-item-image {
        height: 150px;
    }
    .user-profile-dropdown {
        width: 260px;
        right: -40px;
    }
    .modal-card {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .modal-backdrop {
        padding: 0;
    }
}

@media (max-width: 380px) {
    .chart-card {
        flex: 0 0 95%;
        min-width: 260px;
        padding: 0.8rem;
        min-height: 280px;
    }
    .chart-card h3 {
        font-size: 0.8rem;
    }
    .chart-card canvas {
        max-height: 180px;
        min-height: 160px;
    }
}

@media (max-width: 360px) {
    .marquee-item {
        padding: 2px 8px;
        font-size: 0.75rem;
        margin-right: 10px;
    }
    .marquee-item i {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .chart-card canvas {
        max-height: 220px;
        min-height: 180px;
    }
}

@media (min-width: 1200px) {
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .chart-card canvas {
        max-height: 280px;
        min-height: 240px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .charts-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    .chart-card {
        cursor: grab;
    }
    .chart-card:active {
        cursor: grabbing;
    }
}

@media (prefers-contrast: high) {
    .offers-banner {
        background: var(--primary);
        border-bottom: 2px solid white;
    }
    .marquee-item {
        background: var(--primary-dark);
        border: 2px solid white;
    }
    .close-banner {
        border: 2px solid white;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .product-card:hover,
    .featured-product:hover,
    .btn-primary:hover {
        transform: none;
    }
    .products-grid .product-card,
    .featured-grid .featured-product {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .marquee-content {
        animation: none !important;
        padding-left: 0;
        white-space: normal;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .marquee-item {
        margin: 2px;
    }
    .marquee-separator {
        display: none;
    }
}

@media print {
    .header,
    .footer,
    .offers-banner,
    .btn,
    .mobile-menu-btn,
    .notification-bell,
    .wishlist-btn,
    .action-btn,
    .close-banner,
    .close-modal,
    .panel-close {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    .section {
        break-inside: avoid;
    }
    .table {
        border: 1px solid #000;
    }
    .table th,
    .table td {
        border: 1px solid #000;
        padding: 8px;
    }
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    .offers-banner {
        display: none !important;
    }
}

/* ================== ACCESSIBILITY ================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ================== CUSTOM SCROLLBAR ================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ================== SELECTION STYLES ================== */
::selection {
    background-color: var(--primary);
    color: white;
}
::-moz-selection {
    background-color: var(--primary);
    color: white;
}

/* ================== PLACEHOLDER ANIMATIONS ================== */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200px 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--border-radius);
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================== GRID UTILITIES ================== */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (min-width: 640px) {
    .sm\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .sm\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
    .sm\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 768px) {
    .md\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
    .md\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ================== FINAL TOUCHES ================== */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 0 0 3px var(--primary), 0 0 0 6px rgba(59, 130, 246, 0.2);
    transition: box-shadow 0.2s ease;
}
input:invalid,
textarea:invalid,
select:invalid {
    border-color: var(--error);
}
input:invalid:focus,
textarea:invalid:focus,
select:invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}
[hidden] {
    display: none !important;
}
[aria-busy="true"] {
    cursor: progress;
}
[aria-disabled="true"],
[disabled] {
    cursor: not-allowed;
}

/* ================== PERFORMANCE OPTIMIZATIONS ================== */
.will-change-transform {
    will-change: transform;
}
.will-change-opacity {
    will-change: opacity;
}
.backface-hidden {
    backface-visibility: hidden;
}
.transform-gpu {
    transform: translateZ(0);
}

/* ================== CHRISVANMALL ANIMATION PACK ================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
.fade-up[data-delay="1"] { animation-delay: 0.1s; }
.fade-up[data-delay="2"] { animation-delay: 0.2s; }
.fade-up[data-delay="3"] { animation-delay: 0.3s; }
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.float {
    animation: floatY 4.5s ease-in-out infinite alternate;
    transform-origin: center;
}
@keyframes floatY {
    0% { transform: translateY(0) rotateZ(0deg); }
    50% { transform: translateY(-14px) rotateZ(1deg); }
    100% { transform: translateY(0) rotateZ(0deg); }
}
.glow-btn {
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.glow-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.5), 0 0 36px rgba(59, 130, 246, 0.3);
}
.shimmer {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
}
.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmerMove 2s infinite;
}
@keyframes shimmerMove {
    0% { left: -150px; }
    100% { left: 100%; }
}
.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    animation: typing 3s steps(30, end) forwards, blink 0.6s step-end infinite alternate;
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink {
    50% { border-color: transparent; }
    100% { border-color: var(--primary); }
}
button, a, .card, .product-card {
    transition: all 0.3s cubic-bezier(0.6, 0, 0.2, 1);
}
@media (max-width: 768px) {
    .float { animation: floatY 5.5s ease-in-out infinite alternate; }
    .product-card:hover { transform: translateY(-5px) scale(1.015); }
    .typing { font-size: 90%; }
}
@media (max-width: 480px) {
    .fade-up { animation-duration: 0.8s; }
    .float { animation: floatY 6.5s ease-in-out infinite alternate; }
}

/* ================== ENHANCED SMOOTH MOTIONS ================== */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn:hover::before {
    width: 300px;
    height: 300px;
}
.btn-primary::after,
.btn-success::after,
.btn-danger::after,
.btn-warning::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.btn-primary:hover::after,
.btn-success:hover::after,
.btn-danger:hover::after,
.btn-warning:hover::after {
    opacity: 1;
    animation: softGlow 0.6s ease-out;
}
@keyframes softGlow {
    0% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}
.products-grid .product-card {
    animation: softSlideUp 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
    opacity: 0;
    transform: translateY(30px);
}
.products-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.25s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(7) { animation-delay: 0.35s; }
.products-grid .product-card:nth-child(8) { animation-delay: 0.4s; }
.products-grid .product-card:nth-child(9) { animation-delay: 0.45s; }
.products-grid .product-card:nth-child(10) { animation-delay: 0.5s; }
@keyframes softSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.stats-grid .stat-card {
    animation: softFadeIn 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
    opacity: 0;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.3s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.4s; }
@keyframes softFadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.loading-wave {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.loading-wave span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: softWave 1.2s ease-in-out infinite;
}
.loading-wave span:nth-child(1) { animation-delay: 0s; }
.loading-wave span:nth-child(2) { animation-delay: 0.2s; }
.loading-wave span:nth-child(3) { animation-delay: 0.4s; }
@keyframes softWave {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-12px); opacity: 1; }
}
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}
.btn-ripple:active:after {
    width: 200px;
    height: 200px;
}
.modal-backdrop.active .modal-card {
    animation: softModalEnter 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
@keyframes softModalEnter {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.user-profile-dropdown.active,
.notification-dropdown.active {
    animation: softDropdown 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
@keyframes softDropdown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    z-index: 99;
    box-shadow: var(--shadow-md);
}
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 9999;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* ================== CHARTS & PLOTS ================== */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.chart-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.chart-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.chart-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.chart-card canvas {
    max-height: 250px;
    width: 100%;
    height: auto;
    min-height: 200px;
    flex-shrink: 1;
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* ================== CLICKABLE STARS & RATINGS ================== */
.clickable-stars {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    font-size: 2rem;
    color: #ffc107;
    cursor: pointer;
}
.clickable-stars i {
    transition: all 0.2s ease;
}
.clickable-stars i:hover {
    transform: scale(1.15);
    color: #ffb300;
}
.rating-section {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.rating-feedback {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    min-height: 24px;
}
.rating-summary {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}
.selected-stars {
    font-size: 1.8rem;
    color: #ffc107;
    margin-top: 10px;
}
.small {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 8px;
}
.product-rating-large {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.rating-stars-large {
    color: #ffc107;
    font-size: 1.2rem;
}
.rating-stars-large i {
    margin-right: 2px;
}
.rating-average {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}
.rating-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.ratings-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    padding-right: 10px;
}
.rating-item {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}
.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.rating-user {
    font-weight: 600;
    color: var(--text-primary);
}
.rating-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}
.rating-stars-small {
    color: #ffc107;
    font-size: 0.85rem;
    white-space: nowrap;
}
.rating-stars-small i {
    margin-right: 1px;
}
.rating-count-small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.rating-review {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 8px 0 0 0;
    word-break: break-word;
}
.rating-pagination {
    text-align: center;
    margin-top: 15px;
}
.loading-spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}
.rating-cell {
    display: flex;
    align-items: center;
    gap: 5px;
}
.stars i {
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.stars i:hover {
    transform: scale(1.2);
    color: #ffc107;
}

/* ================== MARQUEE BANNER ================== */
.marquee-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    margin: 0 10px;
}
.marquee-content {
    display: inline-block;
    animation: softMarqueeScroll 25s linear infinite;
    padding-left: 100%;
    white-space: nowrap;
    font-weight: 500;
}
.marquee-content:hover {
    animation-play-state: paused;
}
@keyframes softMarqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
.marquee-item {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 18px;
    margin-right: 25px;
    border-radius: 40px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.marquee-item i {
    margin-right: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}
.marquee-separator {
    display: inline-block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 25px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ================== OTHER UTILITIES ================== */
.contact-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
}
.contact-info h4 {
    font-size: 1rem;
}
.contact-info p {
    font-size: 0.85rem;
}
.social-link {
    width: 34px !important;
    height: 34px !important;
}
.spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.btn-loading::after {
    display: none;
}
.form-group .password-wrapper {
    width: 100%;
}
.toggle-password {
    background: transparent;
    border: none;
    outline: none;
    z-index: 2;
}
.cart-add-animation {
    animation: softCartAdd 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
@keyframes softCartAdd {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--success); }
    100% { transform: scale(1); }
}
.search-container:focus-within .search-icon,
.filter-group:focus-within .filter-label {
    color: var(--primary);
    transform: scale(1.05);
    transition: all 0.2s ease;
}
.product-category {
    transition: all 0.2s ease;
}
.product-card:hover .product-category {
    transform: translateX(3px);
    color: var(--primary);
}
.footer-link {
    position: relative;
    display: inline-block;
}
.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.footer-link:hover::after {
    width: 100%;
}
.social-link {
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.social-link:hover {
    transform: translateY(-5px) rotate(5deg);
}
.icon-btn i,
.social-link i,
.wishlist-btn i {
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.icon-btn:hover i,
.social-link:hover i,
.wishlist-btn:hover i {
    transform: scale(1.1);
}
/* ================== END OF STYLES ================== */

/* z-index: 10000; Ensure modal is above all other elements  */

.notification {
    z-index: 50000 !important;
}

/* password visibility toggle */

.form-group .password-wrapper {
    width: 100%;
}

.toggle-password {
    background: transparent;
    border: none;
    outline: none;
    z-index: 2;
}


/* Instant click feedback – no delay at all */
.action-btn, .btn {
    will-change: transform;
}

.action-btn:active, .btn:active {
    transform: scale(0.96);
    transition: transform 0s;   /* scale happens instantly → no delay */
}



/* Additional chart container fixes for mobile */
@media (max-width: 768px) {
    .chart-card canvas {
        max-height: 200px !important;
        width: 100% !important;
    }
}



/* ================== MOBILE ICONS (CART + NOTIFICATIONS) ================== */
.mobile-icons {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 0.5rem;
}

.mobile-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    font-size: 1.2rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.mobile-icon .badge {
    position: absolute;
    top: -2px;
    right: -8px;  /* changed from -5px to bring closer to icon edge */
    background: var(--error);
    color: white;
    font-size: 0.55rem;
    font-weight: 600;
    min-width: 14px;
    height: 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    z-index: 1;
}

.mobile-bell .badge,
.mobile-bell #mobileUnreadCount {
    position: absolute !important;
    top: -2px !important;
    right: -8px !important;  /* adjusted */
    background: #ef4444 !important;
    color: white !important;
    font-size: 0.55rem !important;
    font-weight: 600 !important;
    min-width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    display: flex;   /* no !important */
    align-items: center !important;
    justify-content: center !important;
    padding: 0 2px !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

.mobile-bell .icon-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

/* Show on mobile, hide on desktop */
@media (max-width: 768px) {
    .mobile-icons {
        display: flex;
    }
    /* Hide the original cart and notification inside hamburger (they are removed, but just in case) */
    .nav-links .nav-link[data-section="cart"],
    .nav-links .notification-bell {
        display: none;
    }
}

/* Fix for mobile notification bell badge (red circle on top of bell) */
.mobile-bell {
    position: relative;
}

.mobile-bell button {
    position: relative;
}
.mobile-bell .badge,
.mobile-bell #mobileUnreadCount {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #ef4444 !important;
    color: white !important;
    font-size: 0.55rem !important;
    font-weight: 600 !important;
    min-width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    display: flex;   /* no !important */
    align-items: center !important;
    justify-content: center !important;
    padding: 0 2px !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

/* Ensure the badge becomes visible when there are unread notifications */
.mobile-bell .badge[style*="display: none"] {
    display: none !important;
}
.mobile-bell .badge:not([style*="display: none"]) {
    display: flex !important;
}

/* ================== MOBILE NOTIFICATION DROPDOWN (BELOW THE BELL) ================== */

@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        width: calc(100% - 30px);
        max-width: 380px;
        border-radius: 16px;
        background: var(--bg-card);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        border: 1px solid var(--border-color);
        z-index: 10001;
        overflow: hidden;
        /* Remove top, left, right, bottom overrides */
    }


    .notification-dropdown.active {
        display: block !important;
        /* position and display handled by JS, no transform */
    }

    .notification-dropdown .notifications-header {
        padding: 14px 16px;
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 5;
    }

    .notification-dropdown .notifications-list {
        max-height: 60vh;
        overflow-y: auto;
    }

    .notification-item {
        padding: 12px 16px;
        gap: 10px;
    }

    .notification-delete {
        top: 12px;
        right: 12px;
    }
}


/* ================== SUBTLE GREEN THEME FOR HEADER & FOOTER ================== */
:root {
    --green-primary: #4a7c59;      /* muted sage green */
    --green-dark: #2d5a3b;         /* deeper but not too dark */
    --green-light: #6b9c7c;        /* light accent */
    --green-ultra-light: #e6f0ea;  /* very soft */
    --green-accent: #8fb89e;       /* soft accent */
}

/* Header – muted green background */
.header {
    background: var(--green-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.navbar .logo-text {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: white;
    font-weight: 600;
}
/* 
.logo-img {
    filter: brightness(0) invert(1);
} */

.nav-link {
    color: rgba(255,255,255,0.85);
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius);
}

.nav-link.active::after {
    background: rgba(255,255,255,0.7);
}

.icon-btn,
.user-profile-btn {
    color: white;
}

.icon-btn:hover,
.user-profile-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Footer – deeper but muted green */
.footer {
    background: var(--green-dark);
    border-top: none;
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-section h4 {
    color: white;
    font-weight: 500;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
    letter-spacing: 0.3px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--green-light);
    border-radius: 2px;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--green-light);
}

.footer-link::after {
    background: var(--green-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
}

.social-link {
    background: rgba(255,255,255,0.08);
    color: white;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--green-light);
    color: white;
    transform: translateY(-2px);
}

/* Optional: subtle gradient for header (if you want) */
.header {
    background: linear-gradient(135deg, var(--green-primary) 0%, #3b6a4c 100%);
}

/* Override for dark/light mode – keep consistent */
[data-theme="light"] .header {
    background: var(--green-primary);
}
[data-theme="dark"] .header {
    background: #2a4d36;
}
[data-theme="light"] .footer {
    background: var(--green-dark);
}
[data-theme="dark"] .footer {
    background: #1f3d2c;
}


/* ================== FIX MOBILE MENU BACKGROUND & TEXT ================== */
@media (max-width: 768px) {
    /* When mobile menu is open, use the same green as header */
    .nav-links.active {
        background: var(--green-primary) !important;
    }

    /* Ensure all navigation links inside the open menu have white text */
    .nav-links.active .nav-link {
        color: white !important;
    }

    /* Hover effect for mobile menu items */
    .nav-links.active .nav-link:hover,
    .nav-links.active .nav-link.active {
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }

    /* Fix the active indicator (red underline becomes left border) */
    .nav-links.active .nav-link.active {
        border-left: 3px solid #ef4444;
    }

    /* Ensure the user profile button inside mobile menu also has white text */
    .nav-links.active .user-profile-btn {
        color: white;
    }
    
    /* Any other text elements inside mobile menu */
    .nav-links.active .user-name,
    .nav-links.active .user-avatar {
        color: white;
    }
}

/* Force social icons visibility in light mode */
[data-theme="light"] .social-link {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

[data-theme="light"] .social-link:hover {
    background: var(--green-light) !important;
    color: white !important;
}

/* Also ensure footer text is readable in light mode */
[data-theme="light"] .footer {
    color: rgba(0, 0, 0, 0.8);
}
[data-theme="light"] .footer .footer-link {
    color: rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .footer .footer-link:hover {
    color: var(--green-dark);
}

/* ================== HERO CAROUSEL TEXT FIX FOR LIGHT MODE ================== */
/* Force carousel text to be white with a strong shadow – works in both themes */
.hero-slide-content,
.hero-slide-title,
.hero-slide-subtitle,
.hero-slide-content p,
.hero-slide-content h2,
.hero-slide-content h3,
.hero-slide-content span {
    color: white !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6) !important;
}

/* Ensure carousel buttons are visible and consistent */
.hero-slide-btn {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-slide-btn:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
}

/* Make sure the dark overlay stays (already there, but double‑check) */
.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}




/* AI Chat Widget - LEFT SIDE (SMALLER & MORE DESIGNED) */
.ai-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
}

.chat-toggle-btn {
    width: 35px;                /* smaller than before (60px) */
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: gentlePulse 2s infinite;
}

/* Pulse animation to draw attention */
@keyframes gentlePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.chat-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    animation: none;  /* stop pulsing on hover */
}

/* Optional: inner chat bubble icon (if you use a custom icon) */
.chat-toggle-btn i {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

/* Badge for unread messages (optional, if you add later) */
.chat-toggle-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

/* Keep chat window styles as before (unchanged except for positioning) */
.chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Rest of your chat window styles (header, messages, input) remain the same */
/* ... (keep all other .chat-* rules unchanged) ... */

.chat-header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.9rem;
    word-wrap: break-word;
}
.message.bot {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    gap: 8px;
}
#chatInput {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
}
#chatSendBtn {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
}

@media (max-width: 480px) {

    .ai-chat-widget {
        left: 20px; /* keep it on the LEFT */
        bottom: 20px;
        transform: none;
    }

    .chat-window {
        position: fixed;
        left: 20px; /* stays on left side */
        bottom: 75px;

        width: 300px;   /* smaller width */
        height: 260px;  /* shorter height */

        max-width: 300px;
        max-height: 260px;

        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }

    .chat-header {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

.chat-messages {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Base message */
.message {
    font-size: 1rem;
    padding: 8px 12px;
    line-height: 1.4;
    border-radius: 12px;
    word-wrap: break-word;
}

/* USER message (normal bubble) */
.message.user {
    align-self: flex-end;
    max-width: 80%;
    margin-left: auto;
}

/* AI message (expanded width, left aligned) */
.message.ai {
    align-self: flex-start;
    width: calc(100% - 20px); /* fills width but keeps margin */
    max-width: none;
    margin-right: 10px;
}
   #chatInput {
    font-size: 16px; /* prevents mobile zoom */
    padding: 7px 10px;
}

    #chatSendBtn {
        width: 32px;
        height: 32px;
    }
}
