/**
 * Header categories mega menu — positioning, panel chrome, submenu flyout.
 * Overrides broken customizer rules (position:static, inline-block links, no panel bg).
 */
@media (min-width: 1200px) {
    .whb-header-bottom,
    .whb-header-bottom .whb-col-left,
    .whb-header-bottom .wd-header-cats {
        overflow: visible !important;
    }

    .whb-header-bottom .whb-col-left {
        align-items: center;
    }

    /* Opener + hover target */
    .whb-header-bottom .wd-header-cats {
        position: relative;
        display: inline-flex;
        flex-direction: column;
        align-items: flex-start;
        width: fit-content;
        max-width: 100%;
        height: auto !important;
        margin: 0 !important;
        align-self: center;
    }

    .whb-header-bottom .wd-header-cats .menu-opener {
        position: relative;
        z-index: 301;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    /* Primary dropdown panel */
    .whb-header-bottom .wd-header-cats > .wd-dropdown.wd-dropdown-cats {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: auto !important;
        width: auto !important;
        min-width: 270px;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        overflow: visible !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-top: 0 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 8px !important;
        border-bottom-right-radius: 8px !important;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14) !important;
    }

    .whb-header-bottom .wd-header-cats > .wd-dropdown.wd-dropdown-cats::after,
    .whb-header-bottom .wd-header-cats > .wd-dropdown-cats::after {
        display: none !important;
    }

    .whb-header-bottom .wd-header-cats > .wd-dropdown-cats .wd-nav.wd-nav-vertical,
    .whb-header-bottom .wd-header-cats > .wd-dropdown-cats .wd-nav.wd-nav-vertical > li:first-child > a {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories {
        width: 100%;
        min-width: 270px;
        margin: 0;
        padding: 0;
        border: 0 !important;
        border-radius: 0 0 8px 8px !important;
        background: #ffffff;
        overflow: visible !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li {
        position: relative !important;
        border-bottom: 1px solid #eef0f3;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li:last-child {
        border-bottom: 0;
    }

    /* Main category rows — label + chevron pinned to far right */
    .whb-header-bottom .wd-header-cats #menu-product-categories > li > a.woodmart-nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.75rem;
        position: relative;
        min-height: 44px;
        padding: 10px 1rem !important;
        text-align: left !important;
        color: #1f2937 !important;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.35;
        text-transform: none;
        background: #ffffff;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none;
        transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li > a .nav-link-text {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
    }

    /* Kill Customizer pill pseudo on all category links */
    .whb-header-bottom .wd-header-cats #menu-product-categories > li > a.woodmart-nav-link::after {
        content: none !important;
        display: none !important;
        position: static !important;
        inset: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        pointer-events: none !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li > a.woodmart-nav-link:hover::after,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li > a.woodmart-nav-link:focus-visible::after {
        content: none !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    /* Chevron — always visible, far right; down → right on hover/open */
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.menu-item-has-children > a::after {
        content: "\f129" !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        order: 2;
        position: static !important;
        inset: auto !important;
        margin: 0 0 0 auto !important;
        margin-inline-start: auto !important;
        transform: none;
        font-family: "woodmart-font" !important;
        font-weight: 400;
        font-size: 12px;
        line-height: 1;
        color: #9ca3af !important;
        opacity: 1 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li:hover > a,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.wd-opened > a,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.menu-item-has-children:hover > a {
        background: #f8fafc !important;
        color: var(--mme-accent, #c8922a) !important;
        border: none !important;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li.menu-item-has-children:hover > a::after,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.menu-item-has-children.wd-opened > a::after,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.menu-item-has-children:focus-within > a::after {
        content: "\f113" !important;
        color: var(--mme-accent, #c8922a) !important;
        transform: translateX(2px);
        box-shadow: none !important;
    }

    /* Flyout submenu panel — distinct secondary style */
    .whb-header-bottom .wd-header-cats #menu-product-categories > li > .wd-dropdown-menu {
        top: var(--mme-submenu-top, 0px) !important;
        left: 100% !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: var(--mme-submenu-max-height, none);
        min-width: 300px;
        max-width: min(540px, 50vw);
        background: linear-gradient(180deg, #fbf9f6 0%, #f3f0ea 100%) !important;
        color: #374151 !important;
        border: 1px solid #e5dfd3 !important;
        border-left: 3px solid var(--mme-accent, #c8922a) !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
        box-shadow: 12px 16px 36px rgba(15, 23, 42, 0.14) !important;
        overflow-x: hidden;
        overflow-y: var(--mme-submenu-overflow-y, hidden);
        z-index: 391;
    }

    .whb-header-bottom .wd-header-cats .wd-nav.wd-nav-vertical {
        overflow: visible !important;
    }

    /* Beat Customizer Additional CSS (position:static, width:200px, height:100%) */
    .whb-header-bottom .wd-header-cats.wd-open-dropdown #menu-product-categories > li,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li {
        position: relative !important;
    }

    .whb-header-bottom .wd-header-cats > .wd-dropdown.wd-dropdown-cats,
    .whb-header-bottom .wd-header-cats > .wd-dropdown-cats {
        position: absolute !important;
        width: auto !important;
        min-width: 270px !important;
        top: 100% !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li > .wd-dropdown-menu.wd-design-default {
        height: auto !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li.wd-event-hover:hover > .wd-dropdown,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.wd-opened > .wd-dropdown-menu,
    .whb-header-bottom .wd-header-cats #menu-product-categories > li.menu-item-has-children:hover > .wd-dropdown-menu {
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li > .wd-dropdown-menu.color-scheme-dark {
        background: linear-gradient(180deg, #fbf9f6 0%, #f3f0ea 100%) !important;
        color: #374151 !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li > .wd-dropdown-menu::after {
        top: 0 !important;
        right: 100% !important;
        bottom: 0 !important;
        left: auto !important;
        width: 10px !important;
        height: auto !important;
    }

    .whb-header-bottom .wd-header-cats #menu-product-categories > li > .wd-dropdown-menu > .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent;
    }

    .whb-header-bottom .wd-header-cats .mm-lite {
        display: block;
        width: 100%;
        background: transparent;
    }

    .whb-header-bottom .wd-header-cats .mm-lite:not([data-category-title])::before {
        display: none;
    }

    .whb-header-bottom .wd-header-cats .mm-lite::before {
        content: attr(data-category-title);
        display: block;
        padding: 12px 18px 10px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--mme-accent, #c8922a);
        background: rgba(255, 255, 255, 0.72);
        border-bottom: 1px solid #e8e2d8;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-wrap {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin: 0;
        padding: 6px 0 8px;
        background: transparent;
        border-radius: 0;
        overflow: hidden;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-col {
        margin: 0;
        padding: 0;
        border-bottom: 0;
        background: transparent;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-title {
        margin: 0;
        padding: 0;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-col a,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-title a {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100% !important;
        min-height: 40px;
        padding: 9px 18px 9px 22px !important;
        text-align: left !important;
        color: #4b5563 !important;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.4;
        text-decoration: none;
        background: transparent;
        border: 0 !important;
        border-left: 3px solid transparent !important;
        border-radius: 0 !important;
        transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, padding 0.2s ease;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-col a::before,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-title a::before {
        content: "";
        flex: 0 0 6px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #d1c4a8;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .whb-header-bottom .wd-header-cats .wd-dropdown-menu .mm-col a::after,
    .whb-header-bottom .wd-header-cats .wd-dropdown-menu .mm-title a::after {
        display: none !important;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-col a:hover,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-col a:focus-visible,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-title a:hover,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-title a:focus-visible {
        background: #ffffff !important;
        color: #1f2937 !important;
        border-left-color: var(--mme-accent, #c8922a) !important;
        padding-left: 19px !important;
    }

    .whb-header-bottom .wd-header-cats .mm-lite .mm-col a:hover::before,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-col a:focus-visible::before,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-title a:hover::before,
    .whb-header-bottom .wd-header-cats .mm-lite .mm-title a:focus-visible::before {
        background: var(--mme-accent, #c8922a);
        transform: scale(1.15);
    }

    .whb-header-bottom .wd-dropdown.wd-dropdown-cats,
    .whb-header-bottom .wd-dropdown-cats .wd-dropdown-menu {
        margin-top: 0 !important;
    }
}
