.header-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    width: 100%;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-primary);
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text);
    margin-left: 20px;
    font-size: 0.95em;
    font-weight: 500;
}

.cart-icon {
    font-size: 1.5em;
    cursor: pointer;
}

body {
    margin: 0;
    padding: 0;
}

.header-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.header-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    
    /* --- MEJORA DE CALIDAD --- */
    image-rendering: -webkit-optimize-contrast; /* Para Chrome, Edge y Safari */
    image-rendering: crisp-edges;               /* Para Firefox */
    transform: translateZ(0);                   /* Forza renderizado por hardware */
}

.filter-nav-container {
    background-color: var(--color-primary);
    padding: 10px 0;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Oculta scroll en Firefox */
}

/* Oculta la barra de scroll en Chrome y Safari para que se vea más limpio */
.filter-nav-container::-webkit-scrollbar {
    display: none;
}

.filter-nav {
    display: flex;
    /* justify-content: center;  <-- ELIMINA O COMENTA ESTA LÍNEA */
    padding: 0 5%;
    flex-wrap: nowrap; /* Asegura que no se bajen a otra línea */
    justify-content: flex-start;
}

.filter-nav a {
    text-decoration: none;
    color: white;
    padding: 5px 15px;
    margin: 0 5px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.3s;
    flex: 0 0 auto; /* CRUCIAL: evita que los botones se encojan */
}

.filter-nav a.active,
.filter-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- ESTO ASEGURA QUE EL CARRITO NO SE SALGA DEL HEADER --- */
.main-header {
    position: relative !important; 
}

/* --- CONFIGURACIÓN DEL CARRITO PARA CELULARES --- */
@media (max-width: 768px) {
    
    .cart-header-btn {
        position: absolute !important; 
        top: 10px !important;          
        right: 15px !important;        
        z-index: 99999 !important; /* Extra alto por si acaso */
        background-color: white !important; 
        padding: 8px 10px !important;
        border-radius: 50% !important; 
        box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important; 
    }

    .cart-icon-link {
        font-size: 1.5em !important; 
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important; 
    }

    .cart-badge {
        position: absolute !important;
        top: -5px !important;
        right: -8px !important;
        background-color: red !important;
        color: white !important;
        border-radius: 50% !important;
        padding: 2px 6px !important;
        font-size: 0.7em !important;
        font-weight: bold !important;
    }
}
