/* ===================================
   BASE RESET & VARIABLES
=================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Grey Palette */
    --bg-primary:    #f4f4f5;
    --bg-secondary:  #e4e4e7;
    --bg-card:       #ffffff;
    --bg-dark:       #18181b;
    --bg-darker:     #09090b;

    /* Text */
    --text-primary:  #18181b;
    --text-secondary:#52525b;
    --text-muted:    #a1a1aa;
    --text-inverse:  #ffffff;

    /* Borders */
    --border:        #e4e4e7;
    --border-dark:   #27272a;

    /* Black Button Palette */
    --btn-bg:        #18181b;
    --btn-hover:     #27272a;
    --btn-active:    #09090b;
    --btn-text:      #ffffff;

    /* Accents */
    --accent:        #6b7280;
    --accent-light:  #9ca3af;

    /* Status Colors */
    --success:       #16a34a;
    --error:         #dc2626;
    --warning:       #d97706;

    /* Shadows */
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.14);

    /* Radius */
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-xl:     24px;

    /* Transitions */
    --transition:    all 0.2s ease;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===================================
   MESSAGES / ALERTS
=================================== */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent);
    animation: slideInRight 0.4s ease;
    font-size: 13px;
    font-weight: 500;
}

.alert.error    { border-left-color: var(--error); }
.alert.success  { border-left-color: var(--success); }
.alert.warning  { border-left-color: var(--warning); }

.alert-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.alert.error   .alert-icon { background: #fee2e2; color: var(--error); }
.alert.success .alert-icon { background: #dcfce7; color: var(--success); }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    padding: 0 4px;
    line-height: 1;
    transition: var(--transition);
}
.alert-close:hover { color: var(--text-primary); }

@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOutRight {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(40px); opacity: 0; }
}

/* ===================================
   BUTTONS
=================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.01em;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    background: var(--btn-active);
    transform: translateY(0);
    box-shadow: none;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

/* ===================================
   LOGIN PAGE — AUTH WRAPPER
=================================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Left Brand Panel */
.auth-brand-panel {
    flex: 1;
    background: var(--bg-dark);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

/* Login page media background */
.auth-media-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.auth-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 1;
}

.brand-bg-accent {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(107,114,128,0.15) 0%, transparent 70%);
    bottom: -120px;
    left: -80px;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 64px;
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.brand-tagline h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    color: #fff;
}

.brand-tagline .accent {
    color: var(--accent-light);
}

.brand-tagline p {
    font-size: 16px;
    color: #a1a1aa;
    line-height: 1.7;
    max-width: 360px;
}

.brand-stats {
    display: flex;
    gap: 40px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 12px;
    color: #71717a;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Right Form Panel */
.auth-form-panel {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--bg-primary);
}

.auth-form-card {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 36px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(24,24,27,0.06);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--text-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.input-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 4px;
    transition: var(--transition);
    border-radius: 4px;
}

.input-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Form Options (Remember Me) */
.form-options {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--btn-bg);
    cursor: pointer;
}

/* Form Footer */
.form-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.form-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===================================
   DASHBOARD
=================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-dark);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #52525b;
    padding: 12px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: #a1a1aa;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.nav-item.active {
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 12px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: #71717a;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    color: #71717a;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(220,38,38,0.12);
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px 36px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
}

.content-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.content-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-orders   { background: #f1f5f9; color: #334155; }
.icon-revenue  { background: #f0fdf4; color: #166534; }
.icon-products { background: #fdf4ff; color: #7e22ce; }
.icon-customers{ background: #fff7ed; color: #9a3412; }

.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-card-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-card-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card-change {
    font-size: 12px;
    color: var(--text-muted);
}
.stat-card-change.up   { color: var(--success); }
.stat-card-change.down { color: var(--error); }

/* Recent Section */
.recent-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.link-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.link-btn:hover {
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    gap: 14px;
}

.empty-icon {
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 280px;
    text-align: center;
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        width: 100%;
        padding: 40px 24px;
    }

    .dashboard-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        padding: 12px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===================================
   STORE NAVBAR
=================================== */
.store-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    flex-shrink: 0;
    text-decoration: none;
}

.nav-search-form {
    flex: 1;
    max-width: 520px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 0 6px 0 16px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--text-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(24,24,27,0.06);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.search-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--btn-hover);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-cta {
    padding: 9px 18px;
    font-size: 13.5px;
    border-radius: var(--radius-md);
    margin-left: 6px;
}

/* ===================================
   HERO CAROUSEL
=================================== */
.hero-carousel {
    position: relative;
    overflow: hidden;
    height: 480px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Banner Media (Image/Video) */
.slide-media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide-media-video,
.slide-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    z-index: 2;
}

/* Decorative background blobs */
.slide-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.18;
    filter: blur(60px);
    pointer-events: none;
}
.slide-shape-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
}
.slide-shape-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: 20%;
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 64px;
    width: 100%;
}

.slide-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    color: #d1d5db;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.slide-title {
    font-size: 60px;
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
    max-width: 600px;
}

.slide-subtitle {
    font-size: 18px;
    color: #9ca3af;
    margin-bottom: 36px;
    max-width: 480px;
    line-height: 1.6;
}

