/* --- VARIABLES FIJAS (ROJO, AMARILLO, NEGRO) --- */
:root {
    --color-rojo: #D32F2F;
    --color-amarillo: #FFC107;
    --color-negro: #212121;
    --color-gris-claro: #f8f9fa;
    --font-main: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-gris-claro);
    overflow-x: hidden;
}

/* --- CLASES DE COLOR --- */
.text-theme-primary { color: var(--color-amarillo) !important; }
.text-theme-secondary { color: var(--color-rojo) !important; }
.bg-theme-primary { background-color: var(--color-amarillo) !important; }
.bg-theme-secondary { background-color: var(--color-rojo) !important; }

.btn-theme-secondary {
    background-color: var(--color-rojo);
    border-color: var(--color-rojo);
    color: white;
}
.btn-theme-secondary:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
    color: white;
}

.btn-dark-custom {
    background-color: var(--color-negro);
    color: white;
    border: none;
}
.btn-dark-custom:hover {
    background-color: var(--color-amarillo);
    color: var(--color-negro);
}

.cart-badge-theme { background-color: var(--color-rojo) !important; }
.btn-cart-theme { border-color: var(--color-rojo); color: var(--color-rojo); }
.btn-cart-theme:hover { background-color: var(--color-rojo); color: white; }

/* --- TOP BAR --- */
.top-bar { background-color: var(--color-negro); font-size: 0.85rem; }
.animate-pulse-text { animation: pulseText 2s infinite; }
@keyframes pulseText { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* --- NAVBAR & LOGO --- */
.brand-icon {
    width: 40px; height: 40px;
    background: var(--color-rojo);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; animation: spin 8s linear infinite;
}
.brand-text .letter-spacing { letter-spacing: 2px; }

.sticky-category { 
    position: sticky; top: 70px; z-index: 90; background: white; 
    border-bottom: 1px solid #eee;
}

/* BARRA DE MARCAS CENTRADA EN PC */
#vehicleBrandsNav {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    align-items: center;
    scroll-behavior: smooth;
    
    /* CENTRADO PARA ESCRITORIO */
    justify-content: center; 
}

#vehicleBrandsNav::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* ELEMENTOS DE LA BARRA */
.brand-item {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--color-negro);
    min-width: 85px; max-width: 100px;
    transition: all 0.3s ease;
    opacity: 0.6; cursor: pointer;
    padding: 6px 8px; border-radius: 10px;
    flex-shrink: 0; /* Evita que se aplasten */
}

.brand-item:hover, .brand-item.active {
    opacity: 1; transform: translateY(-3px);
    color: var(--color-rojo);
    background-color: rgba(211, 47, 47, 0.06);
}
.brand-item.active .brand-name { font-weight: 700; }

.brand-icon-all {
    width: 48px; height: 48px;
    background: #fff0f1; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 6px; border: 1px solid #f4c7cc;
    color: var(--color-rojo); font-size: 1.3rem;
    transition: all 0.3s;
}
.brand-item.active .brand-icon-all {
    background: var(--color-rojo); color: white;
    border-color: var(--color-rojo);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.brand-logo-lg {
    width: 48px !important; height: 48px !important;
    object-fit: contain !important;
    margin-bottom: 6px; border-radius: 8px;
    background: white; padding: 4px;
    border: 1px solid #eee;
    transition: all 0.3s; display: block;
    filter: grayscale(100%);
}
.brand-item:hover .brand-logo-lg, 
.brand-item.active .brand-logo-lg {
    filter: grayscale(0%);
    border-color: var(--color-rojo);
    box-shadow: 0 4px 12px rgba(211,47,47,0.15);
}

.brand-name {
    font-size: 12px; font-weight: 500;
    text-align: center; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    width: 100%; line-height: 1.3;
}

/* --- RESPONSIVE: MÓVILES --- */
@media (max-width: 768px) {
    .sticky-category { top: 60px; }
    
    /* En móvil, alineamos a la izquierda para permitir scroll natural */
    #vehicleBrandsNav {
        justify-content: flex-start;
        gap: 10px; padding: 10px 0;
    }
    
    .brand-item { min-width: 75px; padding: 4px 6px; }
    .brand-logo-lg { width: 40px !important; height: 40px !important; }
    .brand-icon-all { width: 40px; height: 40px; font-size: 1.1rem; }
    .brand-name { font-size: 11px; }
}

