/**
 * Mega-menú de categorías — Imperio Perú
 */

.site-header.imperio-mega-open {
    z-index: 10060 !important;
}

.site-header.imperio-mega-open .header-nav {
    z-index: 10061 !important;
}

.site-header .header-nav,
.site-header .header-nav > .container {
    position: relative;
    overflow: visible !important;
}

.site-header.imperio-mega-open .all-categories.imperio-mega-cats {
    z-index: 10064 !important;
    position: relative;
}

.all-categories.imperio-mega-cats {
    position: relative;
}

/* Backdrop: hermano del contenedor, debajo del panel */
.imperio-mega-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10062;
    background: rgba(15, 23, 42, 0.18);
    transition: none !important;
    animation: none !important;
}

.imperio-mega-backdrop.is-visible {
    display: block;
    opacity: 1;
}

/* Panel a ancho completo de la ventana */
.site-header .all-categories.imperio-mega-cats .dropdown-categories.imperio-mega-panel {
    position: fixed !important;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    display: none;
    opacity: 1;
    visibility: hidden;
    pointer-events: none !important;
    transition: none !important;
    animation: none !important;
    transform: none !important;
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    z-index: 10065 !important;
    min-width: 100vw !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
}

.site-header .all-categories.imperio-mega-cats .dropdown-categories.imperio-mega-panel.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.imperio-mega-cats .description {
    display: none !important;
}

.imperio-mega-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 380px;
    max-height: min(72vh, 580px);
    box-sizing: border-box;
    padding: 0 24px;
}

.imperio-mega-main {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
}

.imperio-mega-item {
    margin: 0;
}

.imperio-mega-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    color: #1e293b !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
}

.imperio-mega-link i {
    font-size: 0.7rem;
    color: #94a3b8;
}

.imperio-mega-item.is-active .imperio-mega-link,
.imperio-mega-item:hover .imperio-mega-link {
    background: #fff;
    color: #1e88e5 !important;
    border-left-color: #1e88e5;
}

.imperio-mega-subs {
    position: relative;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 0;
}

.imperio-mega-subpanel {
    display: none;
    padding: 16px 18px 20px;
    height: 100%;
    overflow-y: auto;
}

.imperio-mega-subpanel.is-active {
    display: block;
}

.imperio-mega-subpanel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.imperio-mega-subpanel-head strong {
    font-size: 1rem;
    color: #0f172a;
}

.imperio-mega-subpanel-head a {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e88e5;
    text-decoration: none;
}

.imperio-mega-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px 20px;
}

.imperio-mega-sublist a {
    display: block;
    padding: 8px 4px;
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 6px;
}

.imperio-mega-sublist a:hover {
    color: #1e88e5;
    background: #f0f9ff;
}

.imperio-mega-empty {
    color: #64748b;
    font-size: 0.9rem;
    margin: 8px 0 16px;
}

.imperio-mega-cta {
    display: inline-block;
    padding: 10px 14px;
    background: #1e88e5;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.85rem;
}

.imperio-mega-link .klbth-icon-apple-juice,
.menu-list .category-link > i.klbth-icon-apple-juice {
    display: none !important;
}

@media (max-width: 1199px) {
    .imperio-mega-sublist {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .site-header .all-categories.imperio-mega-cats .dropdown-categories.imperio-mega-panel {
        min-width: 100vw !important;
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }

    .imperio-mega-layout {
        grid-template-columns: 1fr;
        max-height: min(75vh, 560px);
        padding: 0 12px;
        max-width: none;
    }

    .imperio-mega-main {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
        max-height: 180px;
    }

    .imperio-mega-sublist {
        grid-template-columns: 1fr;
    }
}

/* === IMPERIO CAT BUTTON UNIFIED (informe) === */
.site-header .all-categories > a,
.site-header .all-categories.imperio-mega-cats > a,
.all-categories > a#categoriesBtn,
.all-categories.locked > a {
    background: #111827 !important;
    color: #fff !important;
    border-radius: 6px;
    transition: background-color .2s ease, color .2s ease;
}
.site-header .all-categories > a:hover,
.site-header .all-categories.imperio-mega-cats > a:hover,
.all-categories > a#categoriesBtn:hover,
.all-categories.locked > a:hover,
.site-header .all-categories > a:focus,
.site-header .all-categories.imperio-mega-cats > a:focus {
    background: #2bbef9 !important;
    color: #fff !important;
}
body.page-nosotros .entry-title,
body.page-eventos .entry-title,
body.page-liquidacion .entry-title,
.imperio-secondary-page h2,
.imperio-secondary-page h3 {
    font-weight: 500 !important;
}