.slide-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slide-cta {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--radius-md);
    background: #fff;
    color: #18181b;
}

.slide-cta:hover {
    background: #f4f4f5;
    color: #18181b;
}

.slide-link {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    transition: var(--transition);
    text-decoration: none;
}

.slide-link:hover {
    color: #fff;
}

.slide-number {
    position: absolute;
    bottom: 28px;
    right: 64px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.06em;
}

/* Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.carousel-arrow:hover {
    background: rgba(255,255,255,0.22);
}

.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 999px;
}

/* ===================================
   SECTION CONTAINERS
=================================== */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===================================
   CATEGORIES SECTION
=================================== */
.categories-section {
    padding: 8px 0 0;
    background: var(--bg-primary);
}

.section-heading {
    margin-top: 8px;
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.section-heading p {
    font-size: 14px;
    color: var(--text-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-secondary);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cat-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-name {
    display: block;
    position: relative;
    z-index: 2;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    padding: 8px 10px 12px;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.cat-count {
    display: none;
}

/* ===================================
   PRODUCTS SECTION
=================================== */
.products-section {
    padding: 48px 0 72px;
}

.products-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.products-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 3px;
}

.products-header h2 em {
    font-style: normal;
    color: var(--text-secondary);
}

.products-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.products-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

.sort-select-wrap {
    position: relative;
}

.sort-select {
    appearance: none;
    padding: 9px 36px 9px 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sort-select:hover {
    border-color: var(--text-muted);
}

/* Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.chip.chip-active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

/* ===================================
   PRODUCT CARDS
=================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: #d4d4d8;
}

/* Product Image */
.product-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

  .product-img {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-secondary);
      transition: transform 0.4s ease;
  }

  .product-img-media {
      background: transparent;
  }

  .product-img-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
  }

  .product-card:hover .product-img {
      transform: scale(1.04);
}

/* Subtle color tints per position */
.product-img-1 { background: #f1f5f9; }
.product-img-2 { background: #faf5ff; }
.product-img-3 { background: #f0fdf4; }
.product-img-4 { background: #fff7ed; }

.product-img-icon {
    font-size: 54px;
    filter: grayscale(20%);
}

/* Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge-sale { background: #18181b; color: #fff; }
.badge-new  { background: #16a34a; color: #fff; }
.badge-hot  { background: #dc2626; color: #fff; }

/* Product overlay */
.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    transform: translateY(8px);
}

.product-card:hover .overlay-btn {
    transform: translateY(0);
}

/* Product Info */
.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 1px;
}

.rating-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* Price */
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.product-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-discount {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

/* Add to Cart */
  .btn-add-cart {
      width: 100%;
      justify-content: center;
      margin-top: 10px;
      padding: 11px;
      font-size: 13.5px;
      border-radius: var(--radius-md);
      transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }

  /* Product Detail */
  .product-detail-page {
      padding: 64px 0 48px;
      background: var(--bg-primary);
  }

  .detail-hero {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 40px;
      align-items: start;
  }

  .detail-media {
      border-radius: var(--radius-lg);
      overflow: hidden;
      border: 1.5px solid var(--border);
      position: relative;
      aspect-ratio: 1 / 1;
      background: var(--bg-secondary);
  }

  .detail-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
  }

  .detail-info h1 {
      font-size: 34px;
      font-weight: 800;
      margin-top: 0;
  }

  .detail-category {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
  }

  .detail-category a {
      text-decoration: none;
      color: var(--text-muted);
      border-bottom: 1px dashed transparent;
  }

  .detail-category a:hover {
      color: var(--text-primary);
      border-bottom-color: var(--text-muted);
  }

  .detail-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 8px 0 4px;
  }

  .detail-price-row {
      display: flex;
      align-items: baseline;
      gap: 12px;
      margin-bottom: 16px;
  }

  .detail-description {
      line-height: 1.7;
      color: var(--text-secondary);
      margin-bottom: 24px;
  }

  .detail-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
  }

  .detail-actions .btn-secondary {
      padding: 11px 24px;
  }

  .related-grid {
      margin-top: 24px;
  }

/* Products Empty */
.products-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 24px;
    text-align: center;
}

.empty-emoji {
    font-size: 52px;
    margin-bottom: 4px;
}

.products-empty h3 {
    font-size: 20px;
    font-weight: 700;
}

.products-empty p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 300px;
}