/* --- HERO SECTION COMPACTO --- */
.hero-section {
    min-height: 400px; padding: 40px 0;
    background: linear-gradient(135deg, rgba(20,20,20,0.85) 0%, rgba(40,40,40,0.7) 100%),
                url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover fixed;
    position: relative; display: flex; align-items: center;
}
.hero-shape { position: absolute; border-radius: 50%; filter: blur(60px); z-index: 1; opacity: 0.4; animation: floatShape 10s infinite ease-in-out; }
.shape-1 { width: 250px; height: 250px; background: var(--color-rojo); top: -50px; right: -50px; }
.shape-2 { width: 200px; height: 200px; background: var(--color-amarillo); bottom: -30px; left: 10%; animation-delay: 2s; }
@keyframes floatShape { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -30px) scale(1.1); } }
.hero-title-animate { font-size: 2.5rem; animation: floatText 6s ease-in-out infinite; line-height: 1.2; }
@keyframes floatText { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.text-gradient-gold {
    background: linear-gradient(to right, var(--color-amarillo), #fff, var(--color-amarillo));
    background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; display: inline-block;
}
.animate-shine { animation: shineText 3s linear infinite; }
@keyframes shineText { to { background-position: 200% center; } }
.animate-slide-up-delayed { opacity: 0; animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards; }
.animate-fade-in-slow { opacity: 0; animation: fadeInSimple 1s ease 1s forwards; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInSimple { to { opacity: 1; } }
.pulse-btn { animation: pulseBtn 2s infinite; }
@keyframes pulseBtn { 0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(211, 47, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); } }
.backdrop-blur { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.2); }
.backdrop-blur:hover { background: rgba(255, 255, 255, 0.2); color: white; }

/* --- PRODUCT CARDS & OFFERS --- */
.product-card { border: none; border-radius: 12px; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); overflow: hidden; height: 100%; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.product-img-wrap { height: 220px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.product-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.5s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.1); }
.badge-custom { position: absolute; top: 10px; right: 10px; z-index: 2; font-weight: 700; letter-spacing: 0.5px; }
.animate-pulse-badge { animation: pulseBadge 2s infinite; box-shadow: 0 2px 5px rgba(211, 47, 47, 0.4); }
@keyframes pulseBadge { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.btn-add-cart { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; transition: all 0.3s; background-color: var(--color-negro); color: white; border: none; }
.btn-add-cart:hover { transform: rotate(90deg) scale(1.1); background-color: var(--color-amarillo); color: var(--color-negro); }

/* --- MODAL BOTÓN ELEGANTE --- */
#modalAddBtn {
    background: linear-gradient(135deg, var(--color-rojo) 0%, #b71c1c 100%);
    border: none; color: white;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
    transition: all 0.3s ease; letter-spacing: 0.5px;
}
#modalAddBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
}
#modalAddBtn i { transition: transform 0.3s ease; }
#modalAddBtn:hover i { transform: translateX(3px); }

