/* ===================== CONTENEDOR PRINCIPAL DEL HEADER ===================== */
.contenedor-header {
    /* width: 100%;
    display: grid;
    grid-template-rows: auto auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: transparent; */

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* ===================== HEADER 1 ===================== */
.header-1 {
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 10px 5px;
}

.header-1 a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.5s ease;
}

.header-1 a svg {
    width: 18px;
    height: 18px;
}

/* Hover header-1 */
.header-1 a:hover {
    color: red;
}

/* ===================== HEADER 2 ===================== */
.header-2 {
    background-color: red;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 10px 20px;
}

.header-2 a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.5s ease;
}

.header-2 a svg {
    width: 18px;
    height: 18px;
}

/* Logo */
.header-2-logo {
    width: 200px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-2-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-2-logo img {
    width: 75%;
    height: auto;
}

/* Botón WhatsApp */
.header-btn-wsp {
    background-color: green;
    border-radius: 20px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}

.header-btn-wsp svg {
    width: 30px !important;
    height: 30px !important;
}

/* ===================== ICONOS ===================== */
.contenedor-header svg {
    fill: currentColor;
}

/* ===================== MEGA MENÚ ===================== */
.menu-item {
    position: relative;
}

.has-mega-menu>a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.mega-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    display: flex;
    gap: 40px;
    background: white;
    padding: 25px 35px;
    border-top: 3px solid #e60000;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(10px);
    transform-origin: top center;
    transition: all 0.35s ease;
    z-index: 1000;
}

.menu-item:hover>.mega-menu {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.mega-menu .menu-column {
    display: flex;
    flex-direction: column;
    min-width: 155px;
}

.mega-menu h3 {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
    border-bottom: 2px solid #e60000;
    padding-bottom: 5px;
}

.mega-menu a {
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.mega-menu a:hover {
    color: #e60000;
}

/* Posición personalizada de mega-menús */
.mega-inicio {
    left: -150px;
}

.mega-articulos {
    left: -250px;
}

.mega-servicios {
    left: -350px;
}

/* ===================== BODY ===================== */
body {
    padding-top: 0;
}

/* ===================== MENU HAMBURGUESA ===================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
}

/* ===================== NAV MENU ===================== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ÍCONO WHATSAPP SOLO EN MÓVIL */
.header-wsp-icon {
    display: none;
    /* oculto por defecto */
}

/* ===================== RESPONSIVE ===================== */
@media screen and (max-width: 991px) {
    .menu-toggle {
        display: flex;
        width: 30px;
        height: 20px;
    }

    .menu-toggle span {
        height: 2px;
    }

    .nav-menu {
        /* position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: blue;
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        z-index: 9999; */


        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: red;
        display: none;
        /* oculto por defecto */
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 5px;
        z-index: 999;
    }

    .nav-menu.active {
        /* max-height: 1000px; */
        display: flex;
        /* se muestra al hacer clic en hamburguesa */
    }

    .nav-menu .menu-item>a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .mega-menu {
        position: relative;
        top: 0;
        left: 0;
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
        border: none;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: none;
        transform: none;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .menu-item.active .mega-menu {
        max-height: 1000px;
    }

    .mega-menu .menu-column {
        min-width: 100%;
    }

    .mega-menu h3 {
        border-bottom: none;
        margin-bottom: 5px;
    }

    .header-btn-wsp {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 15px;
    }

    .header-btn-wsp svg {
        width: 30px !important;
        height: 30px !important;
    }

    .header-2-logo {
        margin-bottom: 0;
        width: 100px;
        height: 50px;
        /* background-color: #fff; */
    }

    .header-2-logo img {
        width: 100%;
    }

    .header-2 {
        flex-direction: row;
        /* ← evita que se apile */
        align-items: center;
        justify-content: left;
        /* ← logo izq, menú der */
        padding: 10px 12px;
        gap: 10px;
        /* ← elimina espacios extras */
    }

    .header-wsp-icon {
        display: block;
        /* visible solo en móviles */
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .header-wsp-icon a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background-color: green;
        border-radius: 50%;
        text-decoration: none;
    }

    .header-wsp-icon svg {
        width: 22px;
        height: 22px;
        fill: white;
    }

}

/* ===================== TABLET MEDIA (768px - 991px) ===================== */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .nav-menu {
        padding: 10px 15px;
    }
}

/* ===================== DESKTOP ===================== */
@media screen and (min-width: 992px) {
    .header-2 .nav-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 60px;
    }

    .header-2 .menu-item>a {
        position: relative;
        padding: 12px 10px;
        transition: color 0.3s ease;
    }

    .header-2 .menu-item>a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0%;
        height: 3px;
        background-color: #e60000;
        transition: width 0.3s ease;
    }

    .header-2 .menu-item>a:hover::after {
        width: 100%;
    }

    /* Hover animado mega-menu */
    .mega-menu a {
        position: relative;
        padding-bottom: 3px;
        transition: color 0.3s ease;
    }

    .mega-menu a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0%;
        height: 2px;
        background-color: #e60000;
        transition: width 0.3s ease;
    }

    .mega-menu a:hover::after {
        width: 100%;
    }

    .mega-menu a:hover {
        color: #e60000;
    }
}