/* -----------------------------------------------------------------------------------
   NAVBAR TRANSPARENTE + BLUR ELEGANTE
----------------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    height: var(--navbar-height);
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
}

/* Blur sutil */
.header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

/* Contenedor principal */
.header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Logo */
.logo-img { 
    height: 65px;
    transition: opacity 0.3s ease;
}
.logo-img:hover { opacity: 0.85; }

/* -----------------------------------------------------------------------------------
   MENÚ DESKTOP
----------------------------------------------------------------------------------- */
.navbar ul {
    display: flex;
    gap: 60px;
    align-items: center;
}

.navbar a {
    color: white;
    font-family: var(--fuente-principal);
    font-weight: 400;
    font-size: 15.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    transition: all 0.35s ease;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -8px;
    left: 50%;
    background: var(--rosa-ruts);
    transition: width 0.4s ease;
    transform: translateX(-50%);
}

.navbar a:hover {
    opacity: 1;
    color: var(--rosa-ruts);
}

.navbar a:hover::after {
    width: 100%;
}

/* Navbar sólida al scrollear */
.header.scrolled {
    background: rgba(0, 0, 0, 0.92);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

/* -----------------------------------------------------------------------------------
   CARRITO
----------------------------------------------------------------------------------- */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-link {
    color: white;
    position: relative;
    transition: color 0.3s ease;
}

.cart-link:hover {
    color: var(--rosa-ruts);
}

.cart-link svg {
    stroke: currentColor;
    transition: stroke 0.3s;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--rosa-ruts);
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border: 2px solid #000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,20,147,0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255,20,147,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,20,147,0); }
}

/* -----------------------------------------------------------------------------------
   HAMBURGER (BOTÓN)
----------------------------------------------------------------------------------- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(135deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-135deg);
}

/* -----------------------------------------------------------------------------------
   MENÚ MOBILE — OVERLAY COMPLETO
----------------------------------------------------------------------------------- */
.nav-menu {
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

@media (max-width: 768px) {

    /* Mostrar hamburger */
    .hamburger {
        display: flex;
    }

    /* HEADER MOBILE – LOGO IZQUIERDA – ICONOS DERECHA */
    .header .container {
        display: flex;
        justify-content: space-between; /* Logo a la izquierda */
        align-items: center;
        padding: 0 20px;
        position: relative;
    }

    /* LOGO SVG A LA IZQUIERDA */
    .logo {
        position: relative;
        left: 0;
        transform: none;
        margin-right: auto;
    }

    /* CARRITO + HAMBURGER DERECHA */
    .cart-icon {
        margin-right: 10px;
        display: flex;
        align-items: center;
    }

    .hamburger {
        margin-left: 10px;
    }

    /* MENÚ MOBILE OVERLAY */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
        z-index: 1000;
    }

    .navbar.active {
        transform: translateX(0);
    }

    .nav-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        gap: 50px;
    }

    .nav-menu a {
        font-size: 32px;
        font-weight: 600;
        letter-spacing: 4px;
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s forwards;
    }

    .navbar.active .nav-menu a {
        animation-delay: calc(0.1s * var(--i));
    }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Fondo cuando abre menú */
    .header.menu-open,
    .header.scrolled {
        background: rgba(0, 0, 0, 0.95) !important;
        padding: 15px 0;
    }
}

/* Delays de animación */
.nav-menu li:nth-child(1) a { --i: 1; }
.nav-menu li:nth-child(2) a { --i: 2; }
.nav-menu li:nth-child(3) a { --i: 3; }
.nav-menu li:nth-child(4) a { --i: 4; }
.nav-menu li:nth-child(5) a { --i: 5; }

/* CENTRA EL TEXTO DENTRO DE LA NAVBAR */
.navbar {
    flex: 1;
    display: flex;
    justify-content: center !important;
}

.nav-menu {
    display: flex;
    gap: 45px; /* ajustá según estética */
    justify-content: center !important;
    text-align: center; /* fuerza alineación en textos largos */
}

.nav-menu li {
    display: flex;
    justify-content: center;
    text-align: center;
}
