/* ========================================================================
   ESTILOS CSS - BOMORESA CUSTOM HEADER (V4.7.0 CON BARRA SUPERIOR)
   ======================================================================== */

/* Evitar conflictos globales y aplicar solo cuando el plugin está activo */
.bomoresa-custom-header-active #main-header {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    height: 80px !important; /* Ajustable vía PHP inline style */
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Compensar la barra de administración de WordPress */
.admin-bar.bomoresa-custom-header-active #main-header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar.bomoresa-custom-header-active #main-header {
        top: 46px !important;
    }
}

/* Contenedor principal de alineación */
.bomoresa-custom-header .bomoresa-header-container {
    max-width: var(--bomoresa-header-max-width, 1200px);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: relative;
}

/* --- LOGO --- */
.bomoresa-custom-header .bomoresa-logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.bomoresa-custom-header .bomoresa-logo-container a {
    display: flex;
    align-items: center;
}

.bomoresa-custom-header .bomoresa-logo {
    max-width: var(--bomoresa-logo-max-width-desktop, 250px) !important;
    max-height: var(--bomoresa-logo-max-height-desktop, 52px) !important;
    width: auto !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: block !important;
}

/* Redimensionar logo al hacer scroll en Escritorio */
.bomoresa-custom-header.is-scrolled .bomoresa-logo {
    max-width: var(--bomoresa-logo-max-width-desktop-scrolled, 250px) !important;
    max-height: var(--bomoresa-logo-max-height-desktop-scrolled, 52px) !important;
}

/* --- WRAPPER DESKTOP --- */
.bomoresa-custom-header .bomoresa-desktop-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
}

/* --- BARRA DE BÚSQUEDA --- */
.bomoresa-custom-header .bomoresa-search-container {
    width: var(--bomoresa-search-width-desktop, 320px);
}

.bomoresa-custom-header .bomoresa-search-form {
    display: flex;
    align-items: center;
    background: #FFFFFF !important; /* Fondo blanco */
    border: 1.5px solid rgba(0, 0, 0, 0.12); /* Borde sutil */
    border-radius: var(--bomoresa-search-border-radius, 6px); /* Ajustable por la UI */
    padding: 0 6px 0 12px;
    height: 36px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
}

.bomoresa-custom-header .bomoresa-search-form:hover {
    border-color: rgba(0, 59, 115, 0.25);
}

.bomoresa-custom-header .bomoresa-search-input {
    border: none !important;
    background: transparent !important;
    padding: 6px 8px !important; /* Padding lateral */
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #2E3440 !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: auto !important;
    line-height: normal !important;
}

.bomoresa-custom-header .bomoresa-search-input::-webkit-search-cancel-button,
.bomoresa-custom-header .bomoresa-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.bomoresa-custom-header .bomoresa-search-input::placeholder {
    color: #8A939F;
    opacity: 1;
}

/* Botón de Limpiar búsqueda (X) */
.bomoresa-custom-header .bomoresa-search-clear {
    border: none !important;
    background: transparent !important;
    padding: 6px !important;
    margin: 0 2px 0 0 !important;
    cursor: pointer !important;
    color: #8A939F !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: none; /* Controlado dinámicamente por JS */
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    box-shadow: none !important;
    transition: color 0.2s ease !important;
}

.bomoresa-custom-header .bomoresa-search-clear:hover {
    color: #2E3440 !important;
}

/* Botón Submit Lupa */
.bomoresa-custom-header .bomoresa-search-submit {
    border: none !important;
    background: transparent !important;
    padding: 6px !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #003B73 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.bomoresa-custom-header .bomoresa-search-submit:hover {
    color: #E53935 !important;
    transform: scale(1.1);
}

.bomoresa-custom-header .bomoresa-search-submit svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Enfoque: 2 cajas exactas (caja + anillo navy). Sin el resplandor difuso. */
.bomoresa-custom-header .bomoresa-search-form:focus-within {
    border-color: #003B73 !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 5px #003B73 !important;
}

/* --- MENÚ DE ESCRITORIO --- */
.bomoresa-custom-header .bomoresa-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.bomoresa-custom-header .bomoresa-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--bomoresa-menu-spacing, 24px);
    align-items: center;
    height: 100%;
}

.bomoresa-custom-header .bomoresa-menu > li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.bomoresa-custom-header .bomoresa-menu > li > a {
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    color: #2E3440;
    text-decoration: none;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
}

.bomoresa-custom-header .bomoresa-menu > li > a:hover {
    color: #003B73;
}

/* Soporte para menús multinivel en Escritorio (Ancho Dinámico) */
.bomoresa-custom-header .bomoresa-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFFFFF;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #003B73;
    list-style: none;
    margin: 0;
    padding: 12px 0;
    min-width: 220px;
    width: max-content; /* Ancho dinámico */
    max-width: 320px; /* Límite seguro */
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0 0 4px 4px;
}

/* Alinear el último submenú a la derecha para evitar desbordes */
.bomoresa-custom-header .bomoresa-menu > li:last-child ul {
    left: auto !important;
    right: 0 !important;
}

.bomoresa-custom-header .bomoresa-menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bomoresa-custom-header .bomoresa-menu li ul li {
    width: 100%;
    position: relative;
}

.bomoresa-custom-header .bomoresa-menu li ul li a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4C566A;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
}

.bomoresa-custom-header .bomoresa-menu li ul li a:hover {
    background-color: #F4F6F9;
    color: #003B73;
    padding-left: 24px;
}

/* Indicador de submenú (Flechas más gruesas y centradas) */
.bomoresa-custom-header .bomoresa-menu .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 8px;
    margin-top: -3px;
    flex-shrink: 0;
    vertical-align: middle;
}

.bomoresa-custom-header .bomoresa-menu .menu-item-has-children:hover > a::after {
    transform: rotate(225deg);
}

/* --- MOBILE TRIGGER (HAMBURGER) --- */
.bomoresa-custom-header .bomoresa-mobile-trigger {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    outline: none;
}

.bomoresa-custom-header .bomoresa-hamburger-box {
    width: 24px;
    height: 18px;
    display: block;
    position: relative;
}

.bomoresa-custom-header .bomoresa-hamburger-inner,
.bomoresa-custom-header .bomoresa-hamburger-inner::before,
.bomoresa-custom-header .bomoresa-hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: #003B73;
    position: absolute;
    display: block;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.bomoresa-custom-header .bomoresa-hamburger-inner {
    top: 50%;
    margin-top: -1px;
}

.bomoresa-custom-header .bomoresa-hamburger-inner::before {
    content: "";
    top: -6px;
}

.bomoresa-custom-header .bomoresa-hamburger-inner::after {
    content: "";
    bottom: -6px;
}

/* Estado Activo del Hamburger */
.bomoresa-mobile-menu-open .bomoresa-hamburger-inner {
    background-color: transparent;
}
.bomoresa-mobile-menu-open .bomoresa-hamburger-inner::before {
    transform: translate3d(0, 6px, 0) rotate(45deg);
}
.bomoresa-mobile-menu-open .bomoresa-hamburger-inner::after {
    transform: translate3d(0, -6px, 0) rotate(-45deg);
}

/* --- OVERLAY DE ENFOQUE DE BÚSQUEDA --- */
.bomoresa-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.07) !important; /* Mismo dim que el menu movil, muy sutil */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99997 !important;
}

body.bomoresa-search-focused .bomoresa-search-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.bomoresa-search-focused #main-header {
    z-index: 99999 !important;
}

/* --- COMPORTAMIENTO MÓVIL --- */
.bomoresa-custom-header .bomoresa-mobile-wrapper {
    display: none;
}

@media (max-width: 980px) {
    /* Permitir altura automática sin límites */
    .bomoresa-custom-header-active #main-header {
        height: auto !important;
        padding-bottom: 0 !important;
    }
    
    /* Fila 1: Logo + Hamburger compacta */
    .bomoresa-custom-header .bomoresa-header-container {
        height: 60px;
        padding: 0 16px;
    }
    
    .bomoresa-custom-header .bomoresa-logo {
        max-width: var(--bomoresa-logo-max-width-mobile, 200px) !important;
        max-height: var(--bomoresa-logo-max-height-mobile, 36px) !important;
        transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    /* Redimensionar logo al hacer scroll en Móvil */
    .bomoresa-custom-header.is-scrolled .bomoresa-logo {
        max-width: var(--bomoresa-logo-max-width-mobile-scrolled, 200px) !important;
        max-height: var(--bomoresa-logo-max-height-mobile-scrolled, 36px) !important;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-trigger {
        padding: 6px;
    }
    
    /* Fila 2 & 3: Unidas al flujo */
    .bomoresa-custom-header .bomoresa-mobile-wrapper {
        display: block;
        background-color: #FFFFFF;
        width: 100%;
        margin: 0;
        padding: 0;
        border-top: none !important;
        box-sizing: border-box;
    }
    
    /* Row 2: Search Bar - Sin gaps transparentes */
    .bomoresa-custom-header .bomoresa-mobile-search {
        padding: 4px 16px 10px 16px;
        background-color: #FFFFFF;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important; /* Borde inferior colocado debajo de la barra */
    }
    
    .bomoresa-custom-header .bomoresa-mobile-search .bomoresa-search-form {
        height: 32px;
        border-radius: var(--bomoresa-search-border-radius, 6px);
        width: var(--bomoresa-search-width-mobile, 90%);
        margin: 0 auto;
        padding: 0 6px 0 12px;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-search .bomoresa-search-input {
        padding: 4px 8px !important;
    }
    
    /* Row 3: Mobile Navigation Dropdown */
    .bomoresa-custom-header .bomoresa-mobile-menu-container {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        background-color: #FFFFFF;
    }
    
    .bomoresa-mobile-menu-open .bomoresa-mobile-menu-container {
        max-height: 420px;
        overflow-y: auto;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu {
        list-style: none;
        margin: 0;
        padding: 10px 24px; /* Separación de la izquierda de 24px */
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        position: relative !important;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li:last-child {
        border-bottom: none;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li a {
        display: block;
        padding: 10px 0;
        font-size: 14px;
        font-weight: 700;
        color: #2E3440;
        text-decoration: none;
        transition: color 0.2s ease;
        box-sizing: border-box;
        width: calc(100% - 40px);
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li a:hover {
        color: #003B73;
    }
    
    /* Botón de Despliegue de Acordeón en Móvil */
    .bomoresa-custom-header .bomoresa-mobile-menu .bomoresa-submenu-toggle {
        position: absolute !important;
        right: 0 !important;
        top: 4px !important;
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
        cursor: pointer !important;
        color: #003B73 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        outline: none !important;
        box-shadow: none !important;
        z-index: 5;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu .bomoresa-submenu-toggle svg {
        width: 14px;
        height: 14px;
        transition: transform 0.25s ease !important;
        pointer-events: none;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li.bomoresa-submenu-open > .bomoresa-submenu-toggle svg {
        transform: rotate(180deg) !important;
    }
    
    /* Submenús en Móvil (Acordeón cerrado por defecto) */
    .bomoresa-custom-header .bomoresa-mobile-menu li ul.sub-menu {
        list-style: none;
        padding: 0 0 10px 16px !important;
        margin: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out !important;
        display: block !important;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li.bomoresa-submenu-open > ul.sub-menu {
        max-height: 500px;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li ul.sub-menu li {
        border-bottom: none;
    }
    
    .bomoresa-custom-header .bomoresa-mobile-menu li ul.sub-menu li a {
        padding: 6px 0;
        font-size: 13px;
        font-weight: 600;
        color: #4C566A;
        width: 100%;
    }
}

/* Warnings */
.bomoresa-admin-warning {
    color: #D63638;
    font-weight: bold;
    font-size: 13px;
    margin: 0;
}

/* ========================================================================
   BARRA SUPERIOR SECUNDARIA / ANNOUNCEMENT BAR
   ======================================================================== */
.bomoresa-top-bar {
    width: 100% !important;
    background-color: var(--bomoresa-top-bar-bg-color, #0057A8) !important;
    height: var(--bomoresa-top-bar-height-desktop, 36px) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: height var(--bomoresa-top-bar-collapse-transition, 350ms) ease,
                opacity var(--bomoresa-top-bar-collapse-transition, 350ms) ease,
                visibility var(--bomoresa-top-bar-collapse-transition, 350ms) ease !important;
    z-index: 100000 !important;
    box-sizing: border-box !important;
}

.bomoresa-top-bar__inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.bomoresa-top-bar__item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--bomoresa-top-bar-transition-speed, 450ms) ease,
                transform var(--bomoresa-top-bar-transition-speed, 450ms) ease,
                visibility var(--bomoresa-top-bar-transition-speed, 450ms) ease;
    box-sizing: border-box;
}

.bomoresa-top-bar__item--align-center {
    justify-content: center;
}

.bomoresa-top-bar__item--align-left {
    justify-content: flex-start;
}

.bomoresa-top-bar__item--align-right {
    justify-content: flex-end;
}

.bomoresa-top-bar__content {
    display: inline-flex;
    align-items: center;
    color: var(--bomoresa-top-bar-text-color, #FFFFFF) !important;
    font-size: var(--bomoresa-top-bar-font-size-desktop, 14px) !important;
    font-weight: var(--bomoresa-top-bar-font-weight, 600) !important;
    box-sizing: border-box;
}

.bomoresa-top-bar__content--contained {
    width: 100%;
    max-width: var(--bomoresa-header-max-width, 1200px) !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Ensure alignment overrides within contained layouts */
.bomoresa-top-bar__item--align-center .bomoresa-top-bar__content--contained {
    justify-content: center;
    display: flex;
}
.bomoresa-top-bar__item--align-left .bomoresa-top-bar__content--contained {
    justify-content: flex-start;
    display: flex;
}
.bomoresa-top-bar__item--align-right .bomoresa-top-bar__content--contained {
    justify-content: flex-end;
    display: flex;
}

.bomoresa-top-bar__text {
    line-height: 1.2 !important;
}

.bomoresa-top-bar__icon {
    width: var(--bomoresa-top-bar-svg-size-desktop, 16px) !important;
    height: var(--bomoresa-top-bar-svg-size-desktop, 16px) !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    margin-left: calc(var(--bomoresa-top-bar-svg-gap, 8px) * 0.5);
    margin-right: calc(var(--bomoresa-top-bar-svg-gap, 8px) * 0.5);
}

.bomoresa-top-bar__item--active {
    opacity: 1;
    visibility: visible;
}

/* Hide on desktop */
.bomoresa-top-bar--hide-desktop {
    display: none !important;
}

/* Animation: Fade */
.bomoresa-top-bar--anim-fade .bomoresa-top-bar__item {
    transform: none !important;
}
.bomoresa-top-bar--anim-fade .bomoresa-top-bar__item.bomoresa-top-bar__item--active {
    opacity: 1;
    visibility: visible;
}

/* Animation: Slide Vertical */
.bomoresa-top-bar--anim-slide-vertical .bomoresa-top-bar__item {
    transform: translateY(100%);
}
.bomoresa-top-bar--anim-slide-vertical .bomoresa-top-bar__item.bomoresa-top-bar__item--active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.bomoresa-top-bar--anim-slide-vertical .bomoresa-top-bar__item.bomoresa-top-bar__item--previous {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
}

/* Animation: Slide Horizontal */
.bomoresa-top-bar--anim-slide-horizontal .bomoresa-top-bar__item {
    transform: translateX(100%);
}
.bomoresa-top-bar--anim-slide-horizontal .bomoresa-top-bar__item.bomoresa-top-bar__item--active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.bomoresa-top-bar--anim-slide-horizontal .bomoresa-top-bar__item.bomoresa-top-bar__item--previous {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}
/* --- MARQUEE / AUTOSCROLL MODE --- */
.bomoresa-top-bar--marquee {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.bomoresa-top-bar__track {
    width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
}

.bomoresa-top-bar__track-inner {
    display: flex !important;
    white-space: nowrap !important;
    align-items: center !important;
    will-change: transform !important;
}

/* Direction animations */
.bomoresa-top-bar__track--dir-left .bomoresa-top-bar__track-inner {
    animation: bomoresa-marquee-left var(--bomoresa-top-bar-marquee-speed, 20s) linear infinite !important;
}

.bomoresa-top-bar__track--dir-right .bomoresa-top-bar__track-inner {
    animation: bomoresa-marquee-right var(--bomoresa-top-bar-marquee-speed, 20s) linear infinite !important;
}

/* Pause on Hover */
.bomoresa-top-bar--pause-on-hover:hover .bomoresa-top-bar__track-inner {
    animation-play-state: paused !important;
}

/* Marquee Items */
.bomoresa-top-bar__item--marquee {
    position: relative !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: var(--bomoresa-top-bar-marquee-item-spacing, 50px) !important;
    width: auto !important;
    height: 100% !important;
}

.bomoresa-top-bar__icon--marquee {
    width: var(--bomoresa-top-bar-marquee-svg-size-desktop, 16px) !important;
    height: var(--bomoresa-top-bar-marquee-svg-size-desktop, 16px) !important;
    margin-left: calc(var(--bomoresa-top-bar-marquee-svg-gap, 8px) * 0.5) !important;
    margin-right: calc(var(--bomoresa-top-bar-marquee-svg-gap, 8px) * 0.5) !important;
}

/* Keyframes for seamless loops */
@keyframes bomoresa-marquee-left {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes bomoresa-marquee-right {
    0% {
        transform: translate3d(-50%, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* --- MOBILE STYLING OVERRIDES --- */
@media (max-width: 980px) {
    .bomoresa-top-bar {
        height: var(--bomoresa-top-bar-height-mobile, 32px) !important;
    }
    .bomoresa-top-bar__content {
        font-size: var(--bomoresa-top-bar-font-size-mobile, 12px) !important;
    }
    .bomoresa-top-bar__icon {
        width: var(--bomoresa-top-bar-svg-size-mobile, 14px) !important;
        height: var(--bomoresa-top-bar-svg-size-mobile, 14px) !important;
    }
    .bomoresa-top-bar__icon--marquee {
        width: var(--bomoresa-top-bar-marquee-svg-size-mobile, 14px) !important;
        height: var(--bomoresa-top-bar-marquee-svg-size-mobile, 14px) !important;
    }
    /* Hide on mobile if selected */
    .bomoresa-top-bar--hide-mobile {
        display: none !important;
    }
}

/* ========================================================================
   ITEM FIJO DE LA IZQUIERDA EN LA BARRA SUPERIOR (2026-07-20)
   Queda anclado y NO se mueve; los mensajes rotativos/marquee ocupan el
   espacio restante a la derecha.
   ======================================================================== */
.bomoresa-top-bar--has-left {
    display: flex !important;
    align-items: center !important;
}

.bomoresa-top-bar__layout {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
}

/* Alinea el item con el contenedor del header cuando el modo es max-width */
.bomoresa-top-bar__layout--contained {
    max-width: var(--bomoresa-header-max-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.bomoresa-top-bar__layout:not(.bomoresa-top-bar__layout--contained) .bomoresa-top-bar__left {
    padding-left: 20px;
}

.bomoresa-top-bar__left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 100%;
    padding-right: 32px;
}

.bomoresa-top-bar__left-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bomoresa-top-bar-text-color, #FFFFFF);
    text-decoration: none;
    font-size: var(--bomoresa-top-bar-font-size-desktop, 14px);
    font-weight: var(--bomoresa-top-bar-font-weight, 600);
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
a.bomoresa-top-bar__left-link:hover { opacity: 0.8; }

.bomoresa-top-bar__left .bomoresa-top-bar__icon {
    width: var(--bomoresa-top-bar-svg-size-desktop, 16px) !important;
    height: var(--bomoresa-top-bar-svg-size-desktop, 16px) !important;
    margin: 0 !important;
    flex-shrink: 0;
}

/* El resto de la barra ocupa lo que sobra.
   Va como flex + align-items:center porque el track del marquee mide solo lo
   que ocupa el texto (~17px) y en display:block se pegaba arriba en vez de
   centrarse dentro de la altura de la barra. */
.bomoresa-top-bar__main {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.bomoresa-top-bar__main > * {
    flex: 1 1 auto;
    min-width: 0;
}

/* Dentro del layout el contenido ya no se auto-contiene (evita doble margen) */
.bomoresa-top-bar--has-left .bomoresa-top-bar__content--contained {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Texto largo en escritorio, corto en movil */
.bomoresa-top-bar__left-text--mobile { display: none; }

@media (max-width: 980px) {
    .bomoresa-top-bar__left-text--desktop { display: none; }
    .bomoresa-top-bar__left-text--mobile  { display: inline; }
    .bomoresa-top-bar__left { padding-right: 18px; }
    .bomoresa-top-bar__layout--contained { padding: 0 16px; }
    .bomoresa-top-bar__left-link {
        font-size: var(--bomoresa-top-bar-font-size-mobile, 12px);
    }
    .bomoresa-top-bar__left .bomoresa-top-bar__icon {
        width: var(--bomoresa-top-bar-svg-size-mobile, 14px) !important;
        height: var(--bomoresa-top-bar-svg-size-mobile, 14px) !important;
    }
}

/* ========================================================================
   ITEM FIJO (telefono) AL LADO DERECHO DEL MARQUEE  (2026-07-21)
   Reordena el flex del layout sin tocar el DOM: el marquee queda a la
   izquierda y el item fijo (icono + texto + link) a la derecha, con su
   gap hacia el marquee y su padding de borde a la derecha. Modo full-width.
   Reversible: borrar este bloque restaura el item a la izquierda.
   ======================================================================== */
.bomoresa-top-bar__main { order: 1; padding-left: 20px; }
.bomoresa-top-bar__left { order: 2; padding-right: 20px; }
.bomoresa-top-bar__layout:not(.bomoresa-top-bar__layout--contained) .bomoresa-top-bar__left {
    padding-left: 32px;   /* separacion respecto al marquee */
    padding-right: 20px;  /* margen contra el borde derecho */
}

@media (max-width: 980px) {
    .bomoresa-top-bar__main { padding-left: 14px; }
    .bomoresa-top-bar__layout:not(.bomoresa-top-bar__layout--contained) .bomoresa-top-bar__left {
        padding-left: 18px;
        padding-right: 14px;
    }
}


/* ====================================================================
   MEGA-MENÚ DE CATEGORÍAS — estilos (2026-07-22)
   Se AGREGA al final de assets/header.css del plugin bomoresa-custom-header.
   El ancho/posición (centrado) los fija el JS con inline !important.
   Reversible: borrar este bloque + el bloque de header.js.
   ==================================================================== */

/* --- RESET anti-submenú (SOLO escritorio) --------------------------------
   El plugin trata cualquier <ul>/<li> interno como dropdown (absolute,
   opacity:0, visibility:hidden, sombra, ancho fijo). Se neutraliza con
   especificidad alta (prefijo .bomoresa-custom-header .bomoresa-menu). */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-megamenu ul {
  position: static !important; opacity: 1 !important; visibility: visible !important;
  top: auto !important; left: auto !important; right: auto !important;
  width: auto !important; max-width: none !important; min-width: 0 !important;
  background: none !important; box-shadow: none !important; z-index: auto !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important;
}
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-megamenu li {
  position: static !important; opacity: 1 !important; visibility: visible !important;
  width: auto !important; float: none !important; list-style: none !important; box-shadow: none !important;
  padding: 0 !important; margin: 0 !important;
}
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-megamenu a { visibility: visible !important; opacity: 1 !important; }

/* --- Panel de escritorio: plano (sin sombras), borde sutil, se abre por JS ---
   El contenedor (ul) es transparente y toca la barra; los 12px de separación
   van como PADDING-TOP (parte de la caja) para NO crear zona muerta de hover.
   La caja visible (blanca, borde, radio) es .bm-megamenu. */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop > ul.sub-menu.bm-mm-wrap {
  padding: 0 !important; margin: 0 !important;
  background: transparent !important; border: 0 !important; border-radius: 0 !important;
  overflow: visible !important; box-shadow: none !important;
  transform: none !important; /* sin translateY: la posición (y el gap) la fija el JS de forma determinista */
  pointer-events: none !important; /* CERRADO: no captura el mouse (evita apertura fantasma en el centro) */
}
/* ABIERTO: interactivo. Prefijo largo para GANARLE en especificidad a la regla de "cerrado". */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop.bm-mm-open > ul.sub-menu.bm-mm-wrap {
  opacity: 1 !important; visibility: visible !important; z-index: 100000 !important;
  pointer-events: auto !important;
}

/* --- Backdrop: reutiliza el mismo overlay del buscador (rgba(0,0,0,.07)) --- */
body.bm-mm-active .bomoresa-search-overlay { opacity: 1 !important; pointer-events: auto !important; }

/* --- Submenús NORMALES (Sobre Nosotros, Acceso a Clientes): ya traen ~12px de separación
   nativa (el translateY(12px) permanente del plugin), igual que el mega-menú. No se les
   agrega margen extra (causaba 24px + zona muerta de hover). --- */

/* --- Columnas (compactas + minimal) --- */
.bm-megamenu { padding: 16px 16px; background: #FFFFFF; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; overflow: hidden; }
.bm-mm-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }


/* === BLOQUE DE ACCION (pie de la columna 4) ==========================
   El fondo gris NO es decorativo: separa el bloque de la lista de Marcas.
   Sin el, el boton se lee como un item mas de esa columna. */
/* Misma convencion que los enlaces de la columna: -8px de margen para que el
   borde de la tarjeta alinee con el fondo del hover de los items de arriba.
   Sin esto la tarjeta queda 16px mas angosta y se ve metida hacia adentro. */
.bm-mm-cta { margin: 14px -8px 0; width: calc(100% + 16px); box-sizing: border-box;
  padding: 13px 12px; background: #F6F7F9;
  border: 1px solid #EDF0F3; border-radius: 10px; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-cta .bm-mm-all {
  display: block !important; width: 100% !important; margin: 0 !important;
  padding: 11px 14px !important; text-align: center; font-size: 13.5px; font-weight: 700;
  border-radius: 8px; white-space: nowrap; box-shadow: none !important;
  transition: transform .2s ease, background .2s ease; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-cta .bm-mm-all:hover { background: #00468A !important; transform: translateY(-2px); }
.bm-mm-cta .bm-mm-all span { display: inline-block; transition: transform .2s ease; }
.bm-mm-cta .bm-mm-all:hover span { transform: translateX(4px); }
.bm-mm-cta-t { margin-top: 10px; text-align: center; }
.bm-mm-cta-t b { display: block; font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 12.5px; color: #151920; line-height: 1.35; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-cta-t a {
  display: inline-block !important; width: auto !important; margin: 2px 0 0 !important;
  padding: 0 !important; font-size: 12.5px; color: #0057A8 !important; text-decoration: none; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-cta-t a:hover { text-decoration: underline; }

/* === ESPACIADO DEL PANEL — FUENTE UNICA DE VERDAD (2026-07-28) ==========
   Cabeceras de columna y elementos comparten EXACTAMENTE el mismo padding
   y margen. El padding lateral se compensa con margen negativo: el fondo
   del hover y la linea de la cabecera respiran hacia afuera, pero el TEXTO
   queda al ras del borde de la columna (por eso los numeros alinean).
   >>> Para cambiar el espaciado del submenu, se edita AQUI y en ningun otro
   lado. Antes habia 2 reglas compitiendo por elemento y por eso nunca cuadraba. */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-head,
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a,
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain a {
  padding-left: 8px !important;
  padding-right: 8px !important;
  margin: 0 -8px !important;
  width: calc(100% + 16px) !important;
  box-sizing: border-box !important;
  gap: 14px !important;
}
/* --- VERTICAL: una regla por elemento, cada uno tiene densidad distinta.
   AQUI se ajusta el alto del panel. Lo horizontal va arriba y se comparte. --- */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-head   { padding-top: 9px !important; padding-bottom: 5px !important; margin-bottom: 1px !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a { padding-top: 4px !important; padding-bottom: 4px !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain a{ padding-top: 9px !important; padding-bottom: 9px !important; }
/* === REDISENO 4 COLUMNAS (2026-07-28) ================================== */
.bm-mm-cols--4 { grid-template-columns: 1.15fr 1.15fr .85fr .85fr; gap: 30px; }
.bm-mm-cols--4 > .bm-mm-col + .bm-mm-col { border-left: 1px solid #EEF1F4; padding-left: 30px; }
.bm-megamenu { padding: 18px 20px 16px !important; }
/* cabecera de columna: mas peso y aire */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-head {
  font-size: 15px !important; font-weight: 700 !important; border-bottom: 1px solid #EEF1F4; }
.bm-mm-head--plain { color: #0057A8 !important; cursor: default; }
/* fila: titulo + descriptor en dos lineas */
.bm-mm-name b { display: block; font-weight: 700; font-size: 13.5px; line-height: 1.25; color: #151920; }
.bm-mm-name em { display: block; font-style: normal; font-size: 12px; line-height: 1.3;
  color: #8A939F; margin-top: 2px; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a:hover .bm-mm-name b { color: #0057A8; }
/* Variadores: es otra categoria de nivel superior, no un hijo -> linea que lo separa */
.bm-mm-sep { border-top: 1px solid #EEF1F4; margin-top: 8px; padding-top: 8px; }
/* columnas 3 y 4: enlaces de texto, sin miniatura */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain { list-style: none; margin: 0 !important; padding: 0 !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain li { margin: 0 !important; padding: 0 !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain a {
  display: flex !important; align-items: center; justify-content: space-between;
  border-radius: 6px; font-size: 13px; line-height: 1.3; color: #151920 !important;
  text-decoration: none; transition: background .18s ease, color .18s ease; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain a:hover {
  background: #F6F7F9; color: #0057A8 !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain a::before,
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain a::after { display: none !important; content: none !important; }
.bm-mm-cols--4 .bm-mm-all { margin-top: 18px; }
/* el UL heredaba margen inferior del tema y dejaba aire muerto al pie de cada columna */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list,
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-plain { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.bm-mm-cols--4 > .bm-mm-col > ul:last-child { margin-bottom: 0 !important; }
@media (max-width: 1180px) { .bm-mm-cols--4 { grid-template-columns: 1fr 1fr; gap: 22px; }
  .bm-mm-cols--4 > .bm-mm-col + .bm-mm-col { border-left: 0; padding-left: 0; }
  .bm-mm-cols--4 > .bm-mm-col:nth-child(n+3) { margin-top: 18px; } }
.bm-mm-col { min-width: 0; }
.bm-mm-head {
  display: flex !important; align-items: center;
  font-weight: 600; font-size: 14px; color: #0057A8 !important; text-decoration: none;
  border-bottom: 1px solid #EDF1F5;
}
.bm-mm-head > span:first-child { flex: 1; }
.bm-mm-head:hover > span:first-child { text-decoration: underline; }
.bm-mm-count {
  font-size: 11px; color: #5F5E5A; background: #F1EFE8;
  border-radius: 20px; padding: 2px 8px; white-space: nowrap; line-height: 1.4;
}
.bm-mm-count--top { color: #0057A8; background: #E6F1FB; }
/* Desktop minimal: conteos como número plano tenue (sin pastilla) */
.bm-mm-desktop .bm-mm-count { background: none !important; padding: 0 !important; color: #9AA4AD !important; font-size: 12px; }
.bm-mm-desktop .bm-mm-count--top { color: #0057A8 !important; font-weight: 600; }
/* Alta especificidad para ganarle al padding 12px que el plugin pone en .sub-menu a */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a {
  display: flex !important; align-items: center;
  border-radius: 8px; text-decoration: none;
  color: #151920 !important; font-size: 13px; line-height: 1.25;
}
.bm-mm-list a:hover { background: #F6F7F9; }
.bm-mm-img {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; background: #EDF1F5; display: inline-block;
}
/* Iconos ilustrados: sin fondo. El azulejo gris se creo para uniformar FOTOS
   heterogeneas; las ilustraciones ya son uniformes y el gris les ensucia los
   blancos interiores. La caja de 52px se mantiene, asi que no se pierde alineacion. */
.bm-mm-img--ilu { background: transparent !important; object-fit: contain; }
/* Bloque "por aplicacion" de la 3a columna. Sin miniaturas a proposito: mantiene
   la columna ligera y la distingue de las columnas 1-2, que si llevan icono. */
.bm-mm-apps { margin-top: 18px; }
.bm-mm-apps-h { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #8A939F; margin-bottom: 8px; }
.bm-mm-apps ul { list-style: none; margin: 0; padding: 0; }
.bm-mm-apps li { margin: 0; }
/* Misma especificidad que .bm-mm-list para ganarle al padding:12px del plugin.
   Sin esto los enlaces miden ~57px y la columna crece al doble. */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-apps a {
  display: block !important; padding: 5px 8px !important; margin: 0 !important;
  border-radius: 6px; font-size: 13px; line-height: 1.3;
  color: #151920 !important; text-decoration: none; transition: background .18s ease; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-apps ul { margin: 0 !important; padding: 0 !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-apps li { margin: 0 !important; padding: 0 !important; }
.bm-mm-apps a:hover { background: #F6F7F9; color: #0057A8 !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-apps a::before,
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-apps a::after { display: none !important; content: none !important; }
/* Quita la línea vertical (pseudo ::before de 3px navy) que el plugin pone en los items del submenú */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a::before,
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a::after { display: none !important; content: none !important; }
.bm-mm-ph {
  background: #EDF1F5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239aa4ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center / 24px no-repeat;
  border: 1px dashed #C4CDD5;
}
.bm-mm-name { flex: 1; min-width: 0; }
.bm-mm-direct { display: inline-block; margin-top: 4px; font-size: 13px; color: #0057A8 !important; text-decoration: none; }
.bm-mm-direct:hover { text-decoration: underline; }

/* "Ver todo el catálogo": ahora es un botón dentro de la 3ª columna (no barra) */
.bm-mm-all {
  display: block; text-align: center; margin-top: 14px; padding: 11px 12px;
  background: #0057A8; color: #FFFFFF !important; font-weight: 600; font-size: 13px;
  text-decoration: none; letter-spacing: .2px; border-radius: 8px;
}
.bm-mm-all:hover { background: #00468A; }

/* --- Móvil: acordeón (cada categoría principal se expande sola) --- */
/* ===== MEGA-MENÚ MÓVIL (rediseño 2026-07-29): secciones con iconos, limpio =====
   Prefijos largos + !important para GANARLE a `.bomoresa-mobile-menu li a` del plugin
   (que impone display:block, width:calc(100%-40px), padding:10px 0, 700, #2E3440). */

/* El submenú nativo de "Categorías" aloja el mega: sin indent y sin recorte de alto.
   También le quitamos la GUÍA vertical (border-left) que el custom_css pone a todos los
   submenús móviles: aquí sobra porque el mega ya tiene su caja con esquinas redondeadas.
   El resto de submenús conservan su guía. */
.bomoresa-custom-header .bomoresa-mobile-menu li.menu-item-84 > ul.sub-menu {
  padding: 0 !important; border-left: 0 !important; margin-left: 0 !important;
}
.bomoresa-custom-header .bomoresa-mobile-menu li.menu-item-84.bomoresa-submenu-open > ul.sub-menu { border-left-color: transparent !important; }
.bomoresa-custom-header .bomoresa-mobile-menu li.menu-item-84.bomoresa-submenu-open > ul.sub-menu { max-height: 900px !important; }
/* Más aire para el cajón del menú móvil (antes 420px cortaba demasiado). */
.bomoresa-mobile-menu-open .bomoresa-mobile-menu-container { max-height: 78vh !important; }

/* Panel */
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile { padding: 4px 0 10px; background: #F8FAFC; border-radius: 10px; margin: 2px 0 4px; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile li { border: 0 !important; width: 100% !important; }

/* Encabezado de sección (button) */
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mgroup + .bm-mm-mgroup { border-top: 1px solid rgba(0,0,0,.05); }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mhead {
  display: flex !important; align-items: center; gap: 8px; width: 100% !important;
  background: none !important; border: 0 !important; cursor: pointer; text-align: left;
  font-family: inherit; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  color: #0b2e52 !important; text-decoration: none; padding: 12px 16px !important;
}
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mhead-txt { flex: 1; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mchevron {
  width: 9px; height: 9px; border-right: 2px solid #0057A8; border-bottom: 2px solid #0057A8;
  transform: rotate(45deg); transition: transform .25s cubic-bezier(.16,1,.3,1); margin-right: 3px; flex-shrink: 0;
}
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mgroup.bm-open .bm-mm-mchevron { transform: rotate(-135deg); }

/* Lista colapsable (animada por max-height) */
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mlist { list-style: none; margin: 0 !important; padding: 0 !important; max-height: 0; overflow: hidden; transition: max-height .3s cubic-bezier(.16,1,.3,1); }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mgroup.bm-open > .bm-mm-mlist { max-height: 720px; }

/* Fila con icono */
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile a.bm-mm-mrow {
  display: flex !important; align-items: center; gap: 12px; width: auto !important;
  text-decoration: none; padding: 7px 16px !important; color: #2E3440; font-weight: 400 !important;
}
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile a.bm-mm-mrow:active { background: #EEF3F8; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mimg { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mname { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mname b { font-weight: 600; font-size: 13.5px; color: #1c2530; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mname em { font-style: normal; font-size: 11.5px; color: #8A939F; margin-top: 1px; }
/* Fila sin icono (apps/marcas): viñeta */
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile a.bm-mm-mrow--plain { gap: 11px; padding: 9px 16px 9px 18px !important; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile a.bm-mm-mrow--plain::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #B8CCE4; flex-shrink: 0; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile a.bm-mm-mrow--plain .bm-mm-mname { flex-direction: row; align-items: center; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile a.bm-mm-mrow--plain .bm-mm-mname b { font-weight: 600; font-size: 13.5px; color: #2E3440; }

/* CTA al pie del panel */
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mcta { margin: 12px 16px 4px; padding: 12px 14px; background: #EEF3F9; border: 1px solid #DFE8F2; border-radius: 10px; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mcta a.bm-mm-mall {
  display: block !important; width: auto !important; text-align: center; background: #0057A8; color: #FFFFFF !important;
  font-weight: 700; font-size: 13.5px; padding: 11px !important; border-radius: 8px; text-decoration: none;
}
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mcta a.bm-mm-mall:active { background: #00468A; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mcta a.bm-mm-mphone {
  display: block !important; width: auto !important; text-align: center; margin-top: 10px; padding: 0 !important; text-decoration: none;
}
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mphone span { display: block; font-size: 11.5px; color: #6B7480; font-weight: 400; }
.bomoresa-custom-header .bomoresa-mobile-menu .bm-megamenu--mobile .bm-mm-mphone b { display: block; font-size: 13px; color: #0057A8 !important; margin-top: 2px; }

/* --- Números ocultos en el panel de escritorio (2026-07-28): look más limpio.
   Cubre los grandes (47/26 junto a cada categoría) y los chicos de cada fila.
   Reversible: borrar este bloque. Solo escritorio; el acordeón móvil los conserva. --- */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-count { display: none !important; }
/* ====================================================================
   MEGA-MENÚ v3 (2026-07-28) — menú-driven: columnas IGUALES, SIN líneas,
   filas por tipo (con/sin icono). Va al final para ganar en cascada.
   ==================================================================== */
/* Columnas iguales; el nº lo pone la clase mm-cols-N (JS, desde el menú). */
.bm-mm-cols { gap: 30px !important; }
.bm-mm-cols-1 { grid-template-columns: repeat(1, 1fr) !important; }
.bm-mm-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.bm-mm-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.bm-mm-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.bm-mm-cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
@media (max-width: 1180px) { .bm-mm-cols { grid-template-columns: repeat(2, 1fr) !important; } }
/* Sin líneas: ni borde vertical entre columnas ni línea bajo el encabezado. */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-col + .bm-mm-col { border-left: 0 !important; padding-left: 0 !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-head { border-bottom: 0 !important; }
/* Fila SIN icono (bm-mm-row--plain): más aire vertical y sin hueco de icono. */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a.bm-mm-row--plain {
  padding-top: 8px !important; padding-bottom: 8px !important; gap: 0 !important;
}
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-list a.bm-mm-row--plain .bm-mm-name b {
  font-weight: 600; font-size: 13px;
}
/* SOLO-CLICK: el hover del tema no debe revelar el panel (el JS controla bm-mm-open). */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop:hover > ul.sub-menu.bm-mm-wrap { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop.bm-mm-open > ul.sub-menu.bm-mm-wrap { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; }

/* ===== Ajustes 2026-07-28 (2): chevron, animación, padding, CTA al pie ===== */
/* B) Chevron de "Categorías": NO voltea en hover; solo cuando el panel está abierto. */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop.menu-item-has-children > a::after { transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop.menu-item-has-children:hover > a::after { transform: rotate(45deg); }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop.menu-item-has-children.bm-mm-open > a::after { transform: rotate(225deg); }

/* C) Animación de entrada/salida del panel: fade + slide sutil; a la inversa al cerrar.
   (Supera y reemplaza a las reglas hover-off previas por orden de fuente.) */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop > ul.sub-menu.bm-mm-wrap {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
  transform: translateY(-10px) !important;
  transition: opacity .22s ease, transform .30s cubic-bezier(.16,1,.3,1), visibility 0s .32s !important;
}
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop.bm-mm-open > ul.sub-menu.bm-mm-wrap {
  opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
  transform: translateY(0) !important;
  transition: opacity .22s ease, transform .30s cubic-bezier(.16,1,.3,1), visibility 0s 0s !important;
}

/* D) Emparejar el aire vertical: un poco más de padding abajo del panel. */
.bm-megamenu { padding-bottom: 22px !important; }

/* E) Bloque CTA anclado al PIE de su columna (se lee independiente del resto). */
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-col { display: flex !important; flex-direction: column !important; }
.bomoresa-custom-header .bomoresa-menu li.bm-mm-desktop .bm-mm-cta { margin-top: auto !important; }
