:root {
    --black: #080909;
    --soft: #151718;
    --red: #e30613;
    --white: #fff;
    --paper: #f4f4f2;
    --gray: #a6a7a7;
    --line: #d9d9d5;
}

/* RESET BASICO */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--black);
    line-height: 1.55;
}

img {
    max-width: 100%;
}


/* CONTENEDOR GENERAL */

.wrap {
    width: min(1190px, calc(100% - 48px));
    margin: auto;
}

/* ENLACE "SALTAR CONTENIDO" */

.skip {
    position: absolute;
    left: -10000px;
}

.skip:focus {
    left: 12px;
    top: 12px;
    z-index: 100;
    background: #fff;
    padding: 10px;
}


/* CABECERA*/

header {
    height: 82px;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #000;
}

.top {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* LOGOTIPO */

.brand {
    display: block;
}

.brand img {
    display: block;
    width: 250px;
    height: auto;
}


/* NAVEGACIÓN PRINCIPAL */

nav {
    display: flex;
    align-items: center;
    gap: 27px;
}

nav > a,
.nav-mega-toggle {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: .2px;
}

nav > a {
    position: relative;
    color: var(--white);
    text-decoration: none;
}

nav > a:hover {
    color: var(--red);
}

/* ENLACE ACTIVO (escritorio: blanco + línea roja) */

nav > a.active {
    color: #fff;
}

nav > a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: var(--red);
}

/* BOTON DE CONTACTO */

.contact-link {
    color: #fff !important;
    background: var(--red);
    padding: 11px 17px;
}

.contact-link:hover {
    color: #fff !important;
    background: #ff2631;
}

/* BOTON DE MENU HAMBURGUESA*/

.menu {
    display: none;
    background: none;
    border: 0;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

/*MEGA MENU*/

.nav-mega {
    position: relative;
}


.nav-mega-toggle {
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    color: #fff;
    line-height: 1.55;
    cursor: pointer;
}

.nav-mega-toggle span {
    display: inline-block;
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.25s ease;
}

/* Girar la flecha cuando el menú está abierto */

.nav-mega.open .nav-mega-toggle span {
    transform: rotate(180deg);
}

.nav-mega-toggle:hover {
    color: var(--red);
}

.nav-mega-menu {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    width: 760px;
    background: #000;
    border-top: 3px solid var(--red);
    padding: 28px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .35);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;
    z-index: 200;
}

.mega-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mega-title {
    display: block;
    color: var(--red);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-bottom: 13px;
}

.nav-mega-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: .2px;
    padding: 6px 0;
    transition:
        color .2s ease,
        padding-left .2s ease;
}

.nav-mega-menu a:hover {
    color: var(--red);
    padding-left: 5px;
}

.mega-feature {
    grid-column: 1 / -1;
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 5px;
}

