:root {
    /* Color Palette - Premium Dark Theme */
    --color-primary: #D31027; /* Deeper Hot Wheels Red */
    --color-accent: #FFD700;
    --color-black: #FFFFFF; /* Text becomes white */
    --color-dark: #9CA3AF; /* Subtext */
    --color-gray: #4B5563; /* Subtle borders */
    --color-light: #1A1A1A; /* Hover surfaces */
    --color-white: #050505; /* Pure dark bg */
    --color-surface: #111111; /* Card backgrounds */

    /* Typography */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --fw-regular: 400;
    --fw-bold: 600;
    --fw-black: 800;

    /* Spacing & Layout */
    --container-width: 1700px;
    /* Increased for wider layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* UI Tokens */
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.08);
    --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* â”€â”€â”€ Admin Panel: Reset inverted theme vars to normal light-mode values â”€â”€â”€ */
body.admin-body {
    background-color: #f4f6f9;
    color: #1a1a1a;
}

body.admin-body h1,
body.admin-body h2,
body.admin-body h3,
body.admin-body h4,
body.admin-body h5,
body.admin-body h6 {
    color: #1a1a1a;
}

body.admin-body p,
body.admin-body label,
body.admin-body span:not(.badge):not(.status-badge):not([class*="btn"]),
body.admin-body td,
body.admin-body th,
body.admin-body li:not(.admin-sidebar li),
body.admin-body a:not([class*="btn"]):not(.admin-logout-btn):not(.admin-sidebar a) {
    color: #333333;
}

/* Sidebar links stay near-white on dark background */
body.admin-body .admin-sidebar a,
body.admin-body .admin-sidebar .nav-section {
    color: #e0e0e0;
}

body.admin-body .admin-sidebar a:hover,
body.admin-body .admin-sidebar a.active {
    color: #ffffff;
}

body.admin-body input,
body.admin-body select,
body.admin-body textarea {
    color: #1a1a1a;
    background-color: #ffffff;
    border-color: #dee2e6;
}


/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-stack);
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Sticky Footer Logic */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

.font-black {
    font-weight: var(--fw-black);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: var(--fw-black);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.display-1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    /* Reduced from 3rem-8vw-6rem */
    font-style: normal;
    /* Changed from italic */
    color: var(--color-black);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
    font-weight: var(--fw-bold);
    /* Reduced from black(900) */
}

.section-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background-color: var(--color-primary);
    margin-top: var(--spacing-xs);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform var(--transition-base);
}

section:hover .section-title::after {
    transform: scaleX(1);
}

/* Header Redesign */
.app-header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    z-index: 10000;
}

/* Fixed Header Logic Removed */
/* .app-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
} */

.header-top {
    padding: var(--spacing-sm) 0;
    border-bottom: none; /* Handled by app-header now */
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 var(--spacing-md);
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 4px;
    outline: none;
    font-family: var(--font-stack);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (FRONTEND, USER PANEL & ADMIN PORTAL)
   ========================================================================== */

/* Show Hamburger Menu by Default on Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    /* ----- HEADER & NAVIGATION ----- */
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111111;
        border-top: 1px solid #2a2a2a;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        display: none; /* hidden by default */
        flex-direction: column;
        padding: 0;
        z-index: 1000;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #2a2a2a;
    }
    
    .nav-link {
        padding: 15px 20px;
        justify-content: space-between;
    }

    /* Cart & User adjustments */
    .cart-item, .user-item {
        position: absolute;
        top: -65px;
        border: none;
    }
    .cart-item {
        right: 60px;
    }
    .user-item {
        right: 15px;
    }

    /* Fix dropdowns */
    .dropdown-menu, .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: #0a0a09;
        display: none;
        padding-left: 15px;
        border: none;
    }

    .nav-item:hover .dropdown-menu {
        display: block;
    }

    /* ----- GRIDS ----- */
    .grid-4, .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-detail-grid, .contact-layout, .account-layout {
        display: flex !important;
        flex-direction: column;
        gap: 30px;
    }

    .product-info {
        padding-left: 0 !important;
        margin-top: 30px;
    }

    .hero-slide-item h2 {
        font-size: 3.5rem !important;
    }

    /* ----- USER & ADMIN PANELS ----- */
    .account-sidebar, .admin-sidebar {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 20px;
        flex-shrink: 0;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 9999;
        transition: transform 0.3s;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block !important;
    }

    .admin-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.7);
        z-index: 9998;
        display: none;
    }

    .admin-sidebar-overlay.active {
        display: block;
    }

    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .account-table-wrapper, .table-responsive {
        overflow-x: auto;
        border: 1px solid #2a2a2a;
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .account-table, table.admin-table {
        min-width: 600px;
    }
}

@media (max-width: 576px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr !important;
    }
    .hero-slide-item h2 {
        font-size: 2.5rem !important;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

.search-input:focus {
    border-color: var(--color-black);
    background: white;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
    pointer-events: none;
}

/* Header Actions / Icons */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.icon-link {
    font-size: 1.25rem;
    padding: 0.5rem !important;
    position: relative;
}

.icon-link:hover {
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* allow wrapping on smaller screens */
}

.nav-link {
    color: var(--color-black);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.8rem 0;
    display: block;
    letter-spacing: 0.05em;
    position: relative;
    /* For dropdown positioning */
}

/* Dropdown Styles */
.nav-item {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-surface); /* Darker for dropdowns */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    min-width: 220px;
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    z-index: 1100;
}

