/* Navbar - Premium Glassmorphism */
#layout-header-root .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--color-white);
    position: fixed;
    top: 55px;
    left: 0;
    width: 100%;
    z-index: 900;
    transition: background 0.3s ease, padding 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);

    /* Animated Gradient Border - The "Cool" Factor */
    border-bottom: 2px solid transparent;
    background-clip: padding-box;
}

/* Animated Border via Pseudo-element */
#layout-header-root .navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            var(--color-black),
            var(--accent-color),
            var(--color-purple),
            var(--accent-color),
            var(--color-black));
    background-size: 200% 100%;
    animation: borderFlow 5s linear infinite;
    z-index: 901;
}

@keyframes borderFlow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Logo - Reverted to Original Clean Style */
#layout-header-root .header-logo img {
    height: 40px;
    margin-left: 10px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

#layout-header-root .header-logo:hover img {
    transform: scale(1.05);
}

#layout-header-root .nav-container {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 100;
    margin-right: 10px;
}

/* Nav Items */
#layout-header-root .nav-item {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    /* Force no underline */
    color: var(--color-light-grey);
    font-size: 13px;
    padding: 8px 15px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 50px;
}

/* Fix for Blue Name Issue */
#layout-header-root .navbar .dropdown-toggle {
    color: var(--color-light-grey) !important;
    text-decoration: none !important;
}

#layout-header-root .navbar .dropdown-toggle:hover {
    color: var(--color-white) !important;
}

/* Remove default/duplicate icons */
#layout-header-root .navbar .dropdown-toggle::after,
#layout-header-root .navbar .dropdown-toggle::before {
    display: none !important;
    content: none !important;
}

/* Holographic Hover Effect - Tweaked for readability */
#layout-header-root .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.1) inset;
    color: var(--color-white);
    transform: translateY(-1px);
}

#layout-header-root .nav-item::after,
#layout-header-root .nav-item::before {
    display: none !important;
    /* Ensure no lines */
}

#layout-header-root .nav-item i {
    font-size: 18px;
    margin-left: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
}

#layout-header-root .nav-item:hover i,
#layout-header-root .nav-item.active i,
#layout-header-root .nav-item.nav-active i {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Explicit Active Orange for Desktop */
#layout-header-root .nav-item.active i,
#layout-header-root .nav-item.nav-active i {
    color: #ff6b00 !important;
}

/* Main User Icon - White */
#layout-header-root .nav-item.user-info.active .fa-user,
#layout-header-root .nav-item.user-info.nav-active .fa-user {
    color: #fff !important;
}

/* Dropdown Chevron - Black */
#layout-header-root .nav-item.user-info.active .dropdown-icon,
#layout-header-root .nav-item.user-info.nav-active .dropdown-icon {
    color: #000 !important;
}

#layout-header-root .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    margin-left: 0;
    transition: all 0.4s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#layout-header-root .nav-item:hover .nav-text {
    opacity: 1;
    width: auto;
    margin-left: 8px;
}

/* Fix Outlines */
#layout-header-root .nav-item:focus,
#layout-header-root .nav-item:active {
    outline: none;
    background: transparent;
}

/* Search Container - Pulse Kept */
#layout-header-root .search-container {
    position: relative;
    display: flex;
    align-items: center;
}

#layout-header-root .search-box {
    opacity: 0;
    width: 0;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    color: var(--color-white);
    border-radius: 20px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    visibility: hidden;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

#layout-header-root .search-container i {
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-right: -10px;
    cursor: pointer;
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 5px var(--color-white);
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

#layout-header-root .search-container:hover i,
#layout-header-root .search-container:focus-within i {
    opacity: 0;
    animation: none;
    pointer-events: none;
}

#layout-header-root .search-container:hover .search-box,
#layout-header-root .search-container:focus-within .search-box {
    opacity: 1;
    width: 200px;
    margin-right: 0;
    visibility: visible;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

