/* assets/css/web.css */

:root {
    --primary-color: #dc3545; /* Rojo CarrosYa */
    --dark-color: #212529;
    --light-bg: #f8f9fa;
    --font-main: 'Inter', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--dark-color);
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-link {
    font-size: 0.95rem;
    color: #555 !important;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Animación del botón Vender */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.animate-pulse {
    animation: pulse-red 2s infinite;
}

/* Tarjetas de Vehículos (Efecto Hover Premium) */
.vehicle-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.vehicle-card img {
    transition: transform 0.5s ease;
}

.vehicle-card:hover img {
    transform: scale(1.05);
}

/* Labels y Badges */
.badge-premium {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    font-weight: bold;
}

/* Selectores del buscador */
.form-select {
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-color: #dee2e6;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Ajustes Móviles */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0 0 10px 10px;
        border-top: 1px solid #eee;
    }
    .btn-danger {
        width: 100%;
        margin-top: 10px;
    }
}


/* --- TARJETAS DE VEHÍCULOS (FIX BOOTSTRAP RATIO) --- */

/* 1. Contenedor redondeado */
.vehicle-card .ratio {
    overflow: hidden;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

/* 2. PRECIO (La corrección vital) */
/* Bootstrap intenta poner width: 100%, aquí lo forzamos a auto */
.ratio > .price-badge {
    width: auto !important;
    height: auto !important;
    top: auto !important;  /* Resetear top */
    left: auto !important; /* Resetear left */
    
    /* Nuestra posición real */
    position: absolute;
    bottom: 10px !important;
    right: 10px !important;
    
    /* Estilos visuales */
    background-color: rgba(220, 53, 69, 0.95);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 3. ESTADO (Vendido/Destacado) */
.ratio > .status-badge {
    width: auto !important;
    height: auto !important;
    bottom: auto !important;
    right: auto !important;
    
    position: absolute;
    top: 10px !important;
    left: 10px !important;
    z-index: 5;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 4. SOMBRA GRADIENTE */
.ratio > .vehicle-overlay {
    width: 100% !important;
    height: 50% !important; /* Solo mitad inferior */
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    
    position: absolute;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* 5. Hover Effects */
.vehicle-card:hover .card-title {
    color: var(--primary-color) !important;
}

/* Swiper Thumbs */
.thumbs-slider .swiper-slide {
    opacity: 0.6;
    transition: 0.3s;
}
.thumbs-slider .swiper-slide-thumb-active {
    opacity: 1;
}
.thumbs-slider .swiper-slide-thumb-active .border {
    border-color: var(--primary-color) !important; /* Rojo */
}
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}