.nav-item:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-item {
    display: block;
    padding: 8px 20px;
    color: var(--color-black);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: capitalize;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: var(--color-light);
    color: var(--color-primary);
}

/* Multi-column Mega Menu - Full Width, 2 columns vertical flow */
.nav-item.has-mega {
    position: static;
}

.dropdown-menu.mega-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    max-width: 100%;
    display: none;
    columns: 5;
    column-gap: 10px;
    column-fill: auto;
    height: auto;
    max-height: 420px;
    padding: 15px 25px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: var(--color-white);
    z-index: 1100;
}

.nav-item:hover .dropdown-menu.mega-menu {
    display: block;
    animation: megaFadeIn 0.2s ease-in-out;
}

.mega-menu .dropdown-item {
    text-align: left;
    padding: 8px 12px;
    border-radius: 4px;
    break-inside: avoid;
}

.mega-menu .dropdown-item:hover {
    background-color: var(--color-light);
    color: var(--color-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes megaFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Nested Dropdown Arrow */
.nav-link i.fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 5px;
    vertical-align: middle;
}

.nav-link::before {
    background-color: var(--color-white);
    bottom: 8px;
}

.cart-btn {
    position: relative;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: var(--spacing-sm);
}

/* Hero Section */
.hero {
    height: 600px;
    /* Reduced from 100vh */
    max-width: var(--container-width);
    /* Constrain width */
    margin: 0 auto;
    /* Center */
    padding-top: 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;

    /* Added Border and Shadow */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    /* Optional: rounded corners for better look */
    margin-top: var(--spacing-md);
    /* Add some space from header */
}

/* Specific Hero Colors Request */
/* Ensure first child is visible by default as fallback */
.hero-slide:first-child {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Robust Hero Styles */
.hero-wrapper {
    position: relative;
    width: 100%;
    max-width: var(--container-width);
    margin: var(--spacing-md) auto;
    height: auto;
    min-height: 380px; /* Reduced slider height */
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
}

/* Ensure flow remains if JS delays init */
.hero-slide-item {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease-in-out;
    background-color: transparent;
    padding: var(--spacing-sm) 5%; /* Reduced top/bottom padding */
    gap: var(--spacing-lg);
}

.hero-slide-item.active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2;
}

/* Ensure non-active slides are definitely hidden */
.hero-slide-item:not(.active) {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1;
}

.hero-content-box {
    position: relative;
    flex: 1;
    z-index: 10;
    color: white;
    padding: 0;
    width: auto;
    max-width: none;
    margin: 0;
}

.hero-content-box h1 {
    font-size: 4rem; /* Slightly smaller for reduced height */
    line-height: 1.1;
    font-weight: var(--fw-black);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #FFFFFF; /* Explicit white to avoid dark variable conflict */
    text-shadow: none;
}

.hero-content-box p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    opacity: 1;
    color: #E0E0E0; /* Explicit readable gray/white */
    max-width: 500px;
    text-shadow: none;
}

.hero-btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: transform var(--transition-base), background-color var(--transition-base);
    font-size: 0.9rem;
    text-decoration: none;
    z-index: 1;
}

.hero-btn:hover {
    background-color: #c00013;
    transform: translateY(-5px);
    color: var(--color-white);
}

.hero-image-box {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    max-width: 400px; /* Reduced to lower the height naturally */
    aspect-ratio: 1/1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    z-index: 5;
    margin-top: 0; /* Removed negative margin to prevent overflow hidden clipping */
}

@keyframes floatBox {
    0% { transform: translateY(0); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
    50% { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(211,16,39,0.25); }
    100% { transform: translateY(0); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
}

.hero-slide-item.active .hero-image-box {
    animation: floatBox 6s ease-in-out infinite;
}

.hero-image-box img {
    width: 85% !important;
    height: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    transform: scale(0.9) !important;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1) !important;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)) !important;
}

.hero-slide-item.active .hero-image-box img {
    transform: scale(1);
}

/* Slider Controls */
.slider-dots-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-dot-item {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot-item.active {
    background: white;
    transform: scale(1.2);
}

.hero-slide.active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2;
}

.hero-slide .hero-tag {
    background-color: var(--color-accent);
    /* Yellow */
    color: var(--color-black);
}

.hero-slide .display-1 {
    color: var(--color-white);
}

