/* UI bundle css — generado automáticamente; no editar */

/* --- component:main-menu --- */
/* main-menu — sticky bar + overlay móvil (no empuja el contenido) */

[data-component="main-menu"] {
    --main-menu-bg: #fff;
    --main-menu-border: #eee;
    --main-menu-text: #111;
    --main-menu-muted: #555;
    --main-menu-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
    width: 100%;
}

#main-menu-list { font-size: 1rem; }
#main-menu-list a,
#main-menu-list .nav-link { color: var(--main-menu-text) !important; }
#main-menu-list a.dropdown-item:hover { color: #333 !important; }
#main-menu-list .dropdown-item { font-size: 0.95rem; }

/* ——— Móvil / tablet: panel overlay bajo la barra negra ——— */
@media only screen and (max-width: 991.98px) {
    #navbar-desktop {
        position: sticky;
        overflow: visible;
        z-index: 1030;
    }

    /* Fuera del flujo: al abrir no empuja el contenido */
    [data-component="main-menu"].navbar-collapse,
    [data-component="main-menu"].collapsing {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1;
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
    }

    [data-component="main-menu"].collapsing {
        overflow: hidden;
        transition: height 0.2s ease;
    }

    #main-menu-list-mobile {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 0;
        padding: 0.25rem 0 0.75rem;
        background: var(--main-menu-bg);
        border-top: 1px solid var(--main-menu-border);
        border-bottom: 1px solid var(--main-menu-border);
        box-shadow: var(--main-menu-shadow);
        max-height: min(75vh, calc(100dvh - var(--wk-navbar-height, 4.5rem)));
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #main-menu-list-mobile .nav-item { width: 100%; }

    #main-menu-list-mobile a,
    #main-menu-list-mobile .nav-link {
        color: var(--main-menu-text) !important;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    #main-menu-list-mobile a:hover,
    #main-menu-list-mobile .nav-link:hover { color: var(--main-menu-muted) !important; }

    #main-menu-list-mobile .dropdown-item {
        font-size: 0.95rem;
        text-align: left;
        padding: 0.55rem 1rem 0.55rem 1.5rem;
    }

    .main-menu__cat-row {
        display: flex;
        align-items: center;
        gap: 0.15rem;
        border-bottom: 1px solid var(--main-menu-border);
    }

    .main-menu__cat-row > .nav-link {
        flex: 1 1 auto;
        margin: 0;
        font-weight: 600;
    }

    .main-menu__cat-toggle {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 0;
        background: transparent;
        color: var(--main-menu-text);
        cursor: pointer;
    }

    .main-menu__cat-toggle i {
        transition: transform 0.2s ease;
    }

    .main-menu__cat-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

    .main-menu__sub {
        margin: 0;
        padding: 0 0 0.35rem;
        background: #fafafa;
        border-bottom: 1px solid var(--main-menu-border);
    }

    .main-menu__sub-item { list-style: none; }

    .main-menu__extra > .nav-link {
        border-bottom: 1px solid var(--main-menu-border);
    }

    .main-menu__extra:first-child > .nav-link {
        color: #2f6b1a !important;
    }

    #main-menu-list-mobile .mega-menu__view-all-item {
        border-top: 1px solid var(--main-menu-border);
        margin-top: 0.15rem;
        padding-top: 0.15rem;
    }

    #main-menu-list-mobile .mega-menu__view-all-link {
        font-weight: 600;
        color: var(--main-menu-text) !important;
    }

    /*
     * Backdrop DEBAJO del navbar (1030): oscurece solo el contenido.
     * Empieza bajo la barra para no tapar el botón cerrar.
     */
    .main-menu__backdrop {
        position: fixed;
        top: var(--wk-navbar-height, 4.5rem);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1020;
        background: rgba(0, 0, 0, 0.35);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .main-menu__backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    body.main-menu-is-open {
        overflow: hidden;
    }
}

/* ——— Desktop: en flujo, mega menú visible ——— */
@media only screen and (min-width: 992px) {
    [data-component="main-menu"] {
        position: relative;
        overflow: visible !important;
    }

    .main-menu__backdrop {
        display: none !important;
    }
}
