/**
 * MVP Motorsports Premium Mega Menu - REFINED VERSION
 * Professional improvements with premium aesthetic maintained
 */

:root {
    --theme-color: #dc3545;
    --theme-darker: #bd2130;
    --theme-color-lighter: #e85563;
}

/* Uses existing Autostore navigation wrapper */
.nlh-main-megamenu-wrapper {
    position: relative;
}

/* Mega Menu Dropdown - Bold Black Theme */
.nlh-main-megamenu-wrapper .nlh-mega-menu {
    /*
     * IMPORTANT:
     * The wrapper (.sm_megamenu_wrapper_horizontal_menu) is only as wide as the 3 tabs
     * (HOME/CATEGORIES/BRANDS). If the dropdown is positioned absolutely inside it,
     * the menu becomes a tiny, squished box. Use a fixed, centered dropdown sized
     * to the site container.
     */
    position: fixed;
    top: 0;
    /* set precisely via JS based on header position */
    left: 50%;
    width: min(1280px, calc(100vw - 48px));
    background: rgba(20, 20, 20, 0.85);
    /* Translucent instead of solid */
    backdrop-filter: blur(12px) saturate(180%);
    /* Glass effect */
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    /* Safari support */
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 9999;

    /* Force a consistent, subtle border even if theme styles leak in */
    box-sizing: border-box;
    outline: none;

    /*
     * Border fix:
     * Do NOT use a thicker red border-top (it causes the ugly corner seam with radius).
     * Keep the border thickness consistent (1px) and draw the red accent as a background stripe.
     * Also forces any panel-specific border-top back to 1px.
     */

    border-radius: 12px;

    /* Red top accent, without border-top seam */
    background-image: linear-gradient(var(--theme-color), var(--theme-color));
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 100% 2px;

    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    max-height: 65vh;
    overflow: hidden;
    pointer-events: auto; /* Ensure menu captures all mouse events */
}


.nlh-main-megamenu-wrapper .nlh-mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* Backdrop to visually anchor the dropdown to the page */
.nlh-mega-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s;
    z-index: 9998;
    pointer-events: none; /* Only capture clicks when active */
}

.nlh-mega-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Capture clicks when active */
}

body.nlh-mega-open {
    overflow: hidden;
    /* Lock body scroll when menu is open */
    padding-right: var(--scrollbar-width, 0);
    /* Prevent layout shift from scrollbar disappearing */
}

/* Panel sections */
.nlh-mega-panel-section {
    display: none;
    pointer-events: auto; /* Ensure panels can receive mouse events */
}

.nlh-mega-panel-section.active {
    display: block;
    animation: nlhPanelIn 140ms ease;
    will-change: transform, opacity;
    max-height: none;
    /* No max height limit */
    overflow: visible;
    /* No scrolling on panel itself */
    padding: 24px 16px 16px 16px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 10px 22px rgba(0, 0, 0, 0.28) !important;
    pointer-events: auto; /* Ensure active panels can receive mouse events */
}

@keyframes nlhPanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button - Bold */
.nlh-mega-menu-close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 34px;
    height: 34px;
    background: var(--theme-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10000;
    padding: 0;
    line-height: 1;
    margin: 0;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 12px;
}

.nlh-mega-menu-close:hover {
    background: var(--theme-darker);
    transform: scale(1.03);
}

/* CATEGORIES PANEL */
.nlh-mega-menu-content {
    width: 100%;
    padding: 18px 24px;
    /* Reduced from 22px 28px */
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    /* Reduced from 34px */
    min-height: auto;
    /* Remove fixed min-height */
    pointer-events: auto; /* Ensure content captures mouse events */
    position: relative;
    z-index: 1; /* Ensure content is above backdrop */
}

/* REFINED: Clean parent categories wrapper - no heavy backgrounds */
.nlh-mega-menu .parent-categories-wrapper {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    padding-right: 22px;
    max-height: 60vh;
    position: relative;
}

/* Parent Categories - Scrollable Area */
.nlh-mega-menu .parent-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* Clean subtle scrollbar */
.nlh-mega-menu .parent-categories::-webkit-scrollbar {
    width: 8px;
}

