:root{
  --red:#ef233c; --green:#25D366;
  --shadow-sm:0 1px 2px 0 rgba(0,0,0,.5); --shadow-lg:0 10px 15px -3px rgba(0,0,0,.4);
  --tg-bg:#161616; --tg-text:#fff; --tg-border:rgba(255,255,255,.15); --tg-shadow:0 8px 24px rgba(0,0,0,.5);
}
[data-theme="dark"]{
  --bg-dark:#1f2937; --bg-main:#080808; --card-bg:#161616; --border-color:rgba(255,255,255,.1);
  --text-main:#ffffff; --text-muted:rgba(255,255,255,.6); --white:#ffffff; --dark-overlay:rgba(0,0,0,.4);
  --nav-bg:rgba(8,8,8,.95); --tg-bg:#161616; --tg-text:#fff; --tg-border:rgba(255,255,255,.15); --tg-shadow:0 8px 24px rgba(0,0,0,.5);
}
[data-theme="light"]{
  --bg-dark:#e4e2db; --bg-main:#f5f4f0; --card-bg:#e4e2db; --border-color:rgba(0,0,0,.12);
  --text-main:#0a0a0a; --text-muted:rgba(10,10,10,.6); --white:#0a0a0a; --dark-overlay:rgba(0,0,0,.06);
  --nav-bg:rgba(245,244,240,.95); --tg-bg:#ffffff; --tg-text:#0a0a0a; --tg-border:rgba(0,0,0,.12); --tg-shadow:0 8px 24px rgba(0,0,0,.15);
}
body{transition:background .35s ease,color .35s ease}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Inter', sans-serif;
    background-color: transparent; 
    color: var(--white);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   VIDEO DE FONDO Y CAPA OSCURA (Inicio)
   ========================================= */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10; 
    overflow: hidden;
    background-color: var(--bg-main);
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0,0,0,0.4) 1px, transparent 1px);
    background-size: 3px 3px;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: -5;
}

/* =========================================
   BARRA DE NAVEGACIÓN (COMPUTADORAS)
   ========================================= */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    box-sizing: border-box;
    z-index: 10;
}

.navbar img { height: 80px; transition: transform 0.3s ease; }
.navbar img:hover { transform: scale(1.05); }

.nav-links { display: flex; align-items: center; }

.nav-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: 0.3s;
}

.nav-links a:hover { opacity: 0.7; color: var(--red); }

/* =========================================
   MENÚ MÓVIL Y BOTÓN HAMBURGUESA
   ========================================= */
.hamburger {
    display: none; /* Oculto en computadoras */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1005; /* Por encima del menú móvil */
}

.hamburger span {
    width: 30px;
    height: 2px;
    background-color: var(--white);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* Animación de "X" al abrir */
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--red); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--red); }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Oculto fuera de pantalla por defecto */
    width: 100%;
    height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 35px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1002;
}

.mobile-menu.active {
    right: 0; /* Aparece en pantalla */
}

.mobile-menu a {
    color: var(--white);
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    opacity: 0; 
    transform: translateY(20px);
}

.mobile-menu.active a {
    opacity: 1;
    transform: translateY(0);
}

/* Cascada de aparición de enlaces */
.mobile-menu.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active a:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.active a:nth-child(5) { transition-delay: 0.5s; }
.mobile-menu.active a:nth-child(6) { transition-delay: 0.6s; }
.mobile-menu.active a:nth-child(7) { transition-delay: 0.7s; }

.mobile-menu a:hover { color: var(--red); }

/* =========================================
   ESTILOS DE LA PÁGINA DE INICIO (Hero y Banners)
   ========================================= */
.hero-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 10px;
    font-weight: 400;
}

.hero-content h1 {
    font-size: clamp(30px, 6vw, 60px);
    text-transform: uppercase;
    font-weight: 700;
    margin: 0 0 30px 0;
    letter-spacing: 2px;
}

.btn-discover {
    display: flex;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
}

.btn-discover .arrow {
    width: 35px;
    height: 35px;
    border: 1px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    transition: 0.3s;
}

.btn-discover:hover .arrow {
    background-color: var(--white);
    color: var(--bg-main);
}

.banners-wrapper {
    padding: 40px 5%;
    background-color: var(--bg-main);
    position: relative;
    z-index: 2;
}