.hero-slide .hero-desc {
    color: var(--color-white);
    opacity: 0.9;
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.hero-slide .btn-primary {
    background-color: var(--color-accent);
    /* Yellow */
    color: var(--color-black);
}

.hero-slide .btn-primary:hover {
    background-color: #fff;
    color: var(--color-primary);
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-right: var(--spacing-md);
}

.hero-visual {
    flex: 1;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    /* Add subtle shadow to car */
    transform: scale(0.9);
    transition: transform 0.5s;
}

.hero-slide.active .hero-image {
    transform: scale(1);
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.hero-tag {
    display: inline-block;
    background-color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    font-weight: var(--fw-bold);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    /* transform: skewX(-10deg); Removed skew */
}

.hero-desc {
    font-size: 1.1rem;
    /* Reduced from 1.25rem */
    color: var(--color-gray);
    margin: var(--spacing-md) 0;
    max-width: 500px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    /* Reduced from 1.25rem 3rem */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: transform var(--transition-base), background-color var(--transition-base);
    font-size: 0.9rem;
    /* Added explicit smaller font size */
}

.btn-primary:hover {
    background-color: #c00013;
    transform: translateY(-5px);
}

.btn-accent {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-black);
    padding: 1rem 2rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: transform var(--transition-base), background-color var(--transition-base);
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn-accent:hover {
    background-color: #e6c700;
    transform: translateY(-5px);
}

.hero-visual {
    flex: 1.5;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 80%;
    /* Reduced from 100% */
    max-width: 600px;
    /* Reduced from 900px */
    transform: scale(0.9);
    transition: transform 1s ease-out;
    filter: brightness(0) invert(1);
    /* Make image white temporarily */
}

.hero-slide.active .hero-image {
    transform: scale(1);
    /* Removed rotate(-5deg) */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    /* background: radial-gradient(circle at 70% 50%, #fcfcfc, #ffffff); Removed for red bg */
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    margin-left: 5%;
    z-index: 10;
}

.slider-nav {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background-color: var(--color-accent);
    /* Changed from primary to accent (Yellow) */
    transform: scale(1.2);
}

/* Product Cards */
.section {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

/* Carousel & Grid Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    margin-bottom: 0;
    font-size: 2rem;
}

.section-controls {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.btn-show-all {
    font-size: 0.9rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-black);
    padding-bottom: 2px;
    margin-right: var(--spacing-md);
    color: var(--color-black);
}

.nav-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: white;
}

.nav-arrow:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    padding: var(--spacing-sm) 0;
}

.carousel-track {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    /* Hide scrollbar spacing */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Carousel Item Sizing for 5 items */
.carousel-track .product-card {
    /* (100% - (4 * gap)) / 5 where gap is 2rem */
    min-width: calc((100% - 8rem) / 5);
    max-width: calc((100% - 8rem) / 5);
    flex: 0 0 auto;
}

/* Specific Override for 3-item Carousel */
.carousel-3 .carousel-track .product-card {
    /* (100% - (2 * gap)) / 3 */
    min-width: calc((100% - 4rem) / 3);
    max-width: calc((100% - 4rem) / 3);
}

@media (max-width: 1200px) {
    .carousel-track .product-card {
        min-width: calc((100% - 6rem) / 4);
        /* 4 items */
        max-width: calc((100% - 6rem) / 4);
    }
}

@media (max-width: 900px) {
    .carousel-track .product-card {
        min-width: calc((100% - 4rem) / 3);
        /* 3 items */
        max-width: calc((100% - 4rem) / 3);
    }
}

@media (max-width: 600px) {
    .carousel-track .product-card {
        min-width: calc((100% - 2rem) / 2);
        /* 2 items */
        max-width: calc((100% - 2rem) / 2);
    }
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding-top: 150px;
        padding-bottom: 50px;
    }

    .hero-image {
        width: 100%;
        transform: none;
        margin-top: var(--spacing-lg);
    }

    .hero-content {
        padding-right: 0;
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    height: 100%; /* Ensures all cards in a grid row are equal height */
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-thumb {
    height: 300px;
    width: 100%;
    background-color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    flex-shrink: 0;
}

.product-card:hover .product-thumb {
    border-color: rgba(255,255,255, 0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.product-thumb img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-card:hover .product-thumb img {
    transform: scale(1.08);
}

.product-meta {
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Take up all remaining space */
}

.product-meta h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1.3;
    color: #aaaaaa;
    /* Force exact 2-line height for perfect alignment */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.1rem * 1.3 * 2);
}

.product-price {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    margin-top: auto; /* Pushes the price and any trailing buttons to the absolute bottom of the card */
    margin-bottom: 8px; /* space between price and button */
}

/* Card Add to Cart Button (Matching site-wide .btn-primary polygon layout) */
.card-add-btn {
    width: 100%;
    padding: 12px 10px;
    background-color: var(--color-primary); /* Hot Wheels Red */
    color: #fff;
    border: none;
    border-radius: 0; /* Remove rounded corners for proper polygon clipping */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Room for a potential icon later */
    letter-spacing: 0.5px;
}

.card-add-btn:hover {
    background-color: var(--color-black); /* Dark hover like main buttons */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 0, 22, 0.4);
}

/* Footer */
.app-footer {
    background-color: #000000 !important;
    /* Enforce black */
    color: #fff !important;
    padding-top: 60px;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.05); /* Premium separation */
}

.footer-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Equal columns */
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-col h4 {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    color: var(--color-gray);
}

.footer-col ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-col a:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-base);
}

.social-icon:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-brand p {
    color: #999;
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: #bbb;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: inline-block;
}

.footer-col ul a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: var(--spacing-md);
}

.social-links a {
    color: var(--color-white);
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #777;
}

