/* Scoped to the desktop header: the SlickNav clone keeps its original accordion. */
.header-menu .stone-mega-toggle { display: none; }
@media (min-width: 769px) {
    #header .btm-header { position: relative; z-index: 100; }
    #header .btm-header.sticky { position: fixed; }
    #header .btm-header > .container { position: relative; }
    #header .btm-header > .container::after { content: ''; display: table; clear: both; }
    #header .header-menu, #header .header-menu > ul,
    #header .header-menu > ul > li.stone-mega { position: static; }
    #header .header-menu > ul > li.stone-mega::after { content: none; }
    #header .header-menu > ul > li.stone-mega > a { display: inline-block; width: auto; }
    #header .header-menu .stone-mega-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 28px; height: 36px; padding: 0; margin-left: 4px;
        border: 0; border-radius: 4px; background: transparent; color: inherit;
        cursor: pointer; vertical-align: middle;
    }
    #header .header-menu .stone-mega-toggle::after {
        content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px;
    }
    #header .header-menu .stone-mega-toggle[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: 4px; }
    #header .header-menu a:focus-visible, #header .stone-mega-toggle:focus-visible { outline: 2px solid #0060ef; outline-offset: 2px; }
    #header .header-menu > ul > .stone-mega > ul {
        display: none; position: absolute; top: 100%; left: 50%; right: auto;
        transform: translateX(-50%); width: 100%; max-width: 100%;
        grid-template-columns: repeat(var(--stone-mega-columns, 4), minmax(0, 1fr));
        gap: 22px; padding: 24px; margin: 0; box-sizing: border-box;
        background: #fff; border-top: 3px solid #0060ef;
        box-shadow: 0 12px 24px rgba(0,0,0,.14);
        max-height: var(--stone-mega-height, 65vh); overflow-y: auto; overscroll-behavior: contain;
    }
    #header .header-menu > ul > .stone-mega.is-open > ul,
    #header .header-menu > ul > .stone-mega:not(.stone-mega-ready):hover > ul,
    #header .header-menu > ul > .stone-mega:not(.stone-mega-ready):focus-within > ul { display: grid; }
    #header .header-menu .stone-mega-columns-2 { --stone-mega-columns: 2; }
    #header .header-menu .stone-mega-columns-3 { --stone-mega-columns: 3; }
    #header .header-menu .stone-mega-columns-4 { --stone-mega-columns: 4; }
    #header .header-menu .stone-mega-columns-5 { --stone-mega-columns: 5; }
    #header .header-menu .stone-mega-columns-6 { --stone-mega-columns: 6; }
    #header .header-menu > ul > .stone-mega-width-900 > ul { width: 900px; }
    #header .header-menu > ul > .stone-mega-width-1100 > ul { width: 1100px; }
    #header .header-menu .stone-mega ul li { width: auto; min-width: 0; border: 0; z-index: auto; }
    #header .header-menu .stone-mega ul a { padding: 8px 10px; line-height: 1.5; overflow-wrap: anywhere; }
    #header .header-menu .stone-mega > ul > li > a { font-weight: 600; border-bottom: 1px solid #e8e8e8; margin-bottom: 6px; }
    #header .header-menu .stone-mega ul a:hover { background: #f3f6fa; color: #0060ef; }
    #header .header-menu .stone-mega ul ul {
        position: static; display: block !important; opacity: 1 !important;
        width: auto; margin: 0; padding: 0; box-shadow: none; transform: none;
    }
    #header .header-menu .stone-mega ul ul ul { padding-left: 12px; }
}
@media (min-width: 769px) and (max-width: 991px) {
    #header .header-menu > ul > .stone-mega { --stone-mega-columns: 2; }
}
/* Resolve the original theme's overlapping mobile/desktop rules at exactly 768px. */
@media (max-width: 768px) { #slick-mobile-menu .slicknav_menu { display: block; } }
