/*
====================================
COFICO AUTOMOTORES
CSS Optimizado y Organizado
PALETA: NEGRO, GRIS Y ROJO
====================================
*/

/* ==================== 1. RESET Y VARIABLES ==================== */
/* Elimina márgenes y paddings por defecto del navegador */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS para mantener consistencia de colores y valores */
:root {
    /* Colores principales */
    --primary-color: #1a1a1a;
    --secondary-color: #dc2626;
    --accent-color: #ef4444;
    --accent-dark: #b91c1c;
    
    /* Escala de grises */
    --gray-light: #e5e7eb;
    --gray-medium: #6b7280;
    --gray-dark: #374151;
    
    /* Colores de texto y fondos */
    --text-dark: #0f0f0f;
    --text-light: #ffffff;
    --background-light: #f9fafb;
    --background-dark: #0a0a0a;
    
    /* Efectos */
    --border-color: rgba(220, 38, 38, 0.2);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(220, 38, 38, 0.25);
    --transition: all 0.3s ease;
}

/* Scroll suave en toda la página */
html {
    scroll-behavior: smooth;
}

/* Estilos base del body */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--text-light);
    overflow-x: hidden;
}

/* Contenedor principal con ancho máximo */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Links sin decoración por defecto */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ==================== 2. HEADER Y NAVEGACIÓN ==================== */
/* Header fijo en la parte superior */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

/* Estado del header al hacer scroll */
#header.scrolled {
    padding: 0.3rem 0;
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* Barra de navegación */
.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Menú de navegación horizontal */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

/* Enlaces de navegación */
.nav-link {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
    background: rgba(220, 38, 38, 0.1);
}

/* Link activo con indicador inferior */
.nav-link.active {
    color: var(--secondary-color);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Botón CTA en la navegación */
.nav-cta {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-light) !important;
    padding: 0.7rem 1.5rem !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--accent-dark), var(--secondary-color));
}

/* Botón menú móvil (oculto en desktop) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== 3. SECCIÓN HERO ==================== */
/* Sección principal con imagen de fondo */
.hero {
    position: relative;
    height: 110vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
}

/* Imagen de fondo con filtros */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('imagenes/FONDO INICIO.png');
    background-size: cover;
    background-position: center center;
    filter: contrast(0.95) brightness(0.55) saturate(0.9);
    z-index: 0;
    height: 150%;
}

/* Overlay con patrón de cuadrícula */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(220,38,38,0.1)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Contenido del hero */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1500px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content img {
    display: block;
    margin: 0 auto 0rem auto;
    max-width: 1500px;
    width: 100%;
    height: auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Indicador de scroll */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

/* ==================== 4. BOTONES ==================== */
/* Estilos base de botones */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

/* Botón primario con gradiente */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-light);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--accent-dark), var(--secondary-color));
}

/* Botón secundario transparente */
.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
}

/* Botón de ancho completo */
.btn-block {
    width: 100%;
}

/* Botón "Ver más" destacado */
.btn-ver-mas {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-light);
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-ver-mas:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--secondary-color));
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
    font-size: 1.25rem;
}

