        /* HEADER STYLES */
        header {
            background-color: var(--white);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 5%;
            border-bottom: 1px solid var(--border-color);
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgb(255, 255, 255);
            z-index: 1100; /* más alto que el nav */
            padding: 10px 5%;
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
            color: var(--primary-color);
            text-decoration: none;
        }

        .auth-buttons {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .cart-icon-container {
            position: relative;
            margin-right: 15px;
        }

        .cart-icon {
            font-size: 20px;
            color: var(--primary-color);
            text-decoration: none;
            position: relative;
        }

        .cart-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background-color: var(--accent-color);
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .auth-buttons a {
            text-decoration: none;
            color: var(--primary-color);
            font-size: 14px;
            transition: color 0.3s;
        }

        .auth-buttons a:hover {
            color: var(--accent-color);
        }

        .user-menu {
            display: none;
            align-items: center;
            gap: 15px;
        }

        .user-menu.active {
            display: flex;
        }

        .user-info {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        .user-email {
            font-size: 14px;
            font-weight: 500;
            color: var(--primary-color);
        }

        .my-account-link {
            font-size: 12px;
            color: var(--accent-color);
            text-decoration: none;
            margin-top: 2px;
        }

        .my-account-link:hover {
            text-decoration: underline;
        }

        .logout-btn {
            background: none;
            border: none;
            color: var(--primary-color);
            cursor: pointer;
            font-size: 14px;
            padding: 5px 10px;
            border-radius: 4px;
            transition: all 0.3s;
        }

        .logout-btn:hover {
            background-color: var(--secondary-color);
            color: var(--accent-color);
        }

        .language-selector {
            position: relative;
        }

        .language-btn {
            background: none;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            color: var(--primary-color);
        }

        .language-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            background-color: var(--white);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            border-radius: 4px;
            min-width: 150px;
            z-index: 1001;
        }

        .language-dropdown.show {
            display: block;
        }

        .language-dropdown a {
            display: block;
            padding: 10px 15px;
            text-decoration: none;
            color: var(--text-color);
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.3s;
        }

        .language-dropdown a:hover {
            background-color: var(--secondary-color);
        }

        .language-dropdown a:last-child {
            border-bottom: none;
        }

        /* Barra de navegación dinámica */
        .main-nav {
        position: fixed;
        top: 85px; /* justo debajo de la top-bar (ajusta según altura real del logo/barra) */
        width: 100%;
        background: white;
        transition: transform 0.3s ease;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        
        }

        /* Estado oculto */
        .main-nav.hidden {
        transform: translateY(-100%);
        }

        /* Links dentro del nav */
        .nav-links {
        display: flex;
        list-style: none;
        justify-content: center;
        padding: 2px;
        }

        nav {
            padding: 15px 5%;
        }

        .nav-links {
            display: flex;
            list-style: none;
            justify-content: center;
            gap: 30px;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-color);
            font-weight: 500;
            transition: color 0.3s;
            position: relative;
        }

        .nav-links a:hover {
            color: var(--accent-color);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--accent-color);
            transition: width 0.3s;
        }

        .nav-links a:hover::after {
            width: 100%;
        }


        .auth-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center;
    justify-content: center; z-index: 9999;
}
.auth-modal {
    background: white; padding: 30px; border-radius: 8px;
    width: 100%; max-width: 400px; position: relative;
}
.close-modal {
    position: absolute; top: 10px; right: 15px; font-size: 24px;
    border: none; background: none; cursor: pointer;
}
.auth-modal form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.auth-modal input { padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
.auth-modal .submit-btn {
    background: var(--accent-color); color: white; border: none;
    padding: 12px; border-radius: 4px; cursor: pointer;
}