/* Menu Bar */
#layout-header-root .menu-bar {
    flex-grow: 1;
    padding-left: 80px;
}

#layout-header-root .menu-items {
    display: flex;
    justify-content: left;
    gap: 15px;
    /* Restored gap */
}

/* Menu Item */
#layout-header-root .menu-item {
    text-decoration: none !important;
    color: var(--color-light-grey);
    font-weight: 500;
    font-size: 14px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
}

/* Golden Glass Hover */
#layout-header-root .menu-item:hover {
    color: var(--color-white);
    background: rgba(255, 193, 7, 0.08);
    /* Very subtle gold tint */
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.15);
    /* Soft outer glow */
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
    /* Text Glow */
    transform: translateY(-1px);
}

/* Floating Dot Indicator */
#layout-header-root .menu-item::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 5px var(--accent-color);
    display: block !important;
    /* Force display for this effect */
    opacity: 0;
}

#layout-header-root .menu-item:hover::before {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

#layout-header-root .menu-item::after {
    display: none;
}

#layout-header-root .hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 24px;
    cursor: pointer;
    z-index: 901;
    transition: transform 0.3s ease;
}

/* Dropdown System */
#layout-header-root .dropdown {
    position: relative;
    height: 100%;
    /* Ensure container fills height for ease of hover */
    display: flex;
    align-items: center;
}

/* Dropdown Icon Styling */
#layout-header-root .dropdown-icon {
    font-size: 10px !important;
    margin-left: 6px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

#layout-header-root .dropdown:hover .dropdown-icon,
#layout-header-root .dropdown.active .dropdown-icon,
#layout-header-root .dropdown.nav-active .dropdown-icon {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--accent-color);
}

/* Invisible Bridge for Dropdown Gap - Crucial for stability */
#layout-header-root .dropdown::after {
    content: '';
    position: absolute;
    top: 50%;
    /* Start higher up */
    left: 0;
    width: 100%;
    height: 60px;
    /* Extend well below */
    background: transparent;
    z-index: 100;
}

#layout-header-root .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 18px;
    min-width: 240px;
    z-index: 2000;
}

/* Fix Dropdown Gap (Bridge) */
#layout-header-root .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: 2001;
}

/* Ensure hover works only on active class trigger now */
#layout-header-root .dropdown:hover .dropdown-menu,
#layout-header-root .dropdown.active .dropdown-menu {
    display: block;
    animation: dropdownPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dropdownPop {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#layout-header-root .dropdown-item {
    display: block;
    padding: 12px 25px;
    text-decoration: none !important;
    color: #aaa;
    font-size: 13px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#layout-header-root .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05), transparent);
    color: var(--accent-color);
    padding-left: 35px;
    border-left-color: var(--accent-color);
}

/* User Dropdown Specifics */
#layout-header-root .user-dropdown {
    right: 0;
    left: auto;
}

/* Login Icon Dropdown Logic */
/* The user asked for login icon hover to show dropdown from right */


/* Badge */
#layout-header-root .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}