.nlh-mega-menu .parent-categories::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-left: 1px solid #333333;
}

.nlh-mega-menu .parent-categories::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 0;
}

.nlh-mega-menu .parent-categories::-webkit-scrollbar-thumb:hover {
    background: #777777;
}

/* UP arrow ONLY at TOP of scrollbar */
.nlh-mega-menu .parent-categories::-webkit-scrollbar-button:single-button:vertical:decrement {
    background: #0a0a0a;
    border-bottom: 1px solid #333333;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="%23dc3545" d="M8 4l-6 6h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* DOWN arrow ONLY at BOTTOM of scrollbar */
.nlh-mega-menu .parent-categories::-webkit-scrollbar-button:single-button:vertical:increment {
    background: #0a0a0a;
    border-top: 1px solid #333333;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="%23dc3545" d="M8 12l6-6H2z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* REFINED: Scroll label - subtle, not button-like */
.nlh-mega-menu .parent-categories-scroll-label {
    display: none;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    color: #555555;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2em;
    background: transparent;
    border-top: 1px solid #2a2a2a;
    flex-shrink: 0;
    margin-top: 12px;
    z-index: 1;
}

/* REFINED: Professional parent category styling - elegant, not cheap */
.nlh-mega-menu .parent-category {
    padding: 8px 12px;
    /* Reduced from 12px 14px */
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1.4rem;
    color: #d0d0d0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: relative;
    border-left: 3px solid transparent;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
    background: transparent;
}

.nlh-mega-menu .parent-category .parent-category__label {
    pointer-events: none;
    display: block;
}

/* REFINED: Elegant hover - subtle but clear */
.nlh-mega-menu .parent-category:hover {
    color: #ffffff;
    border-left-color: var(--theme-color);
    background: rgba(220, 53, 69, 0.08);
    transform: translateX(2px);
}

/* REFINED: Professional active state - clear but not garish */
.nlh-mega-menu .parent-category.active {
    color: #ffffff;
    background: rgba(220, 53, 69, 0.15);
    border-left-color: var(--theme-color);
    font-weight: 700;
}

/* Children Container */
.nlh-mega-menu .children-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 26px;
}

.nlh-mega-menu .children-grid-wrapper {
    position: relative;
    min-height: auto;
    /* Remove fixed min-height */
}

.nlh-mega-menu .children-categories {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    transition: all 0.25s ease;
}

.nlh-mega-menu .children-categories.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative;
}

/* REFINED: Professional header - elegant size, NO background */
.nlh-mega-menu .category-header {
    font-size: 18px;
    /* Reduced from 22px */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    /* Reduced from 18px */
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--theme-color);
    padding-bottom: 8px;
    /* Reduced from 10px */
    position: relative;
}

/* REFINED: Subtle glow - professional, not cheap */
.nlh-mega-menu .category-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--theme-color-lighter);
    filter: blur(6px);
    opacity: 0.4;
}

.nlh-mega-menu .category-header a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nlh-mega-menu .category-header a:hover {
    color: var(--theme-color-lighter);
}

/* REFINED: Clean children grid with professional spacing */
.nlh-mega-menu .children-grid {
    --children-cols: 4;
    --children-col-gap: 24px;
    --children-row-gap: 10px;
    --divider-color: rgba(255, 255, 255, 0.12);

    /* Use columns instead of grid so columns flow like ULs */
    column-count: var(--children-cols);
    column-gap: var(--children-col-gap);

    /* This becomes vertical spacing between items */
    line-height: 1.25;

    position: relative;

    /* Divider lines between columns */
    background-image:
        linear-gradient(to bottom, transparent 0%, var(--divider-color) 5%, var(--divider-color) 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, var(--divider-color) 5%, var(--divider-color) 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, var(--divider-color) 5%, var(--divider-color) 95%, transparent 100%);
    background-size: 1px 100%, 1px 100%, 1px 100%;
    background-position: calc(25% - (var(--children-col-gap) / 2)) 0,
                         calc(50% - (var(--children-col-gap) / 2)) 0,
                         calc(75% - (var(--children-col-gap) / 2)) 0;
    background-repeat: no-repeat;
}
.nlh-mega-menu .children-grid .child-category {
    display: block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;

    margin: 0 0 var(--children-row-gap) 0;
}


