/*
 * Cabecera, footer y botón "volver arriba" compartidos entre la SPA (spa/index.html)
 * y las páginas de client (productos, producto-detalle).
 * No define colores de body para no pisar los estilos propios de cada página.
 */

:root {
    --black: #0a0a0a;
    --red: #c8102e;
    --red-dark: #920b21;
    --white: #ffffff;
    --gray-text: #c7c7c7;
    --line-dark: rgba(255, 255, 255, 0.08);
    --font: 'Montserrat', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    padding-top: 82px;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header */

.header {
    background: var(--black);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font);
}

.header__bar {
    max-width: 1360px;
    height: 82px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 48px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 30px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-right: auto;
}

.nav__link {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__link:hover {
    color: var(--red);
}

.nav__link.is-active {
    color: var(--red);
    border-bottom-color: var(--red);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

/* Footer */

.footer {
    position: relative;
    background: var(--black);
    color: var(--gray-text);
    padding: 72px 0 0;
    overflow: hidden;
    font-family: var(--font);
}

.footer__watermark {
    position: absolute;
    top: 0;
    right: 4%;
    height: 100%;
    width: auto;
    opacity: 0.05;
    pointer-events: none;
    user-select: none;
}

.footer__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.4fr;
    gap: 40px;
    padding-bottom: 56px;
}

.footer__brand {
    position: relative;
    padding-right: 40px;
}

.footer__brand::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
}

.footer__logo {
    height: 26px;
    width: auto;
    display: block;
    margin: 0 0 14px 0;
}

.footer__tagline {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    max-width: 280px;
}

.footer__social {
    display: flex;
    gap: 12px;
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sin esto, el display:flex de arriba le gana a la regla [hidden] del navegador. */
.footer__social a[hidden] {
    display: none;
}

.footer__social img {
    width: 38px;
    height: 38px;
    display: block;
}

.footer__col h4 {
    color: var(--white);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 18px 0;
}

.footer__col a,
.footer__col p {
    display: block;
    font-size: 14px;
    line-height: 2;
    color: var(--gray-text);
    text-decoration: none;
    margin: 0;
}

.footer__copy {
    margin: 24px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.footer__col .footer__contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer__contact-row img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

/* Scroll to top */

.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    z-index: 45;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s ease;
}

.scroll-top svg {
    width: 20px;
    height: 20px;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--red-dark);
}

/* Responsive */

@media (max-width: 960px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer__brand {
        grid-column: 1 / -1;
        padding-right: 0;
        padding-bottom: 32px;
    }

    .footer__brand::after {
        top: auto;
        bottom: 0;
        left: 0;
        right: auto;
        width: 100%;
        height: 1px;
    }
}

@media (max-width: 720px) {
    body {
        padding-top: 68px;
    }

    .header__bar {
        height: 68px;
        padding: 0 20px;
    }

    .nav-toggle {
        display: flex;
        /* El .nav queda fuera de flujo (absolute), así que el botón se empuja solo. */
        margin-left: auto;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--black);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 8px 20px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        display: none;
    }

    .nav.is-open {
        display: flex;
    }

    .nav__link {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__brand {
        grid-column: auto;
    }
}
