@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;900&display=swap');

/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
    --navy:  #00304E;
    --gold:  #EBBC7A;
    --white: #FFFFFF;
    --black: #000000;
    --gray:  #f5f5f5;

    --font: 'Montserrat', sans-serif;

    --topbar-height: 34px;
    --navbar-height: 74px;
    --transition: 0.3s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: var(--white);
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Utilidad accesible: visible para lectores de pantalla, oculta visualmente */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
    background-color: var(--navy);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar span {
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar {
    background-color: var(--navy);
    height: var(--navbar-height);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "left logo right";
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Logo centrado */
.navbar-logo {
    grid-area: logo;
    justify-self: center;
}

.navbar-logo img {
    height: 48px;
    width: auto;
}

/* Links compartidos */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Separación entre los links y el logo central */
.navbar-left  {
    grid-area: left;
    justify-content: flex-end;
    padding-right: 48px;
}
.navbar-right {
    grid-area: right;
    justify-content: flex-start;
    padding-left: 48px;
}

/* Hamburger oculto en desktop */
.navbar-toggle {
    display: none;
    grid-area: toggle;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 10;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-links a {
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
    white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* Asegurar subrayado en el link de Carrito (desktop) */
.navbar-links a.nav-carrito {
    display: inline-block;
    border-bottom: 2px solid transparent;
}

.navbar-links a.nav-carrito:hover,
.navbar-links a.nav-carrito.active {
    border-bottom-color: var(--gold);
}

/* Carrito con ícono + texto */
.nav-carrito-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-carrito-inner svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
    transition: stroke var(--transition);
}

.carrito-badge {
    position: absolute;
    top: -10px;
    right: -12px;
    background: var(--gold);
    color: var(--navy);
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── MOBILE MENU ────────────────────────────────────────── */
.navbar-mobile {
    display: none;
    flex-direction: column;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: var(--navbar-height);
    z-index: 999;
}

.navbar-mobile.open { display: flex; }

.navbar-mobile li a {
    display: block;
    color: var(--white);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 15px 24px;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.navbar-mobile li a:hover,
.navbar-mobile li a.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(255,255,255,0.04);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
    background-color: var(--navy);
    color: var(--white);
    padding: 40px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 12px;
}

.footer-logo p {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Mobile: logo izquierda | espacio vacío | hamburger derecha */
    .navbar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "logo . toggle";
        padding: 0 20px;
        gap: 0;
    }

    .navbar-logo {
        justify-self: flex-start;
    }

    .navbar-toggle {
        display: flex;
    }

    /* Ocultar links de escritorio en mobile */
    .navbar-left,
    .navbar-right { display: none; }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

     /* ── agregá esto ── */
    .footer-content {
        align-items: center;
        text-align: center;
    }

    .footer-logo {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .footer-contact li a,
    .footer-contact li span {
        justify-content: center;
    }

    .footer-social a {
        justify-content: center;
    }

}

/* ─── FOOTER CONTACT & SOCIAL ────────────────────────────── */
.footer-contact li a,
.footer-contact li span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;          /* fuerza el mismo tamaño que los links */
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

.footer-contact svg,
.footer-social svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-social a {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── BOTÓN FLOTANTE CARRITO (solo mobile) ───────────────── */
.fab-carrito {
    display: none; /* oculto por defecto en desktop */
}

@media (max-width: 768px) {
    .fab-carrito {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: var(--navy);
        color: var(--gold);
        border-radius: 50%;
        box-shadow: 0 4px 16px rgba(0, 48, 78, 0.35);
        z-index: 9990;
        text-decoration: none;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .fab-carrito:hover,
    .fab-carrito:active {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(0, 48, 78, 0.45);
    }

    .fab-carrito svg {
        width: 24px;
        height: 24px;
        stroke: var(--gold);
        fill: none;
    }

    .fab-carrito__badge {
        position: absolute;
        top: -4px;
        right: -4px;
        background: var(--gold);
        color: var(--navy);
        font-size: 10px;
        font-weight: 800;
        font-family: 'Montserrat', sans-serif;
        min-width: 18px;
        height: 18px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        line-height: 1;
        /* Oculto cuando es 0 */
        opacity: 0;
        transform: scale(0);
        transition: opacity 0.2s, transform 0.2s;
    }

    .fab-carrito__badge.visible {
        opacity: 1;
        transform: scale(1);
    }
}