/* Botón WhatsApp */
.btn-whatsapp {
    flex: 1;
    background: #25d366;
    color: white;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Botón volver */
.btn-volver {
    padding: 1.2rem 2rem;
    background: var(--gray-dark);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-volver:hover {
    background: var(--primary-color);
}

/* Botón limpiar filtros */
.btn-clear-filters {
    background: var(--gray-light);
    color: var(--text-dark);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-clear-filters:hover {
    background: var(--secondary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ==================== 5. SECCIONES GENERALES ==================== */
/* Espaciado de secciones */
section {
    padding: 5rem 0;
}

/* Encabezado de sección centrado */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-medium);
    max-width: 600px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* ==================== 6. SECCIÓN DE CARACTERÍSTICAS ==================== */
.features {
    background: var(--background-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

/* Tarjeta de característica */
.feature-card {
    background: var(--text-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray-medium);
    line-height: 1.7;
}

/* ==================== 7. SECCIÓN DE VEHÍCULOS ==================== */
.vehicles {
    background: var(--text-light);
    width: 80%;
    margin: 0 auto;
    margin-top: 50px;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Tarjeta de vehículo */
.vehicle-card {
    background: var(--text-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.vehicle-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* Carrusel de imágenes del vehículo */
.vehicle-carousel {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--gray-dark);
}

.carousel-track {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-track img {
    width: 20%;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Botones del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(220, 38, 38, 0.9);
    border: none;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.vehicle-carousel:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.521);
    z-index: 999;
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Badge del vehículo */
.vehicle-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-light);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 5;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

/* Información del vehículo */
.vehicle-info {
    padding: 1.5rem;
}

.vehicle-info h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.vehicle-year {
    color: var(--gray-medium);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.vehicle-specs {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.vehicle-specs span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vehicle-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin: 1.5rem 0;
}

/* Sección de vehículos adicional */
.seccion-vehicles {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 500px;
}

.seccion-vehicles img {
    max-width: 100%;
    height: auto;
    margin-top: -200px;
    margin-bottom: -200px;
}

.catalog-section {
    margin-top: 3rem;
    animation: slideDown 0.5s ease-out;
}

.catalog-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Ajustes para vehículos adicionales */
#additionalVehicles {
    max-width: 100%;
}

#additionalVehicles:has(.vehicle-card:nth-child(-n+3):last-child) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

#additionalVehicles:has(.vehicle-card:nth-child(-n+3):last-child) .vehicle-card {
    max-width: 380px;
    width: 100%;
}

#additionalVehicles:has(.vehicle-card:only-child) {
    justify-content: center;
}

#additionalVehicles:has(.vehicle-card:only-child) .vehicle-card {
    max-width: 450px;
}

/* ==================== 8. FILTROS DE VEHÍCULOS ==================== */
.filters-container {
    width: 80%;
    margin: 0 auto;
    background: var(--background-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

/* Estado colapsado */
.filters-container.collapsed .filters-grid,
.filters-container.collapsed .filter-results {
    display: none;
}

.filters-container.collapsed {
    padding: 1rem 1.5rem;
}

.filters-container.collapsed .filters-header {
    margin-bottom: 0;
}

/* Encabezado de filtros */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.filters-header h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    transition: var(--transition);
}

.filters-header h3 i {
    color: var(--secondary-color);
}

/* Icono de colapsar/expandir */
.filters-header h3::after {
    content: '\f078';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.filters-container.collapsed .filters-header h3::after {
    transform: rotate(-90deg);
}

/* Grid de filtros */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-group label i {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Select de filtros */
.filter-select {
    padding: 0.7rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--text-light);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:hover {
    border-color: var(--secondary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Contador de resultados */
.filter-results {
    padding: 0.8rem;
    background: var(--text-light);
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-dark);
    border: 2px solid var(--gray-light);
    animation: slideDown 0.3s ease-out;
}

.filter-results strong {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Mensaje sin resultados */
.no-results-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--background-light);
    border-radius: 12px;
    margin: 2rem 0;
}

.no-results-message i {
    font-size: 4rem;
    color: var(--gray-medium);
    margin-bottom: 1rem;
}

.no-results-message h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.no-results-message p {
    color: var(--gray-medium);
}

/* ==================== 9. PÁGINA DE STOCK ==================== */
.stock-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--gray-dark));
    padding: 8rem 0 4rem;
    text-align: center;
    color: var(--text-light);
}

.stock-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.stock-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.stock-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stock-section {
    padding: 4rem 0;
    background: var(--background-light);
}

.filters-sticky {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: var(--background-light);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.vehicles-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ==================== 10. PÁGINA DE PRODUCTO INDIVIDUAL ==================== */
.producto-detalle {
    padding: 8rem 0 3rem;
    background: var(--background-light);
}

.producto-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.producto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* Galería de producto */
.producto-galeria {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.imagen-principal {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.imagen-principal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.miniaturas {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.miniatura {
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.miniatura.activa {
    border-color: var(--secondary-color);
}

.miniatura:hover {
    border-color: var(--accent-color);
}

.miniatura img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Información del producto */
.producto-info h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.producto-precio {
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: 800;
    margin: 1.5rem 0;
}

.producto-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 10px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.spec-item i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.spec-item span {
    color: var(--gray-medium);
    font-weight: 600;
}

.producto-descripcion {
    margin: 2rem 0;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Características del producto */
.caracteristicas-lista {
    margin: 2rem 0;
}

.caracteristicas-lista h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.caracteristicas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.caracteristica-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.caracteristica-item i {
    color: var(--secondary-color);
}

.acciones-producto {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==================== 11. SECCIÓN DE SERVICIOS ==================== */
.services {
    background: var(--background-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--text-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.8rem;
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-card p {
    color: var(--gray-medium);
    line-height: 1.7;
}

/* ==================== 12. TESTIMONIOS ==================== */
.testimonials {
    background: var(--text-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.testimonial-rating {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-text {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
}

.author-info h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.author-info span {
    font-size: 0.85rem;
    color: var(--gray-medium);
}

/* ==================== 13. PREGUNTAS FRECUENTES (FAQ) ==================== */
.faq {
    background: var(--background-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--text-light);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(220, 38, 38, 0.05);
    color: var(--secondary-color);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

.faq-item.active {
    border: 2px solid var(--secondary-color);
}

.faq-item.active .faq-question {
    color: var(--secondary-color);
    background: rgba(220, 38, 38, 0.1);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--gray-medium);
    line-height: 1.8;
}

/* ==================== 14. CONTACTO ==================== */
.contact {
    background: var(--text-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Información de contacto */
.contact-info {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--gray-medium);
    font-size: 0.95rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.3rem;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-hover);
}

/* Formulario de contacto */
.contact-form-container {
    background: var(--text-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-form-container h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--background-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--text-light);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-section-title {
    margin: 2rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-light);
}

.form-section-title h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==================== 15. FOOTER ==================== */
.footer {
    background: var(--background-dark);
    color: var(--text-light);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-logo-img {
    width: 250px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-column ul li i {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(220, 38, 38, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

/* ==================== 16. ELEMENTOS FLOTANTES ==================== */
/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* Botón volver arriba */
.back-to-top {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 998;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* ==================== 17. ESTADOS DE CARGA Y ERROR ==================== */
.loading, .error {
    text-align: center;
    padding: 5rem 2rem;
}

.loading h2, .error h2 {
    font-size: 2rem;
    color: var(--gray-medium);
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-light);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.loading-logo {
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-logo img {
    max-width: 200px;
    height: auto;
}

.loading-spinner {
    margin: 20px auto;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-text {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 18. ANIMACIONES ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 10px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* ==================== 19. RESPONSIVE DESIGN ==================== */

/* Tablets grandes y laptops pequeñas (1024px y menos) */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

/* Tablets (968px y menos) */
@media (max-width: 968px) {
    /* Navegación móvil */
    .nav-menu {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        background: var(--text-light);
        padding: 2rem;
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
        gap: 1rem;
    }

    .nav-link {
        color: var(--background-dark);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Secciones */
    section {
        padding: 4rem 0;
    }

    /* Contacto */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-info {
        order: 2;
    }

    .contact-form-container {
        order: 1;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Producto */
    .producto-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .producto-galeria {
        position: static;
    }
    
    .producto-info h1 {
        font-size: 2rem;
    }
    
    .producto-specs,
    .caracteristicas-grid {
        grid-template-columns: 1fr;
    }
    
    .acciones-producto {
        flex-direction: column;
    }

    .imagen-principal {
        height: 200px;
    }

    .miniatura {
        height: 50px;
    }

    /* Filtros */
    .filters-container {
        width: 100%;
        padding: 2rem;
        margin-top: 3.5rem;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .filters-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-header h3 {
        font-size: 1.1rem;
    }

    .btn-clear-filters {
        width: 100%;
        justify-content: center;
    }

    /* Vehículos */
    #additionalVehicles:has(.vehicle-card:nth-child(-n+3):last-child) .vehicle-card {
        max-width: 100%;
    }

    /* Stock */
    .stock-hero h1 {
        font-size: 2rem;
    }
    
    .stock-hero {
        padding: 6rem 1rem 3rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .vehicles-grid-full {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

/* Móviles (768px y menos) */
@media (max-width: 768px) {
    /* Logo */
    .logo img {
        height: 80px;
        width: auto;
    }

    /* Hero */
    .hero-content img {
        max-width: 400px;
        width: 100%;
        margin: 0 auto 1rem auto;
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 0 50px 50px 50px;
    }

    .hero-buttons {
        flex-direction: column;
        margin: auto 50px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        width: 100%;
    }

    /* Grids */
    .vehicles-grid,
    .features-grid,
    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Filtros */
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
}

/* Móviles pequeños (480px y menos) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 1rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
    }
}

/* ==================== FIN DEL CSS ==================== */