@import url('menu-tienda.css');

/* Nivel 2: MODULO-M4 (SUBMENÚ) */
.modulo-m4 {
    width: 100%;
    height: 40px;
    background-color: #002db3; /* Un azul más oscuro */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 25px 25px;
}

.bloque-m41 {
    width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 0 20px;
}

.contenido-m411, .contenido-m412 {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.contenido-m411:hover, .contenido-m412:hover {
    opacity: 0.8;
}

.texto-m4112 {
    font-weight: 700;
}

/* MQ1: Desktop Large */
@media (min-width: 1367px) {
    .menu { height: 140px; }
    .modulo-m1 { height: 100px; }
    .modulo-m4 { border-radius: 0 0 25px 25px; }
}

/* MQ2: Desktop Medium */
@media (min-width: 1281px) and (max-width: 1366px) {
    .menu { height: 130px; }
    .modulo-m1 { height: 90px; }
    .bloque-m41 { width: 1100px; font-size: 12px; }
    .modulo-m4 { border-radius: 0 0 25px 25px; }
}

/* MQ3: Laptop */
@media (min-width: 1025px) and (max-width: 1280px) {
    .menu { height: 120px; }
    .modulo-m1 { height: 80px; }
    .bloque-m41 { width: 900px; font-size: 11px; }
    .modulo-m4 { border-radius: 0 0 25px 25px; }
}

/* MQ4: Tablet Landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .menu { height: 130px; }
    .modulo-m1 { height: 90px; width: 90%; }
    .bloque-m41 { width: 90%; font-size: 11px; overflow-x: auto; white-space: nowrap; }
    .bloque-m41::-webkit-scrollbar { display: none; }
    .modulo-m4 { border-radius: 0 0 25px 25px; }
}

/* MQ5: Tablet Portrait / Mobile Large */
@media (min-width: 481px) and (max-width: 767px) {
    .menu { height: 120px; border-radius: 0 0 20px 20px;}
    .modulo-m2 { height: 80px; width: 90%; }
    .modulo-m4 { border-radius: 0 0 20px 20px; height: 40px; }
    .bloque-m41 { width: 90%; font-size: 11px; overflow-x: auto; white-space: nowrap; gap: 15px; padding: 0;}
    .bloque-m41::-webkit-scrollbar { display: none; }
}

/* MQ6: Mobile Small */
@media (min-width: 320px) and (max-width: 480px) {
    .menu { height: 110px; border-radius: 0 0 15px 15px;}
    .modulo-m2 { height: 70px; width: 90%; }
    .modulo-m4 { border-radius: 0 0 15px 15px; height: 40px; }
    .bloque-m41 { width: 90%; font-size: 10px; overflow-x: auto; white-space: nowrap; gap: 12px; padding: 0;}
    .bloque-m41::-webkit-scrollbar { display: none; }
}

/* =========================================================
   MODULO M5: OFF-CANVAS TODAS LAS CATEGORÍAS
   ========================================================= */

.modulo-m5 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    pointer-events: none; /* Deja pasar clicks cuando está oculto */
}

/* Overlay Oscuro */
.bloque-m51 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Panel Blanco Lateral */
.bloque-m52 {
    position: absolute;
    top: 0;
    left: 0;
    width: 340px; /* Ancho del menú desplegable */
    max-width: 85vw; /* Para móviles muy pequeños */
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

/* Activación del Modal */
.modulo-m5.activo {
    pointer-events: auto;
}

.modulo-m5.activo .bloque-m51 {
    opacity: 1;
}

.modulo-m5.activo .bloque-m52 {
    transform: translateX(0);
}

/* Cabecera del Panel */
.contenido-m521 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 2px solid #213242; /* Estilo similar a la captura */
}

.texto-m5211 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #213242;
    margin: 0;
}

.boton-m5212 {
    background: none;
    border: none;
    font-size: 20px;
    color: #777777;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding: 5px;
    transition: color 0.2s;
}

.boton-m5212:hover {
    color: #ff3b30;
}

/* Lista de Categorías */
.contenido-m522 {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.contenido-m522::-webkit-scrollbar {
    width: 6px;
}

.contenido-m522::-webkit-scrollbar-track {
    background: #f1f1f1; 
}

.contenido-m522::-webkit-scrollbar-thumb {
    background: #cccccc; 
    border-radius: 10px;
}

.item-m5221 {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: #555555;
    border-bottom: 1px solid #eeeeee;
    transition: background-color 0.2s, color 0.2s;
}

.item-m5221:hover {
    background-color: #f9f9f9;
    color: #003cff;
}

.icono-m52211 {
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777777;
    transition: color 0.2s;
}

.item-m5221:hover .icono-m52211 {
    color: #003cff;
}

.texto-m52212 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 400;
    flex: 1;
}

.flecha-m52213 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: #bbbbbb;
    font-weight: 300;
}