/* =====================================================
   GLASS NAVIGATION - E-COMMERCE PREMIUM
   Navegación flotante con glassmorphism
   ===================================================== */

/* ===== VARIABLES CSS ===== */
:root {
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-blur: 12px;
    --nav-radius: 60px;
    --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 12px rgba(0, 0, 0, 0.04);
    --nav-hover-shadow: 0 12px 48px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06);
    --accent-color: #b8a4d4;
    --text-color: #1a1a1a;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLASS NAVIGATION ===== */
.glass-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 600px;
    animation: slideDown 0.8s ease-out;
}

.glass-nav-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--nav-radius);
    padding: 1.2rem 2rem;
    box-shadow: var(--nav-shadow);
    transition: all var(--transition);
    position: relative;
    overflow: visible;
}

.glass-nav-container:hover {
    box-shadow: var(--nav-hover-shadow);
    background: rgba(255, 255, 255, 0.85);
}

/* Gradiente sutil en el lado derecho */
.glass-nav-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(184, 164, 212, 0.08) 100%);
    pointer-events: none;
}

.glass-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ===== LOGO CENTRAL ===== */
.nav-logo-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-logo:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

/* ===== BOTÓN MENÚ (izquierda) ===== */
.nav-menu-wrapper {
    position: relative;
}

.nav-menu-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    background: rgba(184, 164, 212, 0.1);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.5px;
}

.nav-menu-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 164, 212, 0.3);
}

/* Menú desplegable */
.nav-menu-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 0.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
}

.nav-menu-wrapper:hover .nav-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-dropdown a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.nav-menu-dropdown a:hover {
    background: rgba(184, 164, 212, 0.15);
    color: var(--accent-color);
    transform: translateX(5px);
}

.nav-menu-dropdown a.active {
    background: rgba(184, 164, 212, 0.2);
    color: var(--accent-color);
    font-weight: 500;
}

/* ===== ÍCONO CARRITO (derecha) - OPCIÓN 3 SÓLIDA ===== */
.nav-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(184, 164, 212, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.nav-icon:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
    transition: all var(--transition);
}

.nav-icon:hover svg {
    fill: white;
}

/* Badge del carrito */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

/* ===== ANIMACIONES ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .glass-nav {
        top: 1rem;
        width: 95%;
        max-width: 500px;
    }

    .glass-nav-container {
        padding: 1rem 1.5rem;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .nav-menu-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }

    .nav-icon {
        width: 40px;
        height: 40px;
    }

    .nav-icon svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .glass-nav-container {
        padding: 0.9rem 1.2rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-menu-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .nav-icon svg {
        width: 20px;
        height: 20px;
    }
}