/* Animation Utilities */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Product Detail Page Styles
   ========================================= */

/* Breadcrumbs */
.breadcrumb-container {
    padding: var(--spacing-sm) 0;
    /* Reduced from md */
    background-color: var(--color-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--color-gray);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb .active {
    color: var(--color-black);
    font-weight: var(--fw-bold);
}

.separator {
    font-size: 0.8rem;
    color: #ccc;
}

/* Product Grid */
.product-detail-section {
    padding-top: var(--spacing-lg);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Info slightly wider than image */
    gap: var(--spacing-xl);
}

@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Gallery */
.main-image-container {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 0; /* Removing padding to allow edge-to-edge fitting */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    height: 600px; /* Increased height as requested for a grander display */
    overflow: hidden; /* Ensure image obeys border-radius */
    border: 1px solid rgba(255,255,255,0.05);
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Tam sÃ„Â±Ã„Å¸dÃ„Â±rma (fill perfectly) */
    object-position: center;
    transition: transform var(--transition-base);
    filter: none !important;
    cursor: zoom-in; /* Indicate it can be clicked for popup */
}

.thumbnail-list {
    display: flex;
    gap: var(--spacing-sm);
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background-color: var(--color-light);
    padding: 5px;
    transition: all var(--transition-base);
}

.thumbnail.active {
    border-color: var(--color-black);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Product Info */
.product-info {
    padding: var(--spacing-md) 0;
}

.product-title {
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    /* Reduced from default bold */
}

.product-meta-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.product-badge {
    background-color: var(--color-accent);
    color: var(--color-black);
    padding: 4px 12px;
    font-weight: var(--fw-bold);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 2px;
}

.product-sku {
    color: var(--color-gray);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.product-price-container {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.current-price {
    font-size: 2.5rem;
    /* Prominent price */
    font-weight: var(--fw-bold);
    color: var(--color-primary);
}

.old-price {
    font-size: 1.25rem;
    text-decoration: line-through;
    color: var(--color-gray);
}

.product-description {
    font-size: 1rem;
    /* Reduced from 1.1rem */
    line-height: 1.6;
    color: #555;
    /* Slightly darker than gray for reading */
    margin-bottom: var(--spacing-lg);
}

/* Moved Specs to Bottom Description Section */
.product-description-section {
    background-color: var(--color-white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.product-content {
    max-width: 800px;
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

.product-content p {
    margin-bottom: var(--spacing-md);
}

.product-content h3 {
    font-size: 1.25rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--fw-bold);
}

.product-content ul {
    list-style: disc;
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.product-content li {
    margin-bottom: 0.5rem;
}



/* Actions */
.product-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.quantity-selector {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 50px;
}

.qty-btn {
    width: 40px;
    border: none;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #f0f0f0;
}

#quantity {
    width: 50px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    -moz-appearance: textfield;
    appearance: textfield;
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.btn-add-cart {
    flex: 1;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.btn-wishlist {
    width: 60px;
    /* Wider */
    border: 1px solid #ddd;
    background: white;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    color: var(--color-black);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-wishlist:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.shipping-info {
    display: flex;
    gap: var(--spacing-md);
    color: var(--color-gray);
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   Category Page Styles
   ========================================= */

.category-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    /* Increased from 280px */
    gap: var(--spacing-xl);
    align-items: start;
}

@media (max-width: 900px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* Hide sidebar on mobile for now */
    }
}

/* Sidebar */
.sidebar-widget {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    border: 1px solid #333333;
    border-radius: 12px; /* Increased corner radius for a softer, premium look */
    background-color: #1a1a1a; /* Premium dark gray background */
}

.widget-title {
    font-size: 1.1rem;
    font-weight: var(--fw-bold);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-primary);
    color: #ffffff;
    letter-spacing: 0.05em;
    display: inline-block;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-list li {
    border-bottom: 1px solid #333333;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: #cccccc;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.category-link i {
    font-size: 0.7rem;
    color: #666666;
    transition: all 0.2s;
}

.category-link:hover,
.category-link.active {
    color: var(--color-primary);
    padding-left: 5px;
    font-weight: 600;
}

.category-link:hover i,
.category-link.active i {
    color: var(--color-primary);
}

/* Price Slider Visuals via Input Range */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #ddd;
    outline: none;
    margin-bottom: var(--spacing-md);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    cursor: pointer;
    border-radius: 50%;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.price-inputs input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Category Content */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.category-header h1 {
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    cursor: pointer;
}

.product-grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1200px) {
    .product-grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid-3-col {
        grid-template-columns: 1fr;
    }
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: var(--spacing-xl);
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: var(--radius-sm);
    color: var(--color-black);
    transition: all 0.2s;
    font-weight: 500;
}

.page-link:hover,
.page-link.active {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.page-dots {
    color: #ccc;
    letter-spacing: 2px;
}

/* =========================================
   Contact Page Styles
   ========================================= */

.contact-section {
    padding-top: var(--spacing-lg);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    /* Swapped ratio for Info (Left) vs Form (Right) */
    gap: var(--spacing-lg);
    /* Reduced from spacing-xl */
    align-items: start;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Contact Form */
.contact-form-wrapper,
.contact-info-wrapper {
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form-wrapper h3,
.contact-info-wrapper h3 {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-black);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-black);
    outline: none;
}

/* Contact Info */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.icon-box {
    width: 40px;
    height: 40px;
    background-color: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1rem;
    font-weight: var(--fw-bold);
    margin-bottom: 5px;
}

.info-content p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.map-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* =========================================
   Auth Pages (Login / Register)
   ========================================= */

/* Body Flex Layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html,
body {
    height: 100%;
}

.auth-container {
    flex: 1 0 auto;
    /* Grow to fill space */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 75px;
    padding-bottom: 4rem;
    background-color: var(--color-light);
    width: 100%;
}

.auth-card {
    background: white;
    padding: 2rem;
    /* Reduced from 3rem */
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 550px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    /* Reduced from 2rem */
}

.auth-header h2 {
    font-size: 1.5rem;
    /* Reduced from 2rem */
    font-weight: var(--fw-bold);
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--color-gray);
    font-size: 0.9rem;
    /* Reduced from 1rem */
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
}

.forgot-password {
    color: var(--color-gray);
    text-decoration: underline;
}

.forgot-password:hover {
    color: var(--color-primary);
}

.auth-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-gray);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
    /* Override form-group label bold */
    user-select: none;
    text-align: left;
}

.custom-checkbox a {
    font-weight: 700;
    /* Make link bolder */
    color: var(--color-primary);
    text-decoration: underline;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Force visibility of checkmark */
.custom-checkbox .checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    /* Explicit border */
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s;
    display: inline-block;
    /* Ensure it takes space */
}

.custom-checkbox:hover input~.checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--color-primary);
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

/* Copyright Section */
.copyright {
    background-color: var(--color-accent);
    color: var(--color-black);
    padding: 20px 0;
    font-size: 0.75rem;
    /* Reduced from 0.9rem */
    font-weight: 500;
    margin-top: 0;
    /* Removed margin-top */
}

.copyright-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.copyright-credit a {
    color: var(--color-black);
    font-weight: 600;
    /* Reduced from 700 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}



.copyright-credit a:hover {
    opacity: 0.7;
}

@media (max-width: 600px) {
    .copyright-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    /* High z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: var(--radius-md);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #999;
}

.close-modal:hover {
    color: var(--color-black);
}

.modal-body {
    margin-top: 20px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #555;
    font-size: 0.95rem;
}

.modal-actions {
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Checkbox Fix - Ensure Visibility */
.custom-checkbox .checkmark {
    border: 1px solid #ccc;
    /* Explicit border */
    background-color: #fff;
    /* White background */
}

/* Ensure checkmark icon is visible when checked */
.custom-checkbox input:checked~.checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* --- Footer V3 (Clean & Aligned) --- */
.app-footer {
    background-color: #0a0a0a !important;
    color: #eee;
    font-size: 14px;
    margin-top: auto;
    width: 100%;
}

.footer-top-section {
    padding: 60px 0;
    background-color: #0a0a0a !important;
}

.footer-grid-layout {
    background-color: #0a0a0a !important;
}

.footer-grid-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
}

.footer-widget .footer-brand {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-desc {
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 38px;
    height: 38px;
    border: 1px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-primary);
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #bbb;
    transition: all 0.2s;
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    color: #bbb;
}

.contact-info i {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-top: 4px;
}

.contact-info a {
    color: #bbb;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: #fff;
}

/* Bottom Bar */
.footer-bottom-bar {
    background-color: #D50000;
    /* Hot Wheels Red */
    padding: 18px 0;
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.design-credit a {
    color: rgba(255, 255, 255, 0.9);
    transition: opacity 0.2s;
}

.design-credit a:hover {
    opacity: 1;
    text-decoration: none;
}

/* Responsive Footer */
@media (max-width: 991px) {
    .footer-grid-layout {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid-layout {
        grid-template-columns: 1fr;
    }

    .footer-widget {
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
        text-align: center;
    }

    .bottom-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Nested Sidebar Categories (Re-applied) */
.category-list ul {
    display: block;
    padding-left: 12px;
    margin-top: 5px;
    text-align: left;
    border: none;
    border-left: none;
    outline: none;
    list-style: none;
}

.category-list li {
    margin-bottom: 5px;
    text-align: left;
    border: none;
    border-left: none;
    outline: none;
    list-style: none;
}

.category-list>li>a {
    font-weight: 700;
    color: #ffffff;
    cursor: default;
}

.category-list>li>ul>li>a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #dddddd;
}

.category-list>li>ul>li>ul>li>a {
    font-weight: 400;
    font-size: 0.9rem;
    color: #aaaaaa;
    padding-left: 10px;
    border-left: none; /* Removed vertical line */
}

.category-list a:hover,
.category-list a.active {
    color: var(--color-primary);
    padding-left: 5px;
}

.category-list>li>ul>li>ul>li>a:hover,
.category-list>li>ul>li>ul>li>a.active {
    border-left-color: var(--color-primary);
    background: transparent;
}

/* =========================================
   About Page Redesign (V2)
   ========================================= */

/* Hero V2 */
.about-hero-v2 {
    position: relative;
    height: 400px;
    background-image: url('../img/about-hero-bg.jpg');
    /* Placeholder */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    color: white;
    overflow: hidden;
    background-color: var(--color-black);
    /* Fallback */
    width: 100%;
    flex-shrink: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Stats Bar */
.stats-bar {
    background: var(--color-primary);
    color: white;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(227, 0, 22, 0.2);
    width: 100%;
    flex-shrink: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Section Tag */
.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    position: relative;
    padding-left: 0;
}

/* Image Badge */
.image-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--color-black);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.image-badge span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

.image-badge strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-accent);
}

/* About Grid (Story) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--color-black);
    font-weight: 700;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #555;
    font-size: 1.05rem;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Feature Cards (Values) */
.values-section {
    padding: 0 20px;
    margin-bottom: 100px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius-md);
    border: 1px solid #eee;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: rgba(227, 0, 22, 0.05);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.feature-card:hover .card-icon {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Vision Mission Split */
.vision-mission-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 50px;
}

.vm-box {
    padding: 60px;
    position: relative;
}

.vm-box.mission {
    background-color: var(--color-black);
    color: white;
}

.vm-box.vision {
    background-color: #f5f5f5;
    color: var(--color-black);
}

.vm-box h3 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.vm-box.mission h3 {
    color: var(--color-primary);
}

.vm-box p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 500px;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .stats-bar {
        gap: 40px;
        padding: 30px 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .vision-mission-split {
        grid-template-columns: 1fr;
    }

    .about-grid {
        gap: 60px;
    }
}

/* Category Sidebar Links */
.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--color-gray);
    transition: all 0.2s;
    cursor: pointer !important;
    /* Force pointer */
    font-size: 0.95rem;
    text-decoration: none;
}