.banners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-card {
    border-radius: 12px;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.banner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.banner-blue { background: linear-gradient(135deg, #1e64d9 0%, #0d429a 100%); }
.banner-green { background: linear-gradient(135deg, #2db496 0%, #1a826b 100%); }
.banner-gray { background: linear-gradient(135deg, var(--text-muted) 0%, var(--text-muted) 100%); }

.banner-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
    z-index: 2;
}

.banner-card h3 span { color: #d4ff00; }

.banner-card p {
    font-size: 13px;
    font-weight: 300;
    margin: 0 0 20px 0;
    opacity: 0.9;
    z-index: 2;
}

.banner-btn {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
}

.banner-btn .plus-icon {
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: 300;
}

.banner-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    transform: rotate(45deg);
    z-index: 1;
}

/* =========================================
   TARJETAS DE AUTOS Y GRILLAS INTELIGENTES
   ========================================= */
.muro-container {
    padding: 60px 5%;
    background-color: var(--bg-main);
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--white);
    font-weight: 600;
}

.section-title-link {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.section-title-link:hover .section-title {
    color: var(--red);
}

/* Magia de la grilla auto-ajustable (Aplica a Inicio y Catálogo) */
.grid-disponibles, .grid-novedades, .cars {
    display: grid;
    /* Crea columnas de entre 300px y 380px según el espacio de la pantalla */
    grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); 
    justify-content: center; /* Centra los autos si la fila no se llena */
    gap: 30px;
    margin-bottom: 80px;
    width: 100%;
}

.muro-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px; 
    text-decoration: none;
    display: flex;
    flex-direction: column;
    width: 100%; /* Toma todo el ancho de su columna */
    background: var(--card-bg, #111);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

/* Alturas fijas para que todas las tarjetas se vean parejas */
.grid-disponibles .muro-item, .cars .muro-item { height: 380px; }
.grid-novedades .muro-item { height: 380px; }

.muro-item:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.6); 
}

.muro-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.muro-item:hover img {
    transform: scale(1.08);
}

.muro-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, var(--nav-bg) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    box-sizing: border-box;
}

.muro-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.muro-tag {
    background: var(--red);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 800;
}

.muro-name {
    font-size: 22px; 
    font-weight: 800;
    color: var(--white);
    margin: 0 0 6px 0;
    line-height: 1.1;
}

.muro-specs {
    font-size: 12px; 
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 5px;
}

.price { 
    color: #fff; 
    font-weight: 800; 
    font-size: 20px; 
    margin-top: 5px; 
    display: block; 
}

.muro-arrow {
    color: var(--white);
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
    margin-bottom: 5px;
}

.muro-item:hover .muro-arrow {
    transform: translateX(8px);
    color: var(--red);
}

/* =========================================
   FOOTER GLOBAL
   ========================================= */
.footer-minimal {
    position: relative;
    z-index: 2;
    background: var(--bg-main);
    padding: 80px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    border-top: 1px solid var(--border-color);
}

.footer-column h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: var(--text-muted);
}

.footer-column a {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: 0.2s;
}

.footer-column a:hover { color: var(--red); }

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA CATÁLOGO
   ========================================= */

.container { 
    display: flex; 
    flex-direction: row; 
    gap: 40px; 
    padding: 50px 5%; 
    max-width: 1600px; 
    margin: 0 auto; 
}

.filters { 
    width: 280px; 
    background: var(--card-bg); 
    padding: 30px; 
    border-radius: 20px; 
    height: fit-content; 
    box-shadow: var(--shadow-sm); 
    position: sticky; 
    top: 130px; 
    border: 1px solid var(--border-color);
}

.filters h3 { 
    margin-top: 0; 
    font-size: 16px; 
    border-bottom: 2px solid var(--bg-main); 
    padding-bottom: 20px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    font-weight: 700; 
}

details { margin-bottom: 15px; border-bottom: 1px solid var(--bg-main); padding-bottom: 15px; }
summary { font-weight: 600; cursor: pointer; padding: 5px 0; outline: none; font-size: 15px; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--red); font-weight: 800; }
details[open] summary::after { content: '-'; }

.filter-btn { 
    display: block; width: 100%; text-align: left; background: none; border: none; padding: 12px 10px; cursor: pointer; color: var(--text-muted); font-size: 14px; font-family: 'Inter', sans-serif; font-weight: 500; transition: 0.2s; border-radius: 8px;
}
.filter-btn:hover { background: rgba(239, 35, 60, 0.05); color: var(--red); padding-left: 15px; }

.main-content { flex: 1; }

.search-container { position: relative; margin-bottom: 40px; }
.search-bar { 
    width: 100%; padding: 22px 30px; border-radius: 50px; background: var(--card-bg); border: 1px solid var(--border-color); box-sizing: border-box; font-size: 16px; font-family: 'Inter', sans-serif; outline: none; transition: 0.3s; box-shadow: var(--shadow-sm);
}
.search-bar:focus { border-color: var(--red); box-shadow: 0 10px 30px rgba(239, 35, 60, 0.1); transform: translateY(-2px); }

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background: var(--green); width: 65px; height: 65px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3); z-index: 1000; transition: 0.3s; }
.whatsapp-float:hover { transform: scale(1.1) rotate(-10deg); }
.whatsapp-float img { width: 40px; height: 40px; } 

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 900px) {
    .container { flex-direction: column; padding: 30px 5%; }
    .filters { width: 100%; position: static; box-sizing: border-box; margin-bottom: 10px; }
    .banners-grid { grid-template-columns: 1fr; }
    .banner-card { min-height: 150px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } 
    .hamburger { display: flex; } 
    .hero-content h1 { font-size: 35px; }
    .grid-disponibles, .grid-novedades, .cars { grid-template-columns: 1fr; }
}

/* === BOTON DE TEMA (compartido) === */
.theme-toggle{position:fixed;bottom:100px;right:30px;z-index:1001;width:46px;height:46px;border-radius:50%;border:1px solid var(--tg-border);background:var(--tg-bg);color:var(--tg-text);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;box-shadow:var(--tg-shadow);transition:transform .3s,background .3s}
.theme-toggle:hover{transform:scale(1.1) rotate(18deg)}
.theme-toggle .icon-sun{display:none}.theme-toggle .icon-moon{display:block}
[data-theme="light"] .theme-toggle .icon-sun{display:block}[data-theme="light"] .theme-toggle .icon-moon{display:none}
@media(max-width:768px){.theme-toggle{bottom:88px;right:18px;width:42px;height:42px;font-size:16px}}
