.sbz-mega-menu {
    --sbz-menu-accent: #eb008b;
    font-family: inherit;
}

body.sbz-menu-lock-scroll {
    overflow: hidden;
}

/* ---------- Gedeeld: desktop + tablet horizontale balk ---------- */

.sbz-mega-menu__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    flex-wrap: wrap;
}

.sbz-mega-menu__item {
    position: relative;
    display: flex;
    align-items: center;
}

.sbz-mega-menu__link {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.sbz-mega-menu__link:hover,
.sbz-mega-menu__link:focus-visible,
.sbz-mega-menu__item--open > .sbz-mega-menu__link {
    background: rgba(0, 0, 0, 0.06);
}

.sbz-mega-menu__link:focus-visible {
    outline: 2px solid var(--sbz-menu-accent);
    outline-offset: -2px;
}

.sbz-mega-menu__toggle {
    background: none;
    border: none;
    margin-left: -6px;
    padding: 8px 6px;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    border-radius: 4px;
    opacity: 0.7;
}

.sbz-mega-menu__toggle:hover,
.sbz-mega-menu__toggle:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.sbz-mega-menu__toggle:focus-visible {
    outline: 2px solid var(--sbz-menu-accent);
    outline-offset: -2px;
}

.sbz-mega-menu__toggle svg {
    transition: transform 0.2s ease;
}

.sbz-mega-menu__item--open .sbz-mega-menu__toggle svg {
    transform: rotate(180deg);
}

/* position: fixed + top/left worden dynamisch door sbz-mega-menu.js gezet
   nadat het paneel bij openen naar document.body is verplaatst (zie de
   portalToBody-toelichting daar) — zo ontsnapt het paneel gegarandeerd aan
   elke stacking context die een Avada-headerkolom toevallig instelt. */
.sbz-mega-menu__panel {
    position: fixed !important;
    min-width: 260px;
    max-width: 520px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    padding: 14px;
    z-index: 100000;
    animation: sbz-menu-fade-in 0.15s ease;
}

@keyframes sbz-menu-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sbz-mega-menu__panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2px;
}

.sbz-mega-menu__panel-link {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.sbz-mega-menu__panel-link:hover,
.sbz-mega-menu__panel-link:focus-visible {
    background: #f5f5f5;
}

.sbz-mega-menu__panel-link:focus-visible {
    outline: 2px solid var(--sbz-menu-accent);
    outline-offset: -2px;
}

.sbz-mega-menu--tablet .sbz-mega-menu__link {
    padding: 8px 10px;
    font-size: 13px;
}

.sbz-mega-menu--tablet .sbz-mega-menu__panel {
    min-width: 220px;
    max-width: 340px;
}

.sbz-mega-menu--tablet .sbz-mega-menu__panel-list {
    grid-template-columns: 1fr;
}

/* ---------- Mobiel: hamburger + volledig-scherm accordion-paneel ---------- */

.sbz-mega-menu--mobile {
    display: inline-block;
}

.sbz-mega-menu__hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.sbz-mega-menu__hamburger:focus-visible {
    outline: 2px solid var(--sbz-menu-accent);
    outline-offset: -2px;
}

.sbz-mega-menu__hamburger-box {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: background-color 0.15s ease;
}

.sbz-mega-menu__hamburger-box::before,
.sbz-mega-menu__hamburger-box::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.sbz-mega-menu__hamburger-box::before {
    top: -7px;
}

.sbz-mega-menu__hamburger-box::after {
    top: 7px;
}

.sbz-mega-menu__hamburger[aria-expanded="true"] .sbz-mega-menu__hamburger-box {
    background: transparent;
}

.sbz-mega-menu__hamburger[aria-expanded="true"] .sbz-mega-menu__hamburger-box::before {
    transform: translateY(7px) rotate(45deg);
}

.sbz-mega-menu__hamburger[aria-expanded="true"] .sbz-mega-menu__hamburger-box::after {
    transform: translateY(-7px) rotate(-45deg);
}

.sbz-mega-menu__mobile-panel {
    /* !important + losse eigenschappen i.p.v. de 'inset'-shorthand: op
       mobiele browsers die 'inset' niet kennen wordt de hele regel
       stilzwijgend genegeerd, en zonder !important zou elke toevallig
       specifiekere pagina-CSS deze positionering kunnen overschrijven —
       dan blijft position:fixed zonder werkende offsets staan en dekt het
       paneel het scherm niet, met precies het kapotte effect dat hier
       gemeld werd. */
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 100000;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.sbz-mega-menu__mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.sbz-mega-menu__mobile-title {
    font-weight: 700;
    font-size: 16px;
}

.sbz-mega-menu__mobile-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #333;
    display: flex;
}

.sbz-mega-menu__mobile-close:focus-visible {
    outline: 2px solid var(--sbz-menu-accent);
    outline-offset: -2px;
}

.sbz-mega-menu__mobile-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.sbz-mega-menu__mobile-item {
    border-bottom: 1px solid #f5f5f5;
}

.sbz-mega-menu__mobile-row {
    display: flex;
    align-items: stretch;
}

.sbz-mega-menu__mobile-link {
    flex: 1;
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: #222;
    font-size: 16px;
    font-weight: 600;
}

.sbz-mega-menu__mobile-link:focus-visible,
.sbz-mega-menu__mobile-expand:focus-visible,
.sbz-mega-menu__mobile-sublink:focus-visible {
    outline: 2px solid var(--sbz-menu-accent);
    outline-offset: -2px;
}

.sbz-mega-menu__mobile-expand {
    background: none;
    border: none;
    padding: 14px 18px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.sbz-mega-menu__mobile-expand[aria-expanded="true"] {
    transform: rotate(180deg);
}

.sbz-mega-menu__mobile-sublist {
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
    background: #fafafa;
}

.sbz-mega-menu__mobile-sublink {
    display: block;
    padding: 10px 16px 10px 32px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .sbz-mega-menu__panel {
        animation: none;
    }

    .sbz-mega-menu__link,
    .sbz-mega-menu__toggle,
    .sbz-mega-menu__toggle svg,
    .sbz-mega-menu__hamburger-box,
    .sbz-mega-menu__hamburger-box::before,
    .sbz-mega-menu__hamburger-box::after,
    .sbz-mega-menu__mobile-expand,
    .sbz-mega-menu__panel-link {
        transition: none;
    }
}