.category-link:hover,
.category-link.active {
    color: var(--color-primary);
    transform: translateX(5px);
}

.category-link i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.category-link:hover i {
    color: var(--color-primary);
}

/* User Menu Logic in Header */
.user-menu-container {
    position: relative;
    cursor: pointer;
    margin-right: 15px;
    z-index: 10001;
    /* Ensure container is high */
}

.user-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-black);
}

.user-label {
    font-size: 0.75rem;
    color: var(--color-gray);
    font-weight: 500;
}

.user-label i {
    font-size: 0.7rem;
    margin-left: 3px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    z-index: 10002;
    /* Higher than navbar (9999) */
    display: none;
    border: 1px solid #f0f0f0;
}

.user-menu-container:hover .user-dropdown {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.user-dropdown li {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--color-gray);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.user-dropdown a:hover {
    background-color: var(--color-light);
    color: var(--color-black);
    padding-left: 25px;
}


/* Account Dashboard Layout */
.account-page-section {
    padding-top: 50px;
    padding-bottom: 80px;
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar Styles */
.account-sidebar {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.sidebar-user-info {
    padding: 30px 20px;
    text-align: center;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.user-avatar {
    width: 70px;
    height: 70px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(227, 0, 22, 0.3);
}

.user-details strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #ffffff;
}

.user-details small {
    color: #888;
    font-size: 0.9rem;
}

.account-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: #aaaaaa;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.account-nav a:hover,
.account-nav a.active {
    background: #1a1a1a;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.account-nav a i {
    width: 20px;
    text-align: center;
}

.logout-link {
    color: #ff7a7a !important;
    border-top: 1px solid #2a2a2a;
}

.logout-link:hover {
    background: rgba(211, 16, 39, 0.1) !important;
    color: var(--color-primary) !important;
    border-left-color: var(--color-primary) !important;
}

/* Account Content */
.account-content {
    background: transparent;
}

.account-header {
    margin-bottom: 30px;
    background: #111111;
    border: 1px solid #2a2a2a;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.account-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.account-header p {
    color: #888;
}

/* Stats Grid */
.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #111111;
    border: 1px solid #2a2a2a;
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #444;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
}

/* Recent Orders */
.recent-orders-section {
    background: #111111;
    border: 1px solid #2a2a2a;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.recent-orders-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
    color: #ffffff;
}

.empty-orders {
    text-align: center;
    padding: 50px 0;
}

.empty-orders i {
    font-size: 3rem;
    color: #333;
    margin-bottom: 20px;
}

.empty-orders p {
    color: #888;
    margin-bottom: 25px;
}

@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
        margin-bottom: 30px;
    }

    .account-stats-grid {
        grid-template-columns: 1fr;
    }

}