/* Media Queries */
@media screen and (max-width: 768px) {
    #layout-header-root .navbar {
        padding: 8px 15px;
        flex-wrap: nowrap;
        /* Keep it on one line */
        justify-content: space-between;
    }

    #layout-header-root #top-banner-root {
        height: auto;
        padding: 5px 10px;
    }

    #layout-header-root #top-banner-root .banner-text {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    #layout-header-root .navbar {
        top: 40px;
        /* Aligned below the 40px top banner */
    }

    /* Adjust main padding for fixed header */
    body {
        padding-top: 100px;
        /* 40px banner + ~60px navbar */
    }

    #layout-header-root .hamburger {
        display: block;
        order: 3;
        margin-left: 10px;
        font-size: 18px !important;
        /* Matches search/nav icons */
        display: flex;
        align-items: center;
        height: 100%;
    }

    #layout-header-root .hamburger i {
        font-size: 18px !important;
        /* Force exact size match */
        width: 24px;
        /* Fixed width */
        text-align: center;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    #layout-header-root .hamburger.active i {
        transform: rotate(90deg);
        color: var(--accent-color);
    }

    #layout-header-root .header-logo {
        order: 1;
        flex: 0 0 auto;
    }

    #layout-header-root .nav-container {
        order: 2;
        flex: 1;
        justify-content: flex-end;
        gap: 8px;
        margin-right: 0;
    }

    #layout-header-root .nav-item {
        padding: 5px 8px;
        display: flex;
        align-items: center;
        /* Ensure vertical center */
    }

    #layout-header-root .nav-item i {
        font-size: 18px !important;
        /* Normalized to 18px */
    }

    /* CRITICAL: Disable transform on mobile to prevent trapping fixed position elements */
    #layout-header-root .nav-item:hover,
    #layout-header-root .nav-item.active,
    /* Add active class */
    #layout-header-root .search-container:hover {
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Active State Coloring */
    #layout-header-root .nav-item.active i {
        color: #ff6b00 !important;
    }

    #layout-header-root .menu-bar {
        display: none;
    }

    /* Removed old hover/focus search logic that caused right-alignment */

    #layout-header-root .header-logo img {
        height: 30px;
    }

    #layout-header-root .wallet-info,
    #layout-header-root .user-info {
        display: none !important;
    }

    /* Show search icon on mobile */
    #layout-header-root .search-container i {
        display: block !important;
        font-size: 18px;
        color: #fff;
        /* Ensure it's white to match other icons */
        margin-right: 0;
        pointer-events: auto !important;
        /* Fix unclickable icon due to hover styles */
        opacity: 1 !important;
        /* Prevent fading */
    }

    /* Mobile Search Popup - Hidden by default */
    #layout-header-root .search-box {
        display: none !important;
        position: fixed !important;
        top: 65px;
        /* Just below header */
        left: 5vw !important;
        width: 90vw !important;
        max-width: none !important;
        height: 45px !important;
        height: 45px !important;
        background: #000 !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-bottom: none !important;
        color: #111 !important;
        padding: 5px 20px !important;
        font-size: 15px !important;
        border-radius: 30px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        z-index: 2005;
        opacity: 1 !important;
        visibility: visible !important;
        backdrop-filter: blur(10px);
        margin: 0 !important;
        transform: none !important;
        /* Disable transform centering */
        text-align: center !important;
    }

    /* Show when active */
    #layout-header-root .search-container.active-mobile .search-box {
        display: block !important;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            transform: translateY(-10px);
            opacity: 0;
        }

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

    #layout-header-root .search-box:focus {
        background: rgba(255, 255, 255, 1) !important;
        border-color: var(--accent-color) !important;
        box-shadow: 0 5px 20px rgba(255, 193, 7, 0.4);
    }
}

@media screen and (max-width: 480px) {
    #layout-header-root .navbar {
        padding: 5px 10px;
    }

    #layout-header-root .nav-container {
        gap: 5px;
    }
}

/* Mobile Tray - Premium Enhancements */
#layout-header-root .mobile-tray {
    position: fixed;
    top: 83px;
    /* Tablet: Tuned to 83px (was 88px) */
    right: -100%;
    width: 300px;
    height: calc(100vh - 83px);
    background: #fff;
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

#layout-header-root .mobile-tray.active {
    right: 0;
}

#layout-header-root .tray-content {
    padding: 30px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Tray Component Styles */
#layout-header-root .tray-dropdown {
    margin-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
}

#layout-header-root .tray-dropdown-toggle {
    padding: 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#layout-header-root .tray-dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

#layout-header-root .tray-dropdown.active .tray-dropdown-toggle i {
    transform: rotate(180deg);
}

#layout-header-root .tray-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #f9f9f9;
    margin: 0 -20px;
    padding: 0 20px;
}