/* --- SUGERENCIAS DE BÚSQUEDA --- */
#searchSuggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000; padding: 8px; display: none; max-height: 300px; overflow-y: auto;
    border: 1px solid #eee; margin-top: 4px;
}
.suggestion-label { font-size: 0.7rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 8px; font-weight: 600; }
.suggestion-item { padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: background 0.2s; }
.suggestion-item:hover { background: #f8f9fa; }
.prod-sugg img.sugg-img { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; background: #f5f5f5; }
mark { background: #fff3cd; color: inherit; padding: 0 2px; border-radius: 2px; }

/* --- PRODUCTOS DESTACADOS MINI --- */
.product-card-mini {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); cursor: pointer;
    transition: all 0.3s ease; border: 1px solid #f0f0f0;
}
.product-card-mini:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: var(--color-rojo); }
.mini-img-wrap { position: relative; height: 120px; background: #fafafa; display: flex; align-items: center; justify-content: center; padding: 10px; }
.mini-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; }
.badge-offer { position: absolute; top: 6px; right: 6px; background: var(--color-rojo); color: white; font-size: 0.65rem; padding: 2px 6px; border-radius: 10px; font-weight: bold; }
.mini-info { padding: 10px; }
.mini-title { font-size: 0.8rem; font-weight: 600; margin: 4px 0; line-height: 1.3; height: 2.6em; overflow: hidden; }
.mini-price { font-size: 0.85rem; font-weight: 700; }

/* --- FOOTER & CART UTILS --- */
.footer-compact { padding-top: 0 !important; padding-bottom: 0 !important; }
.footer-compact h5 { font-size: 1.1rem; }
.footer-compact .small { font-size: 0.85rem !important; }
.hover-warning:hover { color: var(--color-amarillo) !important; transition: 0.3s; }
.cart-item-wrapper { animation: slideInRight 0.3s ease-out; }
.cart-item-wrapper.removing { animation: slideOutRight 0.3s ease-in forwards; }
.modal-dialog-zoom { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease; transform: scale(0.8); opacity: 0; }
.modal.show .modal-dialog-zoom { transform: scale(1); opacity: 1; }
.flying-image { position: fixed; z-index: 9999; pointer-events: none; width: 100px; height: 100px; object-fit: contain; border-radius: 50%; box-shadow: 0 10px 20px rgba(0,0,0,0.3); background: white; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1); }
.btn-add-animated.success { background-color: #198754 !important; border-color: #198754 !important; transform: scale(0.95); }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { to { opacity: 0; transform: translateX(30px); height: 0; margin: 0; padding: 0; overflow: hidden; } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }
.animate-bounce { animation: bounce 0.5s; }

@media (max-width: 768px) {
    .hero-section { min-height: 350px; padding: 30px 0; text-align: center; }
    .hero-title-animate { font-size: 1.8rem; }
    .product-img-wrap { height: 180px; }
    .footer-compact .row > div { margin-bottom: 10px; }
}
/* --- BARRA MARCAS VEHÍCULOS --- */
.sticky-category { position: sticky; top: 70px; z-index: 90; background: white; border-bottom: 1px solid #eee; }
#vehicleBrandsNav { display: flex; gap: 15px; padding: 12px 0; overflow-x: auto; scrollbar-width: none; align-items: center; justify-content: center; scroll-behavior: smooth; }
#vehicleBrandsNav::-webkit-scrollbar { display: none; }

.brand-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--color-negro); min-width: 85px; max-width: 100px; transition: all 0.3s ease; opacity: 0.6; cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.brand-item:hover, .brand-item.active { opacity: 1; transform: translateY(-3px); color: var(--color-rojo); background-color: rgba(211, 47, 47, 0.06); }
.brand-item.active .brand-name { font-weight: 700; }

.brand-icon-all { width: 48px; height: 48px; background: #fff0f1; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; border: 1px solid #f4c7cc; color: var(--color-rojo); font-size: 1.3rem; transition: all 0.3s; }
.brand-item.active .brand-icon-all { background: var(--color-rojo); color: white; border-color: var(--color-rojo); box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3); }

.brand-logo-lg { width: 48px !important; height: 48px !important; object-fit: contain !important; margin-bottom: 6px; border-radius: 8px; background: white; padding: 4px; border: 1px solid #eee; transition: all 0.3s; display: block; filter: grayscale(100%); }
.brand-item:hover .brand-logo-lg, .brand-item.active .brand-logo-lg { filter: grayscale(0%); border-color: var(--color-rojo); box-shadow: 0 4px 12px rgba(211,47,47,0.15); }
.brand-name { font-size: 12px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; line-height: 1.3; }

@media (max-width: 768px) {
    .sticky-category { top: 60px; }
    #vehicleBrandsNav { justify-content: flex-start; gap: 10px; padding: 10px 0; }
    .brand-item { min-width: 75px; padding: 4px 6px; }
    .brand-logo-lg { width: 40px !important; height: 40px !important; }
    .brand-icon-all { width: 40px; height: 40px; font-size: 1.1rem; }
    .brand-name { font-size: 11px; }
}

/* --- BOTÓN MODAL ELEGANTE --- */
#modalAddBtn { background: linear-gradient(135deg, var(--color-rojo) 0%, #b71c1c 100%); border: none; color: white; box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3); transition: all 0.3s ease; letter-spacing: 0.5px; }
#modalAddBtn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4); background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%); }
#modalAddBtn i { transition: transform 0.3s ease; }
#modalAddBtn:hover i { transform: translateX(3px); }

/* --- PÁGINA DE MARCA --- */
.hero-brand { min-height: 280px; padding: 30px 0; }
.brand-hero-logo { width: 120px; height: 120px; background: white; border-radius: 20px; padding: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,0.35); border: 3px solid var(--color-amarillo); flex-shrink: 0; }
.brand-hero-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hero-brand .hero-title-animate { font-size: 2.2rem; }

.chip-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-label { font-size: 0.8rem; font-weight: 600; color: #6c757d; white-space: nowrap; margin-right: 4px; }
.chip { border: 1px solid #ddd; background: white; color: var(--color-negro); border-radius: 50rem; padding: 6px 16px; font-size: 0.85rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: all 0.25s ease; }
.chip small { opacity: 0.6; margin-left: 4px; }
.chip:hover { border-color: var(--color-rojo); color: var(--color-rojo); transform: translateY(-2px); }
.chip.active { background: var(--color-rojo); border-color: var(--color-rojo); color: white; box-shadow: 0 4px 12px rgba(211,47,47,0.3); }

@media (max-width: 768px) {
    .hero-brand { min-height: 240px; }
    .brand-hero-logo { width: 90px; height: 90px; }
    .hero-brand .hero-title-animate { font-size: 1.6rem; }
}
.product-card { position: relative; }
.product-card .badge-custom {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

/* --- ANCHO DEL CONTENIDO EN PANTALLAS GRANDES ---
   Bootstrap limita .container a 1320px como maximo.
   Se amplia por tramos para aprovechar monitores grandes
   (o navegador con zoom reducido). Debe quedar al final del archivo. */
@media (min-width: 1400px) { .container { max-width: 1380px; } }
@media (min-width: 1700px) { .container { max-width: 1600px; } }
@media (min-width: 2200px) { .container { max-width: 1900px; } }


/* ==========================================================
   BARRA DE MARCAS MAS LLAMATIVA (logos y nombres)
   Misma paleta: rojo, amarillo y negro. Va al final del archivo.
   ========================================================== */
.sticky-category {
    background: linear-gradient(180deg, #ffffff 0%, #fff8e1 100%);
    border-bottom: 3px solid var(--color-amarillo);
}
#vehicleBrandsNav { gap: 16px; padding: 14px 6px 16px; }

.brand-item {
    position: relative;
    min-width: 104px; max-width: 128px;
    padding: 10px 12px 9px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
    opacity: 1;                      /* antes 0.6: ahora se ven a color pleno */
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.brand-item::after {                  /* subrayado amarillo animado */
    content: ""; position: absolute; left: 50%; bottom: 5px;
    width: 0; height: 3px; border-radius: 3px;
    background: var(--color-amarillo);
    transform: translateX(-50%);
    transition: width .25s ease;
}
.brand-item:hover {
    transform: translateY(-5px);
    background: #fff;
    border-color: var(--color-rojo);
    box-shadow: 0 10px 22px rgba(211,47,47,0.22);
}
.brand-item:hover::after { width: 34px; }

.brand-logo-lg {
    width: 64px !important; height: 64px !important;
    padding: 7px; margin-bottom: 8px;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
    filter: none !important;          /* logos a color, ya no en gris */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.brand-icon-all {
    width: 64px; height: 64px; margin-bottom: 8px;
    border-radius: 14px; font-size: 1.7rem;
    box-shadow: 0 2px 8px rgba(211,47,47,0.15);
}
.brand-item:hover .brand-logo-lg {
    border-color: var(--color-rojo);
    box-shadow: 0 4px 14px rgba(211,47,47,0.25);
}

.brand-name {
    font-size: 14px; font-weight: 700;
    color: var(--color-negro);
    text-transform: capitalize;
    letter-spacing: .2px;
}
.brand-item:hover .brand-name { color: var(--color-rojo); }

/* Marca seleccionada */
.brand-item.active {
    background: linear-gradient(135deg, var(--color-rojo) 0%, #b71c1c 100%);
    border-color: var(--color-rojo);
    box-shadow: 0 10px 24px rgba(211,47,47,0.38);
    transform: translateY(-4px);
}
.brand-item.active::after { width: 34px; }
.brand-item.active .brand-name { color: #fff; font-weight: 800; }
.brand-item.active .brand-logo-lg {
    border-color: var(--color-amarillo); border-width: 2px;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.45);
}
.brand-item.active .brand-icon-all {
    background: #fff; color: var(--color-rojo); border-color: var(--color-amarillo);
}

@media (max-width: 768px) {
    #vehicleBrandsNav { gap: 10px; padding: 10px 4px 12px; }
    .brand-item { min-width: 84px; max-width: 100px; padding: 8px 8px 7px; }
    .brand-logo-lg { width: 52px !important; height: 52px !important; padding: 6px; }
    .brand-icon-all { width: 52px; height: 52px; font-size: 1.4rem; }
    .brand-name { font-size: 12.5px; }
}

/* ===== Compatibilidad en el modal de producto ===== */
.compat-box { margin: 0 0 14px; }
.compat-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6c757d; margin-bottom: 6px; }
.compat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.compat-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: #e9f7ef; color: #1e7e46; font-size: .82rem; font-weight: 600; text-decoration: none; border: 1px solid #c9ead6; transition: background .2s; }
.compat-chip:hover { background: #d5f0e1; color: #176a39; }
.compat-ask .compat-title { text-transform: none; letter-spacing: 0; font-size: .85rem; color: #343a40; }
.compat-link { font-size: .85rem; font-weight: 600; color: #198754; text-decoration: underline; }
.compat-mine { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; font-size: .88rem; line-height: 1.25; }
.compat-mine > svg { flex: 0 0 auto; margin-top: 1px; }
.compat-mine strong { display: block; font-weight: 700; }
.compat-mine small { display: block; opacity: .85; }
.compat-mine.ok { background: #198754; color: #fff; }
.compat-mine.warn { background: #fff4e0; color: #8a5a00; border: 1px solid #f3dcae; }
.compat-mine.warn .compat-link { display: inline-block; margin-top: 3px; color: #8a5a00; }

/* ===== WhatsApp flotante: parpadeo + estado de horario ===== */
.wa-float { animation: waBlink 1.8s ease-in-out infinite; }
.wa-float::before, .wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; opacity: 0; pointer-events: none; animation: waRing 2.2s ease-out infinite; }
.wa-float::after { animation-delay: 1.1s; }
.wa-float svg { animation: waIcon 1.8s ease-in-out infinite; }
.wa-float:hover, .wa-float:hover svg, .wa-estado:hover ~ .wa-float { animation-play-state: paused; }
@keyframes waBlink { 0%, 100% { filter: brightness(1); box-shadow: 0 6px 18px rgba(0,0,0,.22), 0 0 0 0 rgba(37,211,102,.55); } 50% { filter: brightness(1.18); box-shadow: 0 6px 18px rgba(0,0,0,.22), 0 0 0 10px rgba(37,211,102,0); } }
@keyframes waRing { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes waIcon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.wa-estado { position: fixed; right: 86px; bottom: calc(27px + env(safe-area-inset-bottom, 0px)); z-index: 1039; display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 12px; border-radius: 999px; background: #fff; color: #1d1d1f; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: .8rem; line-height: 1.15; animation: waChipIn .5s ease both; }
.wa-estado:hover { color: #1d1d1f; box-shadow: 0 8px 22px rgba(0,0,0,.24); }
.wa-estado-txt { display: flex; flex-direction: column; }
.wa-estado-txt strong { font-weight: 700; }
.wa-estado-txt small { color: #6c757d; font-size: .72rem; }
@keyframes waChipIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wa-float, .wa-float svg, .wa-float::before, .wa-float::after, .wa-estado, .wa-estado-dot, .wa-dot { animation: none !important; } }
/* Estados del horario: rojo = cerrado, verde = abierto, naranja = ya casi cierra */
.wa-estado { --c: #dc2626; }
.wa-estado[data-estado="abierto"] { --c: #16a34a; }
.wa-estado[data-estado="cierra"] { --c: #ea580c; }
.wa-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dc2626; border: 2px solid #fff; }
.wa-dot[data-estado="abierto"] { background: #16a34a; }
.wa-dot[data-estado="cierra"] { background: #ea580c; animation: waDotCierra .9s ease-in-out infinite; }
.wa-estado-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: 0 0 auto; }
.wa-estado[data-estado="abierto"] .wa-estado-dot { animation: waDot 1.4s ease-in-out infinite; }
.wa-estado[data-estado="cierra"] .wa-estado-dot { animation: waDot .8s ease-in-out infinite; }
.wa-estado-txt strong { color: var(--c); }
.wa-estado[data-estado="cierra"] { box-shadow: 0 6px 18px rgba(234,88,12,.30); }
@keyframes waDot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 0%, transparent); } }
@keyframes waDotCierra { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* ===== Footer: especialistas en marcas ===== */
.footer-marcas { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.footer-marca { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 600; text-decoration: none; transition: background .2s, color .2s, transform .15s; }
.footer-marca img { width: 24px; height: 24px; border-radius: 50%; background: #fff; padding: 3px; object-fit: contain; }
.footer-marca:hover { background: #ffc107; color: #1d1d1f; transform: translateY(-1px); }

/* ===== Footer: medios de pago ===== */
.footer-pagos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.footer-pagos-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.footer-pagos-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; }
.pago { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; cursor: default; transition: color .2s, border-color .2s, background .2s, transform .15s; outline: none; }
.pago svg { width: 24px; height: 24px; flex: 0 0 auto; }
.pago:hover, .pago:focus-visible, .pago:active { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,.10); transform: translateY(-2px); }
/* ===== Red de seguridad: SVG del footer nunca gigantes ===== */
footer svg { max-width: 32px; max-height: 32px; }
footer .pago svg { width: 24px; height: 24px; }
.footer-pagos { width: 100%; }

/* ===== Móvil: que el botón de WhatsApp no tape los medios de pago ===== */
@media (max-width: 768px) {
    /* espacio extra al final para poder subir el contenido por encima de los botones flotantes */
    footer.footer-compact { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important; }
    .footer-pagos { margin-top: 18px; }
    .footer-pagos-list { gap: 8px; }
    .pago { padding: 6px 12px 6px 9px; font-size: .8rem; }
}

/* ===== Catálogo de inicio: botón "Ver más", barra de filtro y modal de marcas ===== */
.btn-vermas { display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--color-negro); background: transparent; color: var(--color-negro); font-weight: 700; font-size: 1.05rem; padding: .8rem 2rem; border-radius: 50px; transition: background .2s, color .2s, transform .2s; }
.btn-vermas i { animation: vm-bounce 1.3s ease-in-out infinite; }
.btn-vermas:hover { background: var(--color-negro); color: #fff; transform: translateY(-2px); }
@keyframes vm-bounce { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

.catalog-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 1.25rem; padding: .7rem 1rem; border-radius: 14px; background: #fff4dd; border: 1px solid #f5d28a; color: #5a3b00; font-size: .95rem; }
.catalog-filter .cf-actions { display: flex; gap: 8px; }
.catalog-filter button { border: 0; background: #fff; border-radius: 50px; padding: .35rem .9rem; font-weight: 600; font-size: .85rem; color: var(--color-negro); }
.catalog-filter button:hover { background: var(--color-negro); color: #fff; }

.bp-head { position: relative; padding: 1.6rem 1.25rem 1.2rem; text-align: center; color: #fff; background: linear-gradient(135deg, #1b1d21, #3a3d44); overflow: hidden; }
.bp-head .btn-close { position: absolute; top: 14px; right: 14px; }
.bp-head h5 { margin: .35rem 0 .2rem; font-weight: 800; }
.bp-head p { margin: 0; opacity: .75; font-size: .9rem; }
.bp-road { display: block; position: relative; height: 34px; margin: 0 auto; max-width: 280px; border-bottom: 3px dashed rgba(255,255,255,.25); }
.bp-road i { position: absolute; bottom: -4px; left: 0; font-size: 1.9rem; color: #ffc107; animation: bp-drive 3.2s ease-in-out infinite; }
@keyframes bp-drive { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 34px); opacity: 0; } }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.bp-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 10px; border: 1px solid #e9ecef; border-radius: 16px; background: #fff; cursor: pointer; opacity: 0; transform: translateY(14px) scale(.9); animation: bp-in .45s cubic-bezier(.2, .9, .3, 1.25) forwards; transition: box-shadow .2s, border-color .2s, translate .2s; }
.bp-tile:hover, .bp-tile:focus-visible { translate: 0 -4px; border-color: var(--color-rojo); box-shadow: 0 10px 22px rgba(211, 47, 47, .18); outline: 0; }
@keyframes bp-in { to { opacity: 1; transform: none; } }
.bp-logo { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; background: #f5f5f7; font-weight: 800; font-size: 1.4rem; color: #999; }
.bp-logo::before { content: attr(data-l); }
.bp-logo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; background: #f5f5f7; }
.bp-name { font-weight: 700; font-size: .92rem; color: var(--color-negro); }
.bp-tile small { color: #888; font-size: .72rem; }
.bp-tile.bp-empty { opacity: .6; }
.bp-all { border: 0; background: var(--color-negro); color: #fff; padding: .7rem 1.6rem; border-radius: 50px; font-weight: 700; transition: background .2s, transform .2s; }
.bp-all:hover { background: var(--color-rojo); transform: translateY(-2px); }

/* ===== Baterías: carrusel que va pasando ===== */
.baterias-sec { margin-top: 3.5rem; }
.baterias-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 1rem; }
.baterias-head h4 { margin: 0; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.baterias-head h4 i { color: #f4a300; }
.bat-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.bat-track { display: flex; gap: 16px; width: max-content; padding: 8px 4px 12px; animation: bat-scroll var(--bat-dur, 40s) linear infinite; }
.bat-marquee:hover .bat-track, .bat-marquee:focus-within .bat-track, .bat-marquee:active .bat-track { animation-play-state: paused; }
@keyframes bat-scroll { to { transform: translateX(calc(-50% - 8px)); } }
.bat-marquee.bat-static { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
.bat-marquee.bat-static .bat-track { animation: none; width: 100%; justify-content: center; flex-wrap: wrap; }
.bat-item { width: 250px; flex: 0 0 auto; }
.bat-card .product-img-wrap { height: 150px !important; padding: 8px; display: flex; align-items: center; justify-content: center; }
.bat-card .product-img-wrap img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.bat-body { display: flex; flex-direction: column; flex-grow: 1; padding: .85rem; gap: .6rem; }
.bat-name { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.25; text-transform: capitalize; }
.bat-specs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; }
.bat-specs li { display: grid; grid-template-columns: 16px auto 1fr; align-items: start; gap: 6px; }
.bat-specs i { color: var(--color-rojo); font-size: .85rem; line-height: 1.3; }
.bat-specs span { color: #888; white-space: nowrap; }
.bat-specs b { text-align: right; font-weight: 700; color: var(--color-negro); overflow-wrap: anywhere; }
.bat-veh b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
    .bat-track { animation: none; }
    .bat-marquee { overflow-x: auto; }
    .bp-tile { animation-duration: .01s; animation-delay: 0s !important; }
    .bp-road i, .btn-vermas i { animation: none; }
}
@media (max-width: 576px) { .bat-item { width: 220px; } .bp-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* ==========================================================
   BARRA DE MARCAS: más compacta + animación elegante y sutil
   (logos y nombres más pequeños; entrada escalonada, brillo suave al pasar el mouse)
   ========================================================== */
#vehicleBrandsNav { gap: 10px; padding: 9px 6px 11px; }
#vehicleBrandsNav .brand-item {
    position: relative; overflow: hidden;
    min-width: 72px; max-width: 88px;
    padding: 7px 8px 6px;
    border-radius: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    animation: brand-in .55s cubic-bezier(.22,.8,.3,1) backwards;   /* backwards: no pisa el hover */
}
/* entrada escalonada, una tras otra */
#vehicleBrandsNav .brand-item:nth-child(1)  { animation-delay: .02s; }
#vehicleBrandsNav .brand-item:nth-child(2)  { animation-delay: .07s; }
#vehicleBrandsNav .brand-item:nth-child(3)  { animation-delay: .12s; }
#vehicleBrandsNav .brand-item:nth-child(4)  { animation-delay: .17s; }
#vehicleBrandsNav .brand-item:nth-child(5)  { animation-delay: .22s; }
#vehicleBrandsNav .brand-item:nth-child(6)  { animation-delay: .27s; }
#vehicleBrandsNav .brand-item:nth-child(7)  { animation-delay: .32s; }
#vehicleBrandsNav .brand-item:nth-child(8)  { animation-delay: .37s; }
#vehicleBrandsNav .brand-item:nth-child(n+9) { animation-delay: .42s; }
@keyframes brand-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }

#vehicleBrandsNav .brand-logo-lg {
    width: 38px !important; height: 38px !important;
    padding: 5px; margin-bottom: 5px; border-radius: 11px;
    transition: transform .35s cubic-bezier(.22,.8,.3,1), box-shadow .3s ease, border-color .3s ease;
}
#vehicleBrandsNav .brand-icon-all {
    width: 38px; height: 38px; font-size: 1.05rem;
    margin-bottom: 5px; border-radius: 11px;
}
#vehicleBrandsNav .brand-name { font-size: 11px; font-weight: 600; letter-spacing: .1px; }

/* subrayado más fino */
#vehicleBrandsNav .brand-item::after { height: 2px; bottom: 3px; }
#vehicleBrandsNav .brand-item:hover::after,
#vehicleBrandsNav .brand-item.active::after { width: 26px; }

/* brillo dorado que cruza la tarjeta al pasar el mouse */
#vehicleBrandsNav .brand-item::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255,193,7,.25) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .7s ease;
}
#vehicleBrandsNav .brand-item:hover::before { transform: translateX(120%); }

/* hover: el logo crece apenas y se levanta la tarjeta */
#vehicleBrandsNav .brand-item:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(211,47,47,.2); }
#vehicleBrandsNav .brand-item:hover .brand-logo-lg,
#vehicleBrandsNav .brand-item:hover .brand-icon-all { transform: scale(1.1); }

/* marca activa: aro dorado que "respira" muy despacio */
#vehicleBrandsNav .brand-item.active .brand-logo-lg,
#vehicleBrandsNav .brand-item.active .brand-icon-all { animation: brand-glow 2.8s ease-in-out infinite; }
@keyframes brand-glow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,193,7,.45); }
    50%      { box-shadow: 0 0 0 6px rgba(255,193,7,.12); }
}

@media (max-width: 768px) {
    #vehicleBrandsNav { gap: 8px; padding: 8px 4px 10px; }
    #vehicleBrandsNav .brand-item { min-width: 64px; max-width: 78px; padding: 6px 6px 5px; }
    #vehicleBrandsNav .brand-logo-lg { width: 34px !important; height: 34px !important; padding: 4px; }
    #vehicleBrandsNav .brand-icon-all { width: 34px; height: 34px; font-size: .95rem; }
    #vehicleBrandsNav .brand-name { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
    #vehicleBrandsNav .brand-item, #vehicleBrandsNav .brand-item::before,
    #vehicleBrandsNav .brand-item.active .brand-logo-lg, #vehicleBrandsNav .brand-item.active .brand-icon-all { animation: none; transition: none; }
}

/* ===== Marca seleccionada: parpadea (destello suave rojo + aro dorado) =====
   "Todos" queda fuera: es la opción por defecto y no debe parpadear siempre. */
#vehicleBrandsNav .brand-item.active:not([href="index.html"]) {
    animation: brand-in .55s cubic-bezier(.22,.8,.3,1) backwards, brand-blink 1.5s ease-in-out infinite;
}
@keyframes brand-blink {
    0%, 100% { box-shadow: 0 6px 16px rgba(211,47,47,.30); filter: brightness(1); }
    50%      { box-shadow: 0 8px 24px rgba(211,47,47,.60), 0 0 0 4px rgba(255,193,7,.45); filter: brightness(1.12); }
}
#vehicleBrandsNav .brand-item.active:not([href="index.html"]) .brand-logo-lg {
    animation: brand-ring 1.5s ease-in-out infinite;
}
@keyframes brand-ring {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,193,7,.55); }
    50%      { box-shadow: 0 0 0 7px rgba(255,193,7,.15); }
}
@media (prefers-reduced-motion: reduce) {
    #vehicleBrandsNav .brand-item.active:not([href="index.html"]),
    #vehicleBrandsNav .brand-item.active:not([href="index.html"]) .brand-logo-lg { animation: none; }
}