/* Account Tables */
.table-responsive {
    overflow-x: auto;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.account-table th {
    text-align: left;
    padding: 15px;
    background: #1a1a1a;
    border-bottom: 2px solid #2a2a2a;
    font-weight: 600;
    color: #ffffff;
}

.account-table td {
    padding: 15px;
    border-bottom: 1px solid #2a2a2a;
    color: #ccc;
}

.account-table tr:hover td {
    background: #151515;
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background: rgba(239, 108, 0, 0.15);
    color: #ff9800;
    border: 1px solid #ef6c00;
}

.status-processing {
    background: rgba(21, 101, 192, 0.15);
    color: #64b5f6;
    border: 1px solid #1565c0;
}

.status-shipped {
    background: rgba(63, 81, 181, 0.15);
    color: #7986cb;
    border: 1px solid #3f51b5;
}

.status-delivered {
    background: rgba(46, 125, 50, 0.15);
    color: #81c784;
    border: 1px solid #2e7d32;
}

.status-cancelled {
    background: rgba(198, 40, 40, 0.15);
    color: #e57373;
    border: 1px solid #c62828;
}

/* Buttons */
.btn-sm {
    padding: 5px 15px;
    font-size: 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.btn-outline {
    border: 1px solid #444;
    color: #ccc;
    background: #111111;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #1a1a1a;
}

/* Forms in Account */
.account-form .form-group {
    margin-bottom: 20px;
}

.account-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #aaaaaa;
}

.account-form input,
.account-form textarea,
.account-form select {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ffffff;
    font-family: inherit;
    transition: border-color 0.2s;
}

.account-form input:focus,
.account-form textarea:focus,
.account-form select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    background: #151515;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.empty-icon {
    font-size: 3rem;
    color: #333;
    margin-bottom: 20px;
}


/* ==========================================================================
   ADMIN DASHBOARD STYLES
   ========================================================================== */

.admin-body {
    background: #f4f7f6;
    color: var(--color-black);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #000000;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -1px;
}

.admin-logo span {
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #151515;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Firefox */
.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: #333 #151515;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-section {
    padding: 12px 25px 5px;
    font-size: 0.65rem;
    color: #444;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 25px;
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--color-primary);
}

.sidebar-footer {
    padding: 20px;
    background: #151515;
}

.admin-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s;
}

.admin-header {
    height: 70px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--color-black);
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.admin-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-stat-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-stat-label {
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 5px;
}

.admin-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-black);
    line-height: 1;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 25px;
}

.admin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.admin-card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Checkbox Dropdown Component */
.checkbox-dropdown {
    position: relative;
    width: 100%;
}

.admin-card:has(.checkbox-dropdown) {
    overflow: visible;
}

.checkbox-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    color: #555;
}

.checkbox-dropdown-toggle:hover {
    border-color: #bbb;
}

.checkbox-dropdown.open .checkbox-dropdown-toggle {
    border-color: #d32f2f;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.checkbox-dropdown-toggle i {
    font-size: 0.7rem;
    color: #999;
    transition: transform 0.2s;
}

.checkbox-dropdown.open .checkbox-dropdown-toggle i {
    transform: rotate(180deg);
}

.checkbox-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.checkbox-dropdown.open .checkbox-dropdown-menu {
    display: block;
}

.checkbox-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.88rem;
    margin: 0;
    border-bottom: 1px solid #f5f5f5;
}

.checkbox-dropdown-item:last-child {
    border-bottom: none;
}

.checkbox-dropdown-item:hover {
    background: #f8f9fa;
}

.checkbox-dropdown-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #d32f2f;
    flex-shrink: 0;
}

.checkbox-dropdown-item span {
    flex: 1;
    color: #333;
}

/* Content Wrapper Fix */
.admin-content-wrapper {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Table Refinements */
.admin-main .account-table {
    margin: 0;
    border: none;
    width: 100%;
    border-collapse: collapse;
}

.admin-main .account-table th {
    background: #fafafa;
    border-bottom: 2px solid #f0f0f0;
    padding: 18px 25px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-main .account-table td {
    padding: 18px 25px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
    font-size: 0.9rem;
}

.admin-main .account-table tr:hover td {
    background-color: #fcfcfc;
}

/* Sidebar Logo Fix */
.sidebar-header .admin-logo {
    display: block;
    margin-bottom: 2px;
}

.sidebar-header .admin-label {
    display: block;
    margin-top: 0;
}

/* ProfileAvatar Fix */
.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================
   Admin Action Buttons (Centralized)
   ========================================== */
.btn-delete {
    background-color: #ffc107;
    color: #000;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-delete:hover {
    opacity: 0.85;
}

.btn-edit {
    background-color: #2e7d32;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-edit:hover {
    opacity: 0.85;
    color: #fff;
}

.btn-detail {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-detail:hover {
    opacity: 0.85;
    color: #fff;
}

/* Admin Header Buttons (Centralized) */
.btn-admin-primary {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-primary:hover {
    background-color: #b71c1c;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* Admin Form Submit Buttons (Kaydet, GÃƒÂ¼ncelle, Ekle) */
.btn-admin-submit {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-submit:hover {
    background-color: #b71c1c;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.btn-admin-success {
    background-color: #2e7d32;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-success:hover {
    background-color: #1b5e20;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.btn-admin-outline {
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-outline:hover {
    border-color: #d32f2f;
    color: #d32f2f;
    transform: translateY(-1px);
}

.btn-admin-primary.btn-sm,
.btn-admin-success.btn-sm,
.btn-admin-outline.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (FRONTEND, USER PANEL & ADMIN PORTAL)
   ========================================================================== */

/* Show Hamburger Menu by Default on Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    /* ----- HEADER & NAVIGATION ----- */
    .mobile-menu-btn {
        display: block;
        margin-right: 15px;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111111;
        border-top: 1px solid #2a2a2a;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        display: none; /* hidden by default */
        flex-direction: column;
        padding: 0;
        z-index: 1000;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #2a2a2a;
    }
    
    .nav-link {
        padding: 15px 20px;
        justify-content: space-between;
    }

    /* Cart & User adjustments */
    .cart-item, .user-item {
        position: absolute;
        top: -65px;
        border: none;
    }
    .cart-item {
        right: 60px;
    }
    .user-item {
        right: 15px;
    }

    /* Fix dropdowns */
    .dropdown-menu, .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: #0a0a09;
        display: none;
        padding-left: 15px;
        border: none;
    }

    .nav-item:hover .dropdown-menu {
        display: block;
    }

    /* ----- GRIDS ----- */
    .grid-4, .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-detail-grid, .contact-layout, .account-layout {
        display: flex !important;
        flex-direction: column;
        gap: 30px;
    }

    .product-info {
        padding-left: 0 !important;
        margin-top: 30px;
    }

    .hero-slide-item h2 {
        font-size: 3.5rem !important;
    }

    /* ----- USER & ADMIN PANELS ----- */
    .account-sidebar, .admin-sidebar {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 20px;
        flex-shrink: 0;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 9999;
        transition: transform 0.3s;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block !important;
    }

    .admin-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.7);
        z-index: 9998;
        display: none;
    }

    .admin-sidebar-overlay.active {
        display: block;
    }

    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .account-table-wrapper, .table-responsive {
        overflow-x: auto;
        border: 1px solid #2a2a2a;
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .account-table, table.admin-table {
        min-width: 600px;
    }
}

@media (max-width: 576px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr !important;
    }
    .hero-slide-item h2 {
        font-size: 2.5rem !important;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Mobile Navigation Redesign (Full Screen + Auth Buttons)
   ========================================================= */
.mobile-actions-wrapper {
    display: none; /* Hide on desktop */
}

.mobile-auth-actions {
    display: none; /* Hide on desktop */
}

@media (max-width: 991px) {
    /* Hide desktop items */
    .desktop-only-item {
        display: none !important;
    }
    
    /* Show mobile cart and hamburger */
    .mobile-actions-wrapper {
        display: flex !important;
        align-items: center;
        gap: 20px;
    }
    
    .mobile-cart-btn {
        color: #fff;
        font-size: 1.4rem;
        position: relative;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-cart-badge {
        background: var(--color-primary);
        color: #fff;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 10px;
        position: absolute;
        top: -8px;
        right: -12px;
        font-weight: 700;
    }
    
    .mobile-menu-btn {
        background: none !important;
        border: none !important;
        color: #fff !important;
        font-size: 1.6rem !important;
        cursor: pointer;
        padding: 0 !important;
        margin: 0 !important; /* Override the old margin-right: 15px */
    }
    
    /* Full Screen Navigation */
    .main-nav {
        position: fixed !important;
        top: 80px !important; /* height of header */
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 80px) !important;
        background: #050505 !important;
        border-top: 1px solid rgba(255,255,255,0.05) !important;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0 0 20px 0 !important;
        z-index: 100000 !important;
        overflow-y: auto !important; /* enable scrolling */
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .main-nav:not(.active) {
        display: none !important;
    }
    
    .main-nav.active {
        display: flex !important;
    }
    
    .nav-menu {
        flex-grow: 1; /* Pushes the auth buttons to the bottom if space permits */
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
    }
    
    /* Mobile Auth Buttons */
    .mobile-auth-actions {
        display: block !important;
        padding: 20px 20px 40px 20px;
        border-top: 1px solid rgba(255,255,255,0.05);
        margin-top: auto; /* Push to bottom */
    }
    
    .mobile-auth-actions .btn-primary, 
    .mobile-auth-actions .btn-outline {
        padding: 14px 24px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 8px;
    }

    /* Homepage Mobile Adjustments */
    .btn-show-all {
        display: none !important;
    }
    
    .product-grid-simple {
        gap: 30px !important;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; /* Allow two columns on most phones */
    }

    /* Product Detail Mobile UX */
    .breadcrumb-container {
        display: none !important;
    }

    .main-image-container {
        height: auto !important;
        padding: 0 !important;
        background: transparent !important;
    }
    
    .main-product-image {
        height: auto !important;
        max-height: 350px !important;
        width: 100% !important;
        object-fit: contain !important;
    }

    .product-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .product-actions > * {
        width: 100% !important;
    }

    .product-actions .btn-wishlist {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* Mobile Sticky Buy Bar */
    .mobile-sticky-buy-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #111111;
        border-top: 1px solid rgba(255,255,255,0.08);
        padding: 12px 20px;
        z-index: 99999;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
        box-sizing: border-box;
    }
    
    .mobile-sticky-buy-bar .sticky-price {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-right: 15px;
    }
    
    .mobile-sticky-buy-bar .sticky-action {
        flex: 1;
        height: 48px;
    }

    /* Prevent footer overlapping */
    body {
        padding-bottom: 80px !important;
    }
}

/* Hide sticky bar on desktop */
@media (min-width: 992px) {
    .mobile-sticky-buy-bar {
        display: none !important;
    }
}