#layout-header-root .tray-dropdown.active .tray-dropdown-menu {
    max-height: 500px;
    padding-bottom: 10px;
}

#layout-header-root .tray-dropdown-item {
    display: block;
    padding: 12px 0;
    font-size: 14px;
    /* Larger for readability */
    color: #555;
    text-decoration: none !important;
    text-align: left;
    /* Ensure left alignment */
}

#layout-header-root .view-all-link {
    color: var(--accent-color);
    font-weight: 600;
    border-top: 1px solid #eee;
    margin-top: 5px;
}

#layout-header-root .tray-divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

#layout-header-root .tray-link {
    display: block;
    padding: 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-decoration: none !important;
    border-bottom: 1px solid #f0f0f0;
}

#layout-header-root .tray-link i {
    width: 25px;
    color: #888;
}

/* Helper for mobile search touch activation */
/* Helper for mobile search touch activation - Consolidated above */
/* Removed conflicting width/pos rules */

/* Removed redundant search block */

/* Absolute Precision for Small Mobile Tray */
@media (max-width: 480px) {
    #layout-header-root .mobile-tray {
        top: 60px;
    }

    #layout-header-root .location-widget .nav-text {
        display: none !important;
        /* Force hide text on mobile */
    }
}

/* Search Suggestions Dropdown - Ultra Premium */
#layout-header-root .search-suggestions {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    width: 350px;
    /* Slightly wider */
    min-width: 280px;
    background: #ffffff;
    /* Pure white for crispness */
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Subtle border ring */
    z-index: 3000;
    max-height: 450px;
    overflow-y: auto;
    border-radius: 12px;
    /* Slightly tighter radius */
    padding: 10px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1 !important;
    visibility: visible !important;
    animation: menuFadeIn 0.3s ease forwards;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Custom Scrollbar */
#layout-header-root .search-suggestions::-webkit-scrollbar {
    width: 5px;
}

#layout-header-root .search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

#layout-header-root .search-suggestions::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#layout-header-root .suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #000;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

/* Removed Duplicate Hover Block */

#layout-header-root .suggestion-item:last-child {
    border-bottom: none;
}

/* Hover Accent Bar */
#layout-header-root .suggestion-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}

#layout-header-root .suggestion-item:hover {
    background: linear-gradient(90deg, rgba(var(--accent-color-rgb, 255, 193, 7), 0.08), transparent);
    color: #000 !important;
    padding-left: 28px;
}

#layout-header-root .suggestion-item:hover i {
    color: #000 !important;
    opacity: 1;
}

#layout-header-root .suggestion-item:hover:before {
    transform: scaleY(1);
}

/* Icon Container (Span) - Cleaned up */
#layout-header-root .suggestion-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-right: 12px;
    color: #000;
    /* Force Black */
    background: transparent;
    /* No Background */
    border: none;
    box-shadow: none;
    padding: 0;
}

#layout-header-root .suggestion-item i {
    font-size: 14px !important;
    /* Slightly larger icon for visibility without box */
    opacity: 1;
    /* Full black */
    color: #000;
    vertical-align: middle;
    margin: 0;
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    #layout-header-root .search-suggestions {
        position: fixed;
        top: 120px;
        left: 5vw;
        width: 90vw;
        max-height: 60vh;
        border-radius: 20px;
        /* Highly rounded for mobile feel */
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.98);
    }

    #layout-header-root .suggestion-item {
        padding: 16px 24px;
        /* Generous touch target */
        font-size: 15px;
    }

    #layout-header-root .suggestion-item:hover {
        padding-left: 24px;
        /* No shift on mobile touch usually */
        background: rgba(0, 0, 0, 0.02);
        /* Subtle touch feedback */
    }

    #layout-header-root .suggestion-item:hover:before {
        display: none;
        /* Disable bar on mobile */
    }
}

/* Mega Menu Specific Styles - Auto Width Centered Box (Floating Cards) */