/* ===================================
   STORE FOOTER
=================================== */
.store-footer {
    background: var(--bg-dark);
    color: var(--text-inverse);
    margin-top: auto;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 32px;
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

.footer-brand {
    flex: 1;
}

.footer-brand span {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 13px;
    color: #71717a;
    max-width: 240px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #52525b;
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 13px;
    color: #71717a;
    transition: var(--transition);
    text-decoration: none;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px;
    font-size: 12px;
    color: #52525b;
}

/* ===================================
   STORE RESPONSIVE
=================================== */
@media (max-width: 1100px) {
    .products-grid      { grid-template-columns: repeat(3, 1fr); }
    .categories-grid    { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-links          { display: none; }
    .nav-search-form    { max-width: none; }
    .hero-carousel      { height: 340px; }
    .slide-title        { font-size: 36px; }
    .slide-content      { padding: 0 32px; }
    .slide-number       { display: none; }
    .products-grid      { grid-template-columns: repeat(2, 1fr); }
    .categories-grid    { grid-template-columns: repeat(3, 1fr); }
    .section-container  { padding: 0 20px; }
    .footer-inner       { flex-direction: column; gap: 32px; }
}

@media (max-width: 480px) {
    .products-grid      { grid-template-columns: 1fr 1fr; gap: 12px; }
    .categories-grid    { grid-template-columns: repeat(2, 1fr); }
    .hero-carousel      { height: 280px; }
    .slide-title        { font-size: 28px; }
    .carousel-arrow     { display: none; }
    .products-header    { flex-direction: column; align-items: flex-start; }
}

/* ===================================
   MOBILE NAV — ACTIONS (hamburger + search icon)
=================================== */
.nav-mobile-actions {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Mobile search icon button */
.mob-search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition);
}

.mob-search-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Hamburger Button */
.hamburger {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.hamburger:hover {
    background: var(--bg-secondary);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Animated X state */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================
   MOBILE SEARCH BAR (below nav)
=================================== */
.mobile-search-bar {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
    border-top: 1px solid transparent;
    background: rgba(255,255,255,0.97);
}

.mobile-search-bar.open {
    max-height: 80px;
    padding: 10px 16px;
    border-top-color: var(--border);
}

.mobile-search-form {
    width: 100%;
}

/* ===================================
   MOBILE NAV DRAWER + OVERLAY
=================================== */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--bg-card);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.drawer-logo {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.drawer-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.drawer-links {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.drawer-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.drawer-link-active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

.drawer-link-accent {
    color: var(--text-primary);
    font-weight: 700;
    background: var(--bg-primary);
}

.drawer-link-accent:hover {
    background: var(--btn-bg);
    color: #fff;
}

.drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ===================================
   RESPONSIVE — SHOW MOBILE ELEMENTS
=================================== */
@media (max-width: 768px) {
    /* Navbar */
    .nav-search-form    { display: none; }
    .nav-links          { display: none; }
    .nav-mobile-actions { display: flex; }
    .mobile-search-bar  { display: block; }
    .mobile-overlay     { display: none; }

    /* Hero carousel adjustments */
    .hero-carousel      { height: 320px; }
    .slide-title        { font-size: 34px; }
    .slide-subtitle     { font-size: 15px; margin-bottom: 24px; }
    .slide-content      { padding: 0 24px; }
    .slide-number       { display: none; }
    .slide-badge        { margin-bottom: 12px; }
    .slide-cta          { padding: 11px 20px; font-size: 14px; }

    /* Categories */
    .categories-section { padding: 0; }
    .categories-section .section-heading { margin-top: 0; }
    .categories-grid    { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .category-card      { padding: 0; }
    .cat-icon           { font-size: 22px; }

    /* Products */
    .products-section   { padding: 32px 0 48px; }
    .products-grid      { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .section-container  { padding: 0 16px; }
    .products-header    { flex-direction: column; align-items: flex-start; gap: 12px; }
    .products-toolbar   { width: 100%; justify-content: space-between; }
    .filter-chips       { gap: 6px; }
    .chip               { padding: 6px 12px; font-size: 12px; }

    /* Product card mobile tweaks */
    .product-name       { font-size: 13px; }
    .product-price      { font-size: 16px; }
    .btn-add-cart       { padding: 10px; font-size: 13px; }
    .product-overlay    { display: none; } /* touch devices don't hover */

    /* Dashboard sidebar fix */
    .sidebar            { width: 100%; }
    .main-content       { padding: 20px 16px; }
    .stats-grid         { grid-template-columns: 1fr 1fr; gap: 12px; }
    .content-header     { flex-direction: column; gap: 12px; }
    .header-actions     { width: 100%; justify-content: flex-start; }

    /* Login page */
    .auth-brand-panel   { display: none; }
    .auth-form-panel    { width: 100%; padding: 32px 20px; }

    /* Footer */
    .footer-inner       { flex-direction: column; gap: 28px; padding: 36px 20px; }
    .footer-links       { gap: 32px; }
}

@media (max-width: 480px) {
    /* Navbar height */
    .nav-inner          { height: 56px; padding: 0 16px; }
    .store-logo span    { font-size: 15px; }

    /* Hero */
    .hero-carousel      { height: 260px; }
    .slide-title        { font-size: 26px; }
    .slide-subtitle     { display: none; }
    .slide-badge        { font-size: 10px; padding: 4px 10px; }
    .carousel-arrow     { display: none; }

    /* Categories */
    .categories-grid    { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .category-card      { padding: 0; }
    .cat-count          { display: none; }

    /* Products */
    .products-grid      { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-info       { padding: 12px; }
    .product-rating     { display: none; }
    .product-price      { font-size: 15px; }

    /* Dashboard */
    .stats-grid         { grid-template-columns: 1fr 1fr; }
    .stat-card          { padding: 14px; }
    .stat-card-value    { font-size: 20px; }
}


