/* =========================================================
   PALETA
   Azul oscuro: #0d114c
   Azul brillante: #1f2dd6
   Amarillo: #FFC107
========================================================= */

/* =========================================================
   HEADER GENERAL
========================================================= */
.site-header {
    background: linear-gradient(90deg, #0d114c, #111875);
    padding: 10px 0;
    border-bottom: 3px solid #1f2dd6;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 999;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* =========================================================
   LOGO
========================================================= */
.logo-img {
    height: 60px;
    width: auto;
    display: block;
}

/* =========================================================
   NAV DESKTOP
========================================================= */
.nav-wrap {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}

.menu {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #FFC107;
}

/* Línea animada debajo */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: #FFC107;
    transition: 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Botón hamburguesa oculto en desktop */
#menu-toggle {
    display: none;
    color: #FFC107;
    background: transparent;
    border: none;
    font-size: 1.7rem;
    cursor: pointer;
}

/* =========================================================
   BUSCADOR
========================================================= */
.search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px;
    overflow: hidden;
    border: 2px solid #1f2dd6;
    max-width: 260px;
    transition: 0.2s ease;
}

.search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(31,45,214,0.3);
}

.search-form input {
    border: none;
    padding: 6px 12px;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
}

.search-form button {
    background: #FFC107;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
}

.search-form button i {
    color: #0d114c;
}

/* =========================================================
   BOTONES Y ACCIONES
========================================================= */
.actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav {
    background-color: #FFC107;
    color: #0d114c;
    border: 2px solid #FFC107;
    padding: 6px 14px;
    font-weight: bold;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-nav:hover {
    background-color: #ffd966;
    transform: translateY(-2px);
}

.btn-nav-outline {
    background: transparent;
    border: 2px solid #FFC107;
    color: #FFC107;
    padding: 6px 14px;
    font-weight: bold;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-nav-outline:hover {
    background: #FFC107;
    color: #0d114c;
    transform: translateY(-2px);
}

.cart-btn {
    font-size: 1.2rem;
}

/* =========================================================
   EVITAR SCROLL HORIZONTAL
========================================================= */
html, body {
    overflow-x: hidden;
}

/* =========================================================
   RESPONSIVE - MÓVIL
========================================================= */
/* =========================================================
   MEJORA RESPONSIVE MÓVIL
========================================================= */
/* =========================================================
   RESPONSIVE PROFESIONAL MÓVIL
========================================================= */
@media (max-width: 768px) {

    /* Permitir reorganizar elementos */
    .site-header .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }

    /* LOGO */
    .logo {
        order: 1;
        flex: 1;
    }

    /* ACCIONES (carrito + botones login) */
    .actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Solo carrito en la primera fila */
    .cart-btn {
        order: 1;
    }

    /* Botón hamburguesa */
    #menu-toggle {
        display: block;
        order: 3;
        font-size: 1.8rem;
        margin-left: 6px;
    }

    /* Botones ingresar / registrar bajan a nueva fila */
    .btn-nav,
    .btn-nav-outline {
        order: 4;
        flex: 1;
        text-align: center;
    }

    .actions {
        flex-wrap: wrap;
        width: auto;
    }

    /* Buscador ocupa toda la fila debajo */
    .search-form {
        order: 5;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
    }

    /* NAV WRAP ocupa toda la fila */
    .nav-wrap {
        width: 100%;
        order: 6;
    }

    /* Menú desplegable */
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        background: #0d114c;
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }

    .menu.open {
        display: flex;
        animation: fadeMenu 0.25s ease;
    }

    .menu li a {
        display: block;
        padding: 12px;
        background: #1f2dd6;
        border-radius: 8px;
        margin-bottom: 8px;
        font-weight: 600;
        color: white;
    }

    .menu li a:hover {
        background: #FFC107;
        color: #0d114c;
    }

    
/* Ocultar buscador cuando menú esté activo */
.site-header.menu-active .search-form {
    display: none;
}


.menu.open ~ .search-form {
    display: none;
}
}