/* Dropdown Container */
.dropdown-menu.mega-menu {
    position: fixed;
    top: 115px;
    /* Aligns with bottom of navbar */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    /* Invisible Container */
    box-shadow: none;
    border: none;
    border-radius: 0;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 950;
    align-items: center;
    justify-content: center;
}

/* Hover State */
.menu-item.dropdown:hover .dropdown-menu.mega-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Common Grid Container - CARD LAYOUT (From Reference Image) */
.mega-menu-grid {
    display: grid;
    gap: 0;
    /* "Image must filled" -> No gaps */
    margin: 0 auto;
    background: transparent;
    /* "Hide background" */

    /* Strict Rectangle 800x450 */
    width: 800px !important;
    height: 450px !important;

    /* Clean Look - No Borders/Shadows */
    border: none;
    box-shadow: none;
    border-radius: 0;
    /* Sharp corners */
    overflow: hidden;
}

/* --- Layouts (STRICT RECTANGLE 800x450 FILL) --- */

/* 1 Item: Full Fill (800x450) */
.grid-count-1 .mega-menu-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

/* 2 Items: Side-by-Side (400x450 each) */
.grid-count-2 .mega-menu-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

/* 3 Items: Left Half (400x450), Right Stacked (400x225) */
.grid-count-3 .mega-menu-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-auto-flow: dense;
}

.grid-count-3 .mega-menu-grid .mega-menu-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
}

/* 4 Items: 2x2 Grid (400x225 each) */
.grid-count-4 .mega-menu-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* 5 Items: Mosaic */
/* Top: Two 400x225. Bottom: Three 266x225. */
.grid-count-5 .mega-menu-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 1fr 1fr;
}

.grid-count-5 .mega-menu-grid .mega-menu-item:nth-child(1),
.grid-count-5 .mega-menu-grid .mega-menu-item:nth-child(2) {
    grid-column: span 3;
    grid-row: 1;
}

.grid-count-5 .mega-menu-grid .mega-menu-item:nth-child(3),
.grid-count-5 .mega-menu-grid .mega-menu-item:nth-child(4),
.grid-count-5 .mega-menu-grid .mega-menu-item:nth-child(5) {
    grid-column: span 2;
    grid-row: 2;
}



/* Item Styling - The "Cards" */
.mega-menu-item {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none !important;
    background: #c2b8b8;

    /* Rounded Corners per Card -> ZERO */
    border-radius: 0 !important;

    /* Clean Look - No Borders/Shadows */
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card Hover Effect */
/* Card Hover Effect */
.mega-menu-item:hover {
    /* transform: translateY(-5px); REMOVED per user request */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    border-color: var(--accent-color);
    /* Highlight border on hover */
    z-index: 10;
}

/* Image styling - Low Opacity */
.mega-menu-img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mega-menu-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    /* "Show little bit" - significantly fading the image */
    transition: all 0.5s ease;
}

/* Hover: Brighten */
/* Hover: Brighten */
.mega-menu-item:hover .mega-menu-img {
    opacity: 1;
    /* "Show the image" - fully visible on hover */
    transform: scale(1.1);
    transform-origin: center center;
}

/* Text styling */
.mega-menu-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 10px;
    z-index: 2;

    color: #fff;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.mega-menu-item:first-child .mega-menu-text {
    font-size: 24px;
    /* Larger text for the big box */
}

/* Hover Text */
.mega-menu-item:hover .mega-menu-text {
    color: #000;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .dropdown-menu.mega-menu {
        display: none !important;
    }
}

/* Mobile Tray Grid Styles */
.tray-dropdown-menu.tray-grid-layout .tray-items-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 0;
}

.tray-card {
    position: relative;
    display: block;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    background: #f4f4f4;
    border: 1px solid #eee;
}

.tray-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
}

.tray-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    pointer-events: none;
}

.tray-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.tray-card-text {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    z-index: 2;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}