/* ================================================================
   1. ESTRUCTURA GLOBAL (Ancho Completo Kriss France)
   ================================================================ */
#mpm_topmenu, .mpm_topmenu_wrapper, #_desktop_top_menu {
    display: none !important;
}

.eco-menu-wrapper {
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    background: #1a1a1a !important; 
    z-index: 999;
    border-bottom: 2px solid #c5a059;
}

.eco-menu-wrapper .container {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ================================================================
   2. ESCRITORIO (992px en adelante)
   ================================================================ */
@media (min-width: 992px) {
    .eco-mobile-toggle { display: none !important; }

    .eco-nav-ul {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center;
        list-style: none !important;
        margin: 0;
        padding: 0 !important; /* Eliminado padding para evitar saltos */
        width: 100%;
    }

    .eco-item {
        position: relative;
        /* Padding inferior para que el ratón nunca deje de tocar el elemento padre */
        padding-bottom: 10px; 
        margin-bottom: -10px;
    }

    .eco-link-main {
        color: #c5a059 !important;
        text-transform: uppercase;
        font-weight: 700;
        padding: 25px 40px !important; 
        font-size: 16px;
        letter-spacing: 1px;
        text-decoration: none !important;
        display: block;
        transition: all 0.3s ease;
    }

    .eco-link-main:hover {
        background: rgba(197, 160, 89, 0.1);
        color: #fff !important;
    }

    /* SUBMENÚ DESPLEGABLE: SOLUCIÓN DE CIERRE POR HOVER */
    .eco-content-dropdown {
        position: absolute !important;
        /* Ajustado para que el submenú empiece exactamente donde termina el área del enlace */
        /*top: 100%;*/
        left: 200% !important;
        transform: translateX(-50%) !important;
        width: 1620px !important;
        background: rgba(17, 17, 17, 0.98) !important;
        display: none;
        padding: 50px 0 !important;
        box-shadow: 0 25px 50px rgba(0,0,0,0.9);
        border-top: 1px solid #c5a059;
        z-index: 99999;
        border-radius: 0 0 15px 15px; /* Redondeado solo abajo para que arriba encaje */
    }

    .eco-item:hover .eco-content-dropdown {
        display: block !important;
    }

    /* FILA INTERNA: Distribución optimizada */
    .eco-blocks-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-evenly !important; 
        align-items: flex-start !important;
        max-width: 1600px; 
        margin: 0 auto !important; 
        padding: 0 50px !important;
    }

    .eco-block-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; 
        text-align: center;
        flex: 1;
    }

    /* BOTÓN TITULAR CON EFECTO OLA */
    .eco-sub-button {
        background: #c5a059 !important;
        color: #000 !important;
        padding: 12px 30px !important;
        border-radius: 5px;
        font-weight: 800;
        text-transform: uppercase;
        margin-bottom: 25px;
        text-decoration: none !important;
        position: relative;
        overflow: hidden;
        z-index: 1;
        display: inline-block;
        min-width: 250px;
    }

    .eco-sub-button::after {
        content: "";
        position: absolute;
        width: 200%;
        height: 100%;
        background: url('../img/wave.svg');
        background-size: 50% 100%;
        top: 70%;
        left: 0;
        opacity: 0.3;
        animation: ecoWave 3s linear infinite;
        z-index: -1;
    }

    @keyframes ecoWave {
        from { transform: translateX(0); }
        to { transform: translateX(-50%); }
    }

    /* CARRUSEL OPTIMIZADO */
    .eco-images-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important; 
        align-items: center !important;
        gap: 20px;
        width: 100%;
        max-width: 500px; 
        overflow-x: auto;
        padding: 20px 0 !important;
        scrollbar-width: none;
        scroll-behavior: smooth;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }

    .eco-images-container::-webkit-scrollbar { display: none; }

    .eco-menu-prod-img {
        width: 140px !important;
        height: 140px !important;
        object-fit: contain;
        background: #fff;
        border-radius: 8px;
        transition: all 0.6s ease-in-out !important;
        flex: 0 0 auto !important;
        cursor: pointer;
        opacity: 0.5;
        filter: blur(0.5px) grayscale(30%);
        transform: scale(0.9);
    }

    .eco-menu-prod-img.focused {
        opacity: 1 !important;
        filter: blur(0px) grayscale(0%);
        transform: scale(1.15);
        border: 1px solid #c5a059;
        box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
        z-index: 2;
    }
}

/* ================================================================
   3. MÓVIL (Breakpoint 991px o menos)
   ================================================================ */
@media (max-width: 991px) {
    .eco-menu-wrapper {
        width: 100% !important;
        left: 0 !important;
        margin: 0 !important;
        background: #1a1a1a !important;
        border-bottom: 2px solid #c5a059;
    }

    .eco-nav-container {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 60px;
        padding: 0 20px;
    }

    .eco-mobile-toggle {
        display: flex !important;
        color: #c5a059;
        cursor: pointer;
        font-weight: 700;
        text-transform: uppercase;
        align-items: center;
        gap: 10px;
    }

    .eco-nav-ul { 
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111;
        flex-direction: column;
        z-index: 10000;
        max-height: 80vh;
        overflow-y: auto;
        padding: 10px 0;
    }

    .eco-nav-ul.is-active { 
        display: flex !important; 
    }  

    .eco-link-main {
        padding: 15px 20px !important;
        color: #c5a059 !important;
        border-bottom: 1px solid #222;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .eco-content-dropdown {
        display: none;
        background: #000;
        padding: 20px 10px !important;
    }

    .eco-item.active .eco-content-dropdown {
        display: block !important;
    }

    .eco-blocs-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px;
    }

    .eco-block-column {
        align-items: center !important;
        border-bottom: 1px solid #333;
        padding-bottom: 20px;
    }

    .eco-sub-button {
        width: auto;
        margin-bottom: 15px !important;
    }

    .eco-images-container {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        width: 100%;
        padding: 10px 0;
        justify-content: flex-start !important;
        scroll-behavior: smooth;
    }

    .eco-menu-prod-img {
        width: 100px !important;
        height: 100px !important;
        flex: 0 0 auto !important;
        cursor: pointer;
    }
}