.mega-feature > span {
    color: var(--red);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.mega-feature h3 {
    color: #fff;
    font-size: 22px;
    margin: 7px 0;
}

.mega-feature p {
    color: #aaa;
    font-size: 12px;
    max-width: 420px;
    margin-bottom: 10px;
}

.mega-feature a {
    color: #fff;
    font-size: 12px;
}

.products-mega {
    width: 900px;
    grid-template-columns: repeat(3,1fr) 1.25fr;
}

.products-mega .mega-feature {
    grid-column: 4;
    grid-row: 1;
    border-top: 0;
    border-left: 1px solid #333;
    padding-top: 0;
    padding-left: 25px;
    margin-top: 0;
}

.mega-products-main,
.mega-products-link {
    grid-column: 1 / -1;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: bold;
    text-decoration: none;
    padding: 0 !important;
    margin: -8px 0 0;
}

.mega-products-main:hover,
.mega-products-link:hover {
    color: var(--red) !important;
    padding-left: 0 !important;
}

.mega-products-divider {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    height: 2px;
    background: var(--red);
    margin: -18px 0 -20px;
}

.mega-products-label {
    grid-column: 1 / -1;
    color: var(--red);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin: -30px 0 -8px;
}


/* FOOTER*/

footer {
    background: #000;
    color: #fff;
    padding: 60px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns:
        1.5fr
        1fr
        1fr
        1fr;
    gap: 50px;
}

/* Separación interna de cada columna (antes venía de styles.css) */
.footer-grid > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand img {
    display: block;
    width: 280px;
    height: auto;
    margin-bottom: 18px;
}

.footer-brand p {
    margin: 0;
    color: #ddd;
    font-size: 17px;
    line-height: 1.6;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-column h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.footer-line {
    display: block;
    width: 38px;
    height: 2px;
    background: var(--red);
    margin: 10px 0 17px;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: .2px;
    margin-bottom: 11px;
    transition: color .2s ease;
}

.footer-column a:hover {
    color: var(--red);
}

/* COOKIES */

.footer-column .preferences {
    background: none;
    border: 0;
    padding: 0;
    color: #ddd;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: color .2s ease;
}

.footer-column .preferences:hover {
    color: var(--red);
}

/* REDES SOCIALES */

.social {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #222;
}

.social-follow {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-follow > span {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #444;
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.social-icon:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* COPYRIGHT */

.copyright {
    color: #888;
    font-size: 12px;
}

/* BOTON VOLVER ARRIBA */

.to-top {
    position: fixed;
    right: 22px;
    bottom: 87px;
    width: 40px;
    height: 40px;
    color: #fff;
    background: #171819;
    border: 0;
    display: none;
    cursor: pointer;
    z-index: 50;
}

.to-top.visible {
    display: block;
}

.whatsapp {
    position: fixed;
    right: 22px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: 27px;
    box-shadow: 0 5px 20px #0003;
    z-index: 50;
}


/* ESCRITORIO: efectos del mega menú */

@media (min-width: 901px) {
    .nav-mega:hover .nav-mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }

    .products-mega .mega-column {
        transform: translateY(-30px);
    }
}


/* RESPONSIVE: TABLET Y MOVIL */

@media (max-width: 900px) {
    nav {
        position: absolute;
        display: none;
        top: 81px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 18px 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-bottom: 1px solid #ddd;
    }

    nav.open {
        display: flex;
    }

    /* Todos los enlaces del menú móvil en negro (incluido el activo),
       excepto el botón de contacto, que mantiene su texto blanco */
    header nav > a:not(.contact-link),
    header nav > a.active:not(.contact-link) {
        color: #000 !important;
        padding: 11px 0;
    }

    header nav > a:not(.contact-link):hover,
    header nav > a.active:not(.contact-link):hover {
        color: var(--red) !important;
    }

    /* En móvil no se usa la línea roja del enlace activo */
    nav > a.active::after {
        display: none;
    }

    .menu {
        display: block;
    }

    .nav-mega {
        width: 100%;
    }

    .nav-mega-toggle {
        width: 100%;
        padding: 11px 0;
        text-align: left;
        color: #000;
    }

    .nav-mega-toggle:hover {
        color: var(--red);
    }

    .nav-mega-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        background: #fff;
        border-top: none;
        box-shadow: none;
        padding: 5px 0 10px;
        grid-template-columns: 1fr;
        gap: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .nav-mega.open .nav-mega-menu {
        display: grid;
    }

    .nav-mega-menu a {
        color: #000;
        font-size: 14px;
        padding: 9px 15px;
    }

    .nav-mega-menu a:hover {
        background: #f5f5f5;
        color: var(--red);
        padding-left: 15px;
    }

    .mega-title {
        padding: 8px 15px 4px;
    }

    .mega-feature,
    .products-mega .mega-feature {
        display: none;
    }

    .products-mega .mega-products-divider,
    .products-mega .mega-products-label {
        display: none !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 30px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand img {
        width: 210px;
    }

    .footer-brand p {
        font-size: 16px;
    }

    .social {
        margin-top: 40px;
        align-items: flex-start;
        gap: 25px;
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .wrap {
        width: min(100% - 30px, 1190px);
    }

    header {
        height: 65px;
    }

    .brand img {
        width: 135px;
    }

    nav {
        top: 64px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-brand img {
        width: 200px;
    }

    .footer-column h3 {
        font-size: 17px;
    }

    .social {
        gap: 20px;
    }

    .whatsapp {
        right: 16px;
        bottom: 18px;
    }
}