/* ===============================
   WRAPPER
================================ */

.pr-megamenu-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9998;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: auto; /* CRÍTICO */
}

.pr-megamenu-wrapper.is-open {
    opacity: 1;
}

/* ===============================
   OVERLAY
================================ */

.pr-megamenu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 9997;
    pointer-events: auto;
}

.pr-megamenu-overlay.active {
    opacity: 1;
}

/* ===============================
   INNER
================================ */

.pr-megamenu-inner {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
    top: 80px;
    margin: 0 auto;
    width: min(1200px, 92vw);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 80px rgba(0,0,0,.15);
    display: grid;
    grid-template-columns: 280px 1fr 1fr;
    min-height: 420px;
    overflow: hidden;
}

/* ===============================
   COLUMNS
================================ */

.pr-megamenu-col {
    padding: 24px;
    overflow-y: auto;
}

.pr-megamenu-col.col-1 {
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
}

.pr-megamenu-col.col-2 {
    border-right: 1px solid #e5e7eb;
}

/* ===============================
   LISTS
================================ */

.pr-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pr-mega-item {
    margin-bottom: 6px;
}

.pr-mega-link {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #111;
    font-weight: 500;
}

.pr-mega-link:hover {
    background: #eef2ff;
    color: #1d4ed8;
}

/* ===============================
   MOBILE FIX
================================ */

@media (max-width: 900px) {

    .pr-megamenu-inner {
        top: 0;
        height: 100%;
        border-radius: 0;
        grid-template-columns: 1fr;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pr-megamenu-col {
        max-height: 100vh;
        overflow-y: auto;
    }

    .pr-megamenu-col.col-2,
    .pr-megamenu-col.col-3 {
        display: none;
    }

    .pr-megamenu-wrapper.is-mobile-open .col-2,
    .pr-megamenu-wrapper.is-mobile-open .col-3 {
        display: block;
    }
}