.nlh-mega-menu .children-grid.nlh-children-cols-1 { --children-cols: 1; column-count: 1; background-image: none; }
.nlh-mega-menu .children-grid.nlh-children-cols-2 { --children-cols: 2; column-count: 2; background-image: linear-gradient(to bottom, transparent 0%, var(--divider-color) 5%, var(--divider-color) 95%, transparent 100%); background-size: 1px 100%; background-position: calc(50% - (var(--children-col-gap) / 2)) 0; }
.nlh-mega-menu .children-grid.nlh-children-cols-3 { --children-cols: 3; column-count: 3; background-image: linear-gradient(to bottom, transparent 0%, var(--divider-color) 5%, var(--divider-color) 95%, transparent 100%), linear-gradient(to bottom, transparent 0%, var(--divider-color) 5%, var(--divider-color) 95%, transparent 100%); background-size: 1px 100%, 1px 100%; background-position: calc(33.333% - (var(--children-col-gap) / 2)) 0, calc(66.666% - (var(--children-col-gap) / 2)) 0; }
.nlh-mega-menu .children-grid.nlh-children-cols-4 { --children-cols: 4; column-count: 4; }


/* Continuous vertical dividers aligned to grid tracks + gap */
.nlh-mega-menu .children-grid {
    /* Total width of one "column block" INCLUDING the gap after it */
--col-block: calc(
  ((100% - (2 * var(--children-pad-x))) - (var(--children-col-gap) * (var(--children-cols) - 1))) / var(--children-cols)
  + var(--children-col-gap)
);
background-position: var(--children-pad-x) 0;
background-size: calc(100% - (2 * var(--children-pad-x))) 100%;
    background-repeat: no-repeat;
    background-position: 0 0;
}

/* No dividers in 1-col mode */
.nlh-mega-menu .children-grid.nlh-children-cols-1 {
    background-image: none;
}


.nlh-mega-menu .children-grid.nlh-children-cols-1 {
    grid-template-columns: 1fr;
    background-image: none;
}

.nlh-mega-menu .children-grid.nlh-children-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    background-image: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%);
    background-size: 1px 100%;
    background-position: calc(50% - 12px) 0;
}

.nlh-mega-menu .children-grid.nlh-children-cols-3 {
    grid-template-columns: repeat(3, 1fr);
    background-image: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%), linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%);
    background-size: 1px 100%, 1px 100%;
    background-position: calc(33.333% - 12px) 0, calc(66.666% - 12px) 0;
}

.nlh-mega-menu .children-grid.nlh-children-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    background-image: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%), linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%), linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%);
    background-size: 1px 100%, 1px 100%, 1px 100%;
    background-position: calc(25% - 12px) 0, calc(50% - 12px) 0, calc(75% - 12px) 0;
 
      display: grid;
}


    --children-col-gap: 24px;
    --children-row-gap: 10px;
    --divider-color: rgba(255, 255, 255, 0.12);

    display: grid;
    gap: var(--children-row-gap) var(--children-col-gap);
    position: relative;

    background-image: none;
    background-repeat: no-repeat;
    background-size: 1px 100%;
}

/* 1 col: no lines */
.nlh-mega-menu .children-grid.nlh-children-cols-1 {
    grid-template-columns: 1fr;
    background-image: none;
}

/* 2 cols: 1 line exactly after col 1 */
.nlh-mega-menu .children-grid.nlh-children-cols-2 {
    --cols: 2;
    grid-template-columns: repeat(2, 1fr);

    background-image: linear-gradient(to bottom,
        transparent 0%,
        var(--divider-color) 5%,
        var(--divider-color) 95%,
        transparent 100%);

    background-position:
        calc(
            (
                (100% - (var(--children-col-gap) * (var(--cols) - 1))) / var(--cols)
            ) + (var(--children-col-gap) / 2)
        ) 0;
}

/* 3 cols: 2 lines exactly after col 1 and col 2 */
.nlh-mega-menu .children-grid.nlh-children-cols-3 {
    --cols: 3;
    grid-template-columns: repeat(3, 1fr);

    background-image:
        linear-gradient(to bottom,
            transparent 0%,
            var(--divider-color) 5%,
            var(--divider-color) 95%,
            transparent 100%),
        linear-gradient(to bottom,
            transparent 0%,
            var(--divider-color) 5%,
            var(--divider-color) 95%,
            transparent 100%);

    background-position:
        calc(
            (
                (100% - (var(--children-col-gap) * (var(--cols) - 1))) / var(--cols)
            ) * 1 + (var(--children-col-gap) * 0) + (var(--children-col-gap) / 2)
        ) 0,
        calc(
            (
                (100% - (var(--children-col-gap) * (var(--cols) - 1))) / var(--cols)
            ) * 2 + (var(--children-col-gap) * 1) + (var(--children-col-gap) / 2)
        ) 0;
}

/* 4 cols: 3 lines exactly after col 1, 2, 3 */
.nlh-mega-menu .children-grid.nlh-children-cols-4 {
    --cols: 4;
    grid-template-columns: repeat(4, 1fr);

    background-image:
        linear-gradient(to bottom,
            transparent 0%,
            var(--divider-color) 5%,
            var(--divider-color) 95%,
            transparent 100%),
        linear-gradient(to bottom,
            transparent 0%,
            var(--divider-color) 5%,
            var(--divider-color) 95%,
            transparent 100%),
        linear-gradient(to bottom,
            transparent 0%,
            var(--divider-color) 5%,
            var(--divider-color) 95%,
            transparent 100%);

    background-position:
        calc(
            (
                (100% - (var(--children-col-gap) * (var(--cols) - 1))) / var(--cols)
            ) * 1 + (var(--children-col-gap) * 0) + (var(--children-col-gap) / 2)
        ) 0,
        calc(
            (
                (100% - (var(--children-col-gap) * (var(--cols) - 1))) / var(--cols)
            ) * 2 + (var(--children-col-gap) * 1) + (var(--children-col-gap) / 2)
        ) 0,
        calc(
            (
                (100% - (var(--children-col-gap) * (var(--cols) - 1))) / var(--cols)
            ) * 3 + (var(--children-col-gap) * 2) + (var(--children-col-gap) / 2)
        ) 0;
}


/* REFINED: Professional child categories - subtle borders, good! */
.nlh-mega-menu .child-category {
    padding: 6px 16px;
    /* Reduced from 8px 20px */
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    /* Slightly smaller */
    color: #d0d0d0;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: block;
    position: relative;
    border-left: 2px solid transparent;
    background: transparent;
    border-radius: 0;
    border: none;
}

/* REFINED: Elegant hover - clear feedback without being cheap */
.nlh-mega-menu .child-category:hover {
    color: #ffffff;
    text-decoration: none;
    border-left-color: var(--theme-color);
    background: rgba(220, 53, 69, 0.05);
    /* Subtle highlight only */
    transform: translateX(3px);
    border-color: transparent;
    /* No border on hover */
    box-shadow: none;
    /* No shadow */
}

.nlh-mega-menu .child-category--single {
    text-align: left;
    font-weight: 600;
    font-size: 15px;
}

/* Black Friday Panel - Bold Dark Theme */
.nlh-mega-menu .featured-panel {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 10px;
}

.nlh-black-friday-panel {
    background: #0a0a0a;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.nlh-black-friday-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: var(--theme-color);
    opacity: 0.08;
    border-radius: 50%;
    pointer-events: none;
}

.nlh-bf-header {
    position: relative;
    z-index: 1;
}

.nlh-bf-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--theme-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.nlh-bf-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.nlh-bf-subtitle {
    font-size: 15px;
    color: #999999;
    letter-spacing: 0.01em;
}

.nlh-bf-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.nlh-bf-link {
    padding: 18px 24px;
    background: #1a1a1a;
    border: 2px solid #333333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    font-weight: 600;
}

.nlh-bf-link:hover {
    border-color: var(--theme-color);
    transform: translateX(4px);
    text-decoration: none;
}

.nlh-bf-link--primary {
    background: var(--theme-color);
    border-color: var(--theme-color);
}

.nlh-bf-link--primary:hover {
    background: var(--theme-darker);
    border-color: var(--theme-darker);
}

.nlh-bf-link-label {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nlh-bf-link-arrow {
    font-size: 20px;
    color: #ffffff;
    transition: transform 0.2s ease;
}

.nlh-bf-link:hover .nlh-bf-link-arrow {
    transform: translateX(4px);
}

.nlh-bf-link-icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    display: inline-block;
    vertical-align: middle;
    background-image: url('/static/frontend/Sm/autostore/en_US/images/nlh-garage.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1) brightness(2);
    flex-shrink: 0;
}

.nlh-bf-link-icon svg,
.nlh-bf-link-icon img {
    display: none;
}

.nlh-bf-link--supra {
    justify-content: flex-start;
}

.nlh-bf-footer {
    padding-top: 20px;
    border-top: 2px solid #333333;
    text-align: center;
    position: relative;
    z-index: 1;
}

.nlh-bf-timer-label {
    font-size: 12px;
    color: #666666;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* HOME PANEL - Bold Black Theme */
.nlh-mega-panel-section--home {
    padding: 44px 48px;
    width: 100%;
}

.nlh-mega-home-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: center;
}

.nlh-mega-home-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-transform: uppercase;
}

.nlh-mega-home-text {
    font-size: 17px;
    color: #cccccc;
    margin-bottom: 24px;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.nlh-mega-home-links {
    display: flex;
    gap: 16px;
}

.nlh-mega-home-links a {
    padding: 14px 28px;
    border: 2px solid var(--theme-color);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: var(--theme-color);
    color: #ffffff;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nlh-mega-home-links a:hover {
    background: var(--theme-darker);
    border-color: var(--theme-darker);
    color: #fff;
}

.nlh-mega-home-links a:last-child {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.nlh-mega-home-links a:last-child:hover {
    background: #ffffff;
    color: #1a1a1a;
}

.nlh-mega-home-column--muted {
    background: #0a0a0a;
    border: 2px solid #333333;
    padding: 32px;
}

.nlh-mega-home-column {
    padding: 20px 30px 60px 30px;
}

.nlh-mega-home-subtitle {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nlh-mega-home-tags {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nlh-mega-home-tags span {
    font-size: 14px;
    color: #cccccc;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Quick Links - Premium Styling */
.nlh-mega-home-tags.nlh-quicklinks {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0;
    padding: 0;
}

.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:link,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:visited,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:focus,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:active {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 5px 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #999999 !important;
    font-weight: 400 !important;
    letter-spacing: 0.02em !important;
    text-decoration: none !important;
    text-transform: none !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

/* Home link - subtle standout without looking like active indicator */
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a.nlh-quicklink-home,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a.nlh-quicklink-home:link,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a.nlh-quicklink-home:visited {
    color: #bbbbbb !important;
    font-weight: 500 !important;
}

.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a::before {
    content: '' !important;
    display: inline-block !important;
    width: 0 !important;
    height: 2px !important;
    background: #dc3545 !important;
    transition: width 0.2s ease !important;
    flex-shrink: 0 !important;
}

.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:hover,
.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:hover:visited {
    color: #ffffff !important;
}

.nlh-mega-menu .nlh-mega-panel-section--home .nlh-mega-home-column--muted .nlh-mega-home-tags.nlh-quicklinks a:hover::before {
    width: 12px !important;
}

/* BRANDS PANEL - Bold Black Theme */
.nlh-mega-brands {
    width: 100%;
    padding: 4px 48px;
    overflow: hidden;
}

.nlh-mega-brands-header {
    margin-bottom: 32px;
}

.nlh-mega-brands-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.nlh-mega-brands-view-all {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--theme-color);
    letter-spacing: 0.01em;
}

.nlh-mega-brands-view-all:hover {
    text-decoration: underline;
}

.nlh-mega-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

.nlh-mega-brands-grid::-webkit-scrollbar {
    width: 6px;
}

.nlh-mega-brands-grid::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.nlh-mega-brands-grid::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

.nlh-mega-brands-grid::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color);
}

.nlh-mega-brands-grid span,
.nlh-mega-brands-grid a,
.nlh-mega-brand-item {
    font-size: 12px;
    font-weight: 700;
    padding: 12px 8px;
    background: #0a0a0a;
    border: 2px solid #333333;
    text-align: center;
    color: #ffffff !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    word-break: break-word;
    hyphens: auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nlh-mega-brands-grid span:hover,
.nlh-mega-brands-grid a:hover,
.nlh-mega-brand-item:hover {
    border-color: var(--theme-color);
    color: var(--theme-color) !important;
    text-decoration: none;
}

.nlh-mega-brands-footer {
    font-size: 12px;
    color: #666666;
    letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 1400px) {

    .nlh-mega-menu-content,
    .nlh-mega-panel-section--home,
    .nlh-mega-brands {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 1200px) {
    .nlh-mega-menu-content {
        grid-template-columns: 320px 1fr;
        gap: 40px;
    }

    .nlh-mega-menu .children-container {
        grid-template-columns: 1fr;
    }

    .nlh-mega-menu .featured-panel {
        display: none;
    }

    .nlh-mega-menu .children-grid.nlh-children-cols-4,
    .nlh-mega-menu .children-grid.nlh-children-cols-3 {
        grid-template-columns: repeat(2, 1fr);
        background-image: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.12) 95%, transparent 100%);
        background-size: 1px 100%;
        background-position: calc(50% - 12px) 0;
    }


    .nlh-mega-home-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nlh-mega-home-title {
        font-size: 36px;
    }
}

/* DUAL MENU SYSTEM - Hide desktop menu on mobile, hide mobile menu on desktop */
.header-navigation-mobile {
    display: none;
}

.header-navigation-desktop {
    display: block;
}

@media (max-width: 768px) {

    /* Hide desktop Premium MegaMenu */
    .header-navigation-desktop {
        display: none !important;
    }

    /* Show mobile SM Autostore menu */
    .header-navigation-mobile {
        display: block !important;
    }

    /* Extra safety - hide desktop navigation wrapper */
    .desktop-navigation {
        display: none !important;
    }

    /* Show mobile container */
    .header-navigation-mobile .navigation-mobile-container {
        display: block !important;
    }

    .nlh-mega-menu-content,
    .nlh-mega-panel-section--home,
    .nlh-mega-brands {
        padding: 32px 24px;
    }

    .nlh-mega-menu-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nlh-mega-menu .parent-categories {
        border-right: none;
        border-bottom: 2px solid #333333;
        padding-bottom: 24px;
        margin-bottom: 24px;
        grid-template-columns: 1fr;
    }

    .nlh-mega-menu .children-grid {
        grid-template-columns: 1fr;
        background-image: none !important;
        background-size: auto;
        background-position: 0 0;
    }

    .nlh-mega-home-title {
        font-size: 32px;
    }

    .nlh-mega-brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* UL-like flow: each column stacks independently (no shared row heights) */
.nlh-mega-menu .children-grid.nlh-children-cols-4 {
  display: block !important;               /* fully disable CSS Grid */
  columns: 4;                              /* 4 independent vertical columns */
  column-gap: 24px;
  column-rule: 1px solid rgba(255,255,255,0.12); /* replaces your gradient dividers */
  background-image: none !important;       /* kill the grid divider gradients */
}

/* Make each link behave like a <li> */
.nlh-mega-menu .children-grid.nlh-children-cols-4 .child-category {
  display: inline-block;                   /* more reliable inside columns than block */
  width: 100%;
  margin: 0 0 10px 0;                      /* consistent vertical spacing */
  padding: 10px 16px;                       /* UL-ish */
  line-height: 1.25;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

/* Optional: keep hover, but don’t let it “push” into the divider */
.nlh-mega-menu .children-grid.nlh-children-cols-4 .child-category:hover {
  transform: translateX(2px);              /* was 3px; safer with column rules */
}

/* Match your breakpoints */
@media (max-width: 1200px) {
  .nlh-mega-menu .children-grid.nlh-children-cols-4 {
    columns: 2;
  }
}

@media (max-width: 768px) {
  .nlh-mega-menu .children-grid.nlh-children-cols-4 {
    columns: 1;
    column-rule: none;
  }
}


.nlh-black-friday-panel, .nlh-mega-menu .featured-panel {
    display: none !important;
}