/**
 * ============================================================
 * MEGA MENÚ DE CATEGORÍAS WOOCOMMERCE - HERCOM
 * Sube este archivo como "lc-mega-menu.css" dentro de tu tema activo
 * ============================================================
 */

/* Sobreescribe el ancho que Elementor pone inline en el contenedor padre */
#e-n-menu-content-1272 {
    width: 100% !important;
}

/* Layout principal: imagen a la izquierda + columnas a la derecha */
.lc-mega-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    flex-wrap: nowrap;
    max-width: 1000px;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: 320px;
}

/* Panel izquierdo con la imagen */
.lc-mega-img-panel {
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: #f5f7fa;
    border-right: 1px solid #e2e2e2;
}

.lc-mega-img {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
}

/* Wrapper de columnas con scroll horizontal */
.lc-mega-cols-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 28px;
    overflow-x: auto;
    flex: 1 1 auto;
    box-sizing: border-box;
}

.lc-mega-col {
    min-width: 200px;
    flex: 0 0 auto;
}

.lc-mega-col + .lc-mega-col {
    border-left: 1px solid #e2e2e2;
    padding-left: 24px;
}

.lc-mega-col-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a3c8c;
    margin-bottom: 14px;
    min-height: 20px;
}

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

.lc-mega-item {
    margin-bottom: 10px;
}

.lc-mega-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lc-mega-item-name {
    font-size: 18px;
    color: #333;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s ease;
}

.lc-mega-item-name:hover {
    color: #1a3c8c;
    text-decoration: underline;
}

.lc-mega-item.is-active > .lc-mega-item-row .lc-mega-item-name {
    color: #1a3c8c;
    font-weight: 600;
    text-decoration: underline;
}

.lc-mega-item-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #999;
    flex-shrink: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

.lc-mega-item-expand:hover {
    color: #1a3c8c;
    transform: translateX(2px);
}

.lc-mega-item.is-active > .lc-mega-item-row .lc-mega-item-expand {
    color: #1a3c8c;
}

/* Móvil: imagen arriba, columnas debajo */
@media (max-width: 768px) {
    .lc-mega-menu {
        flex-direction: column;
        max-width: 100%;
    }

    .lc-mega-img-panel {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #e2e2e2;
        padding: 16px;
    }

    .lc-mega-img {
        max-width: 100px;
    }

    .lc-mega-cols-wrapper {
        padding: 16px;
        gap: 16px;
    }

    .lc-mega-col {
        min-width: 160px;
    }

    .lc-mega-item-name {
        font-size: 15px;
    }

    .lc-mega-col-title {
        font-size: 13px;
    }
}

@media (max-width: 768px) {

    .lc-mega-menu {
        display: block;
        max-width: 100%;
        min-height: auto;
    }

    /* Ocultar imagen en móviles */
    .lc-mega-img-panel {
        display: none;
    }

    /* El menú ocupa todo el ancho */
    .lc-mega-cols-wrapper {
        width: 100%;
        padding: 16px;
        gap: 16px;
        overflow-x: auto;
    }

    .lc-mega-col {
        min-width: 220px;
    }

    .lc-mega-item-name {
        font-size: 15px;
    }

    .lc-mega-col-title {
        font-size: 13px;
    }
}

/* HERCOM - Ajustes responsive del mega menú - 2026-11-13 */
@media (min-width: 769px) {
    .lc-mega-menu {
        max-width: 1400px;
        width: 100%;
        min-height: 360px;
    }

    .lc-mega-cols-wrapper {
        max-height: 70vh;
        overflow-x: auto;
        overflow-y: auto;
    }

    .lc-mega-col {
        min-width: 220px;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .lc-mega-menu {
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 0;
    }

    .lc-mega-img-panel {
        display: none;
    }

    .lc-mega-cols-wrapper {
        display: block;
        width: 100%;
        max-height: 65vh;
        padding: 12px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .lc-mega-col {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-bottom: 16px;
    }

    .lc-mega-col + .lc-mega-col {
        border-left: 0;
        border-top: 1px solid #e2e2e2;
        padding: 16px 0 0;
    }

    .lc-mega-item-row {
        min-height: 42px;
    }

    .lc-mega-item-expand {
        min-width: 36px;
        min-height: 36px;
    }
}

/* HERCOM - Navegación móvil por niveles */
@media (max-width: 768px) {
    .lc-mega-cols-wrapper.lc-mobile-navigation {
        display: block;
        width: 100%;
        padding: 12px 16px;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 70dvh;
    }

    .lc-mobile-level {
        width: 100%;
    }

    .lc-mobile-back {
        display: block;
        width: 100%;
        padding: 12px 4px;
        margin-bottom: 16px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #e5e5e5;
        color: #1a3c8c;
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }

    .lc-mobile-level .lc-mega-col-title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 12px;
    }

    .lc-mobile-level .lc-mega-item {
        margin: 0;
        border-bottom: 1px solid #eeeeee;
    }

    .lc-mobile-level .lc-mega-item-row {
        min-height: 48px;
        gap: 12px;
    }

    .lc-mobile-level .lc-mega-item-name {
        flex: 1;
        font-size: 14px;
        text-decoration: none;
    }

    .lc-mobile-level .lc-mega-item-expand {
        width: 44px;
        height: 44px;
        color: #1a3c8c;
    }
}
