/* Variables y Reset */
:root {
    --primary-color: #e74c3c;
    /* Rojo deportivo */
    --secondary-color: #2c3e50;
    /* Azul oscuro elegante */
    --accent-color: #f1c40f;
    /* Amarillo acento */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --dark-bg: #222;
    --white: #fff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Base */
.top-bar {
    background-color: #111;
    color: var(--white);
    padding: 15px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid #333;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
    color: #ccc;
}

.social-links {
    display: none;
}

.main-header {
    background: #000;
    /* Patrón tipo fibra de carbono / malla */
    background-image:
        linear-gradient(27deg, #151515 5px, transparent 5px),
        linear-gradient(207deg, #151515 5px, transparent 5px),
        linear-gradient(90deg, #1b1b1b 10px, transparent 10px),
        linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
    background-color: #131313;
    background-size: 20px 20px;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.header-scrolled {
    padding: 5px 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-image: none !important;
    border-top-color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    /* Evitar que el logo se encoja */
}

.logo img {
    max-height: 85px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.logo h1 {
    font-size: 1.8rem;
    color: #fff;
    font-weight: 800;
    font-style: italic;
    line-height: 1;
    margin: 0;
    text-shadow: 2px 2px 0 #000;
}

.logo span {
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: 1px 1px 0 #000;
}

/* Nav Menu Desktop (Default) */
.nav-menu ul {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
}

.nav-menu a {
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 5px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Arial Black', 'Poppins', sans-serif;
    position: relative;
    transition: all 0.3s ease;
}

.header-scrolled .logo img {
    max-height: 50px;
    /* Reducción drástica del logo */
}

.header-scrolled .nav-menu a {
    font-size: 0.8rem;
    /* Links más pequeños */
}

.header-scrolled .logo h1 {
    font-size: 1.4rem;
}

.header-scrolled .logo span {
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.header-scrolled .social-btn {
    padding: 6px 10px;
    /* Botones sociales más compactos */
    font-size: 0.8rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--white);
    text-decoration: none;
}

.nav-menu a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Dropdown Desktop */
.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown-content {
    display: none;
    position: absolute;
    background-color: #222;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    top: 100%;
    left: 0;
    border-top: 2px solid var(--primary-color);
}

.nav-menu .dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-menu .dropdown-content li a {
    color: #ccc;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid #333;
}

.nav-menu .dropdown-content li a:hover {
    background-color: #333;
    color: var(--primary-color);
}

/* Ocultar underline en dropdown links */
.nav-menu .dropdown-content li a::after {
    display: none;
}

/* Header Socials */
.header-socials {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 1.2rem;
    border-radius: 6px;
    transition: transform 0.2s;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
}

.social-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.social-btn.fb {
    background-color: #3b5998;
}

.social-btn.wa {
    background-color: #25d366;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

/* Banner Slider Styles */
.banner-slider {
    position: relative;
    width: 100%;
    height: calc(100vh - 165px);
    /* Ajuste exacto para restar el header */
    min-height: 500px;
    /* Altura del banner */
    overflow: hidden;
    padding: 0;
    /* Override section padding */
    background: #000;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    animation: zoomEffect 20s infinite alternate;
    /* Efecto zoom suave */
}

@keyframes zoomEffect {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.slide-content {
    color: var(--white);
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.slide-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.company-info-banner {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.company-info-banner p {
    margin: 5px 0;
    font-size: 1rem;
}

.company-info-banner i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 100;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: var(--primary-color);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Responsive Slide Text */
@media (max-width: 768px) {
    .slide-content h2 {
        font-size: 2rem;
    }

    .banner-slider {
        height: calc(100vh - 140px);
        min-height: 400px;
    }

    /* Menor altura en móvil */
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/hero-bg.jpg') no-repeat center/cover;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.hero {
    background-color: #333;
}

/* Fallback */
.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-cta {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cta:hover {
    background: #c0392b;
    transform: translateY(-3px);
}

/* Secciones Comunes */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.section-title p {
    color: #777;
    font-size: 1.1rem;
}

/* Tarjetas de Vehículos Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Grid de 3 columnas en pantallas grandes */
    gap: 30px;
}

.vehicle-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #eee;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehicle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Legacy card image styles removed to avoid conflict with slider */
.card-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
}

.card-badge.new {
    background: #e74c3c;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.card-badge.used {
    background: #34495e;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
}

/* Overlay para hacer toda la tarjeta clickeable */
.card-title::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.card-price {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.vehicle-specs {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.spec-item i {
    color: var(--primary-color);
    margin-right: 5px;
}

.loading-fade {
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Asegurar que el botón de comparar esté por encima del overlay */
.btn-compare {
    position: relative;
    z-index: 2;
    margin-top: auto !important;
}

/* Filtros Sidebar */
.inventory-layout {
    display: flex;
    gap: 30px;
}

.sidebar-filters {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.filter-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-filter {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.inventory-results {
    flex: 1;
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-col a {
    color: #bdc3c7;
}

.footer-col a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.newsletter-form button {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}


/* =========================================
   RESPONSIVE STYLES (Mobile Only)
   ========================================= */
@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .contact-info span {
        display: block;
        margin: 2px 0;
    }

    /* Header Mobile: Toggle Izq | Logo Der */
    .main-header .container {
        justify-content: space-between;
        /* Distribuye espacio */
        flex-direction: row-reverse;
        /* Logo primero (Der), Toggle después (Izq) en flujo visual */
        /* Sin embargo, flex-start/end depende del orden HTML.
           Mejor usar position o order si el HTML es fijo.
           HTML actual: Logo, Nav, Socials, Toggle.
           Flex order default: 0.
        */
        position: relative;
        padding-left: 50px;
        /* Espacio para toggle */
    }

    .logo {
        margin-left: auto;
        /* Empuja logo a la derecha si es flex row */
        order: 2;
        /* Visualmente a la derecha */
    }

    .logo img {
        max-height: 50px;
    }

    .header-socials {
        display: none;
    }

    .nav-toggle {
        display: block;
        font-size: 1.8rem;
        color: #fff;
        cursor: pointer;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        order: 1;
        z-index: 1010;
        touch-action: manipulation;
        padding: 5px;
    }

    /* Menú Desplegable Móvil */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #1a1a1a;
        color: #fff;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        border-top: 1px solid #333;
        z-index: 1002;
        max-height: calc(100vh - 80px);
        /* Altura máxima para permitir scroll */
        overflow-y: auto;
    }

    .nav-menu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu a {
        display: block;
        color: #fff;
        border-bottom: 1px solid #222;
        text-align: center;
        padding: 15px;
        font-size: 1rem;
    }

    .nav-menu a::after {
        display: none;
    }

    /* Dropdown en móvil: colapsado por defecto */
    .nav-menu .dropdown-content {
        display: none;
        /* Oculto por defecto en móvil */
        position: static;
        box-shadow: none;
        background: #000;
        border-top: none;
        min-width: auto;
    }

    .nav-menu .dropdown.open .dropdown-content {
        display: block;
        /* Solo se muestra si tiene la clase .open */
    }

    .nav-menu .dropdown a i {
        transition: transform 0.3s;
    }

    .nav-menu .dropdown.open>a i {
        transform: rotate(180deg);
        /* Rota la flecha cuando se abre */
    }

    .nav-menu .dropdown-content li a {
        padding: 12px 20px;
        color: #aaa;
        text-align: left;
        font-size: 0.9rem;
        border-bottom: 1px solid #111;
        background: #0a0a0a;
    }

    .nav-menu .dropdown:hover .dropdown-content {
        display: none;
        /* Desactivar hover en móvil */
    }

    .nav-menu .dropdown.open:hover .dropdown-content,
    .nav-menu .dropdown.open .dropdown-content {
        display: block;
    }

    /* Otros ajustes responsive */
    .hero-content h2 {
        font-size: 2rem;
    }

    .inventory-layout {
        flex-direction: column;
    }

    .sidebar-filters {
        width: 100%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations for Banners */
@keyframes zoom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes zoom-out {
    0% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pan-right {
    0% {
        background-position: 0% 50%;
        transform: scale(1.1);
    }

    100% {
        background-position: 100% 50%;
        transform: scale(1.1);
    }
}

@keyframes pan-left {
    0% {
        background-position: 100% 50%;
        transform: scale(1.1);
    }

    100% {
        background-position: 0% 50%;
        transform: scale(1.1);
    }
}

.slide-bg.animate-zoom {
    animation: zoom 20s infinite alternate;
}

.slide-bg.animate-zoom-out {
    animation: zoom-out 15s ease-out forwards;
}

.slide-bg.animate-pan-right {
    animation: pan-right 25s linear infinite alternate;
}

.slide-bg.animate-pan-left {
    animation: pan-left 25s linear infinite alternate;
}

.slide-bg.animate-none {
    animation: none;
    transform: scale(1);
}

.slide-bg {
    /* Ensure base slide style covers area but allows movement for pan */
    transition: transform 0.5s ease;
}

/* --- Explore Brands Section --- */
.explore-brands {
    padding: 100px 0;
    background-color: #f8fafc;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    border: none;
}

.brand-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    height: 100%;
    text-decoration: none;
}

.brand-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.brand-card:hover::before {
    opacity: 1;
}

.brand-logo-wrapper {
    height: 100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.brand-logo-wrapper img {
    max-height: 80px;
    max-width: 90%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo-wrapper img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-arrow {
    margin-top: 15px;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.brand-card:hover .brand-arrow {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Contact Map Section */
.contact-map-section {
    padding: 80px 0;
    background-color: var(--white);
    overflow: hidden;
}

.contact-map-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.contact-info-side {
    flex: 1;
    min-width: 300px;
}

.contact-info-side h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.contact-info-side p.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-detail-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 5px;
    width: 30px;
    text-align: center;
}

.contact-detail-text h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.contact-detail-text p {
    color: #555;
    font-size: 1rem;
    line-height: 1.4;
}

.map-side {
    flex: 1.2;
    min-width: 400px;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-side iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 992px) {
    .contact-map-container {
        flex-direction: column;
    }

    .map-side {
        width: 100%;
        min-width: 100%;
        height: 350px;
    }
}

/* --- High-End Vehicle Card Styles --- */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.vehicle-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Image Slider */
.card-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.card-img-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.slider-img.active {
    opacity: 1;
}

/* Hover Segments Navigation */
.slider-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 5;
}

.slider-segment {
    flex: 1;
    height: 100%;
    cursor: pointer;
}

/* Indicators - Canto a Canto */
.card-indicators {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    gap: 0;
    /* No gap for continuous look */
    padding: 0;
    margin: 0;
    z-index: 25;
    pointer-events: none;
    box-sizing: border-box;
}

.card-indic {
    flex: 1;
    height: 6px;
    /* Slightly thicker and more visible */
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0;
    margin: 0;
    transition: background 0.15s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    /* Very subtle divider */
}

.card-indic:last-child {
    border-right: none;
}

.card-indic.active {
    background: #3498db;
    opacity: 1;
}

/* Badges & Buttons on Image */
.img-count-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.btn-wishlist {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.btn-wishlist:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

/* Card Content Structure */
.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.make-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    flex: 1;
    margin: 0;
}

.card-year {
    display: block;
    font-size: 0.95rem;
    color: #666;
    margin-top: 2px;
}

.card-options-btn {
    color: #999;
    cursor: pointer;
    padding: 5px;
}

/* Centered Specs */
.vehicle-specs.centered {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.vehicle-specs.centered .spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #777;
    font-size: 0.8rem;
}

.vehicle-specs.centered .spec-item i {
    font-size: 1rem;
    color: #b1b1b1;
}

/* Footer Price Section */
.card-footer-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.current-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #000;
}

/* WhatsApp Button on Card */
.btn-whatsapp-card {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #25d366;
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    z-index: 5;
    /* Por encima del overlay de la tarjeta */
}

.btn-whatsapp-card:hover {
    background: #128c7e;
    transform: scale(1.05);
}

.btn-whatsapp-card i {
    font-size: 1.1rem;
}

@media (max-width: 480px) {
    .btn-whatsapp-card span {
        display: none;
    }

    .btn-whatsapp-card {
        padding: 8px;
    }
}

.carfax-logo {
    height: 22px;
    opacity: 0.7;
}

/* Action Button */
.btn-view-details {
    background: #f0f7ff;
    color: #3498db;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    margin-top: auto;
    position: relative;
    z-index: 5;
    /* Por encima del overlay de la tarjeta */
}

.btn-view-details:hover {
    background: #3498db;
    color: #fff;
}

@media (max-width: 768px) {
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
}