/* Magento 2.4.9 nav fixes — loaded as a new file to bypass Cloudflare cache of header.css */

/* Desktop: core styles-l sets navigation to block; force horizontal flex menu */
body .nav-sections-item-content > .navigation {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    background: transparent;
}

/*
 * Magento tabs JS can leave #store.menu as display:none on PDPs
 * (product tabs share the tabs widget). Force the menu panel visible on desktop.
 */
@media (min-width: 768px) {
    body .nav-sections #store\.menu {
        display: block !important;
        float: none !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    body .nav-sections #store\.links {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* Hide inactive mobile panels so Menu/Account don't stack */
    body .nav-sections-item-content:not(.active) {
        display: none !important;
    }
    body .nav-sections-item-content.active {
        display: block !important;
        float: none;
        margin-left: 0;
        width: 100%;
    }
    /*
     * If tabs JS never marks #store.menu active, show Menu when drawer is open —
     * but not when Account (#store.links) is active (prevents overlap).
     */
    html.nav-open body .nav-sections-items:not(:has(#store\.links.active)) #store\.menu {
        display: block !important;
        float: none;
        margin-left: 0;
        width: 100%;
    }
    html.nav-open body .nav-sections-items:has(#store\.links.active) #store\.menu {
        display: none !important;
    }
}
