/** * B2C Mega Menu - Estilos con valores default como fallback * Elementor puede sobrescribir estos valores *  * @package B2C */

/* ========================================   CONTENEDOR PRINCIPAL======================================== */
.elementor-widget-b2c_mega_menu,
.elementor-widget-b2c_mega_menu > .elementor-widget-container {
    height: 100%;
}

.wmm-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.wmm-navigation {
    display: flex;
    width: 100%;
    align-items: stretch;
    height: 100%;
}

/* ========================================   NIVEL 1 - PANEL FIJO======================================== */
.wmm-panel-level-1 {
    width: 300px; /* Default: puede ser sobrescrito por Elementor */
    padding: 30px;
    flex-shrink: 0;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

.wmm-panel-level-1 .wmm-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wmm-panel-level-1 .wmm-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    gap:20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wmm-panel-level-1 .wmm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #333333; /* Default: puede ser sobrescrito por Elementor */
    font: inherit;
    font-weight: 600;
    line-height: 1.3em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wmm-panel-level-1 .wmm-item:hover {

}

.wmm-panel-level-1 .wmm-menu-item.active .wmm-item {
    color: var( --e-global-color-secondary );
}

.wmm-panel-level-1 .wmm-item__icon {
    display: flex;
    align-items: center;
    margin-left: 10px;
    transition: color 0.2s ease, fill 0.2s ease;
    color:#8c8c8c;
    font-size: 0.75em;
}

.wmm-panel-level-1 .wmm-item__icon svg,
.wmm-panel-level-1 .wmm-item__icon i {
    width: 0.75em;
    height: 0.75em;
}

/* Ícono BLANCO cuando nivel 1 está activo */
.wmm-panel-level-1 .wmm-menu-item.active .wmm-item__icon {
    color: var( --e-global-color-secondary );
    fill: var( --e-global-color-secondary );
}

.wmm-panel-level-1 .wmm-menu-item.active .wmm-item__icon svg,
.wmm-panel-level-1 .wmm-menu-item.active .wmm-item__icon i {
    color: var( --e-global-color-secondary );
    fill: var( --e-global-color-secondary );
}

/* ========================================   NIVEL 2+ - PANEL DESLIZANTE======================================== */
.wmm-panel-level-2 {
    flex: 1;
    padding: 30px 20px;
}

.wmm-panel-level-2 .wmm-nav {
    display: none;
}

.wmm-panel-level-2 .wmm-nav.active {
    display: block;
}

.wmm-panel-level-2 .wmm-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ========================================   ITEMS NIVEL 2+======================================== */
.wmm-panel-level-2 .wmm-menu-item .wmm-item {
    font-weight: 500;
}

.wmm-panel-level-2 .wmm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    text-decoration: none;
    color: #333333; /* Default: puede ser sobrescrito por Elementor */
    font: inherit;
    line-height: 1.3em;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wmm-panel-level-2 .wmm-item:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

.wmm-panel-level-2 .wmm-item__icon {
    display: flex;
    align-items: center;
    margin-left: 10px;
    transition: transform 0.3s ease, color 0.2s ease;
}

/* ========================================   VER TODO======================================== */
.wmm-panel-level-2 .wmm-view-all .wmm-item {
    color: var( --e-global-color-secondary ); /* Default: puede ser sobrescrito por Elementor */
    font-weight: bold;
}

/* ========================================   SUBMENÚS======================================== */
.wmm-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.wmm-menu-item-has-children.active > .wmm-submenu {
    max-height: 2000px;
    opacity: 1;
}

.wmm-submenu .wmm-item {
    padding: 8px 15px;
    padding-left: 30px;
    font: inherit;
    font-weight: normal;
    line-height: 1.3em;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.wmm-submenu .wmm-item:hover {
    background: #f8f9fa;
    padding-left: 35px;
}

.wmm-submenu .wmm-item__icon {
    display: flex;
    align-items: center;
    margin-left: 10px;
    transition: transform 0.3s ease, color 0.2s ease;
}

.wmm-submenu .wmm-submenu {
    padding-left: 15px;
}

.wmm-submenu .wmm-submenu .wmm-item {
    padding-left: 45px;
}

.wmm-submenu .wmm-submenu .wmm-item:hover {
    background: #f8f9fa;
    padding-left: 50px;
}

/* ========================================   ESTADOS ACTIVOS - DROPDOWNS======================================== */
.wmm-menu-item-has-children.active > .wmm-item {
    background-color: #F8F9FA; /* Default: puede ser sobrescrito por Elementor */
}

.wmm-menu-item-has-children.active > .wmm-item .wmm-item__icon {
    transform: rotate(180deg);
}

/* ========================================   ICONOS DE ELEMENTOR======================================== */
.wmm-item__icon svg,
.wmm-item__icon i {
    display: inline-block;
    width: 1em;
    height: 1em;
}

/* ========================================   RESPONSIVE======================================== */
@media (max-width: 768px) {
    .wmm-container {
        flex-direction: column;
    }
    
    .wmm-panel-level-1 {
        width: 100%;
        padding: 20px;
    }
    
    .wmm-panel-level-2 {
        padding: 20px;
    }
}

/* ========================================   UTILIDADES======================================== */
.wmm-item {
    user-select: none;
}
