/* --- Reinicio y Estilo General --- */
body {
    background-color: #ffffff;
}

/* --- Estilos para los Títulos de Sección --- */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1.5px;
}

/* Divisor de dos líneas para los títulos de sección */
.section-title-divider {
    position: relative;
    display: block;
    width: 60px;
    height: 8px;
    margin: 0 auto 20px auto;
}

.section-title-divider::before,
.section-title-divider::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #002C5F;
    border-radius: 2px;
}

.section-title-divider::before {
    top: 0;
}

.section-title-divider::after {
    bottom: 0;
}

.section-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    .section-description {
        font-size: 1rem;
    }
}

/* --- Estructura de la Tarjeta del Vehículo --- */
.vehicle-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.vehicle-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.vehicle-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* --- Contenedor de la Imagen y Overlays --- */
.vehicle-card-image-container {
    position: relative;
    height: 220px;
}

.vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Insignia de Vehículo Certificado --- */
.certified-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #002148;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.certified-badge i {
    font-size: 1rem;
}

/* --- Overlay de Precio sobre la imagen --- */
.price-overlay {
    position: absolute;
    bottom: 0px;
    left: 0;
    background-color: #002C5F;
    color: white;
    padding: 10px 20px 10px 15px;
    display: flex;
    align-items: baseline;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-left: 0px;
}

.main-price {
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: none;
}
.msrp-price {
    font-size: 0.8rem;
    margin-left: 10px;
    opacity: 0.9;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    padding-left: 10px;
}
.original-price-struck {
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 10px;
    text-decoration: line-through;
    opacity: 0.9;
}

/* --- Cintas de "Oferta" y "Vendido" (VERSIÓN MEJORADA) --- */
.sale-ribbon, .sold-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    overflow: hidden;
}

/* Estilos base compartidos por ambas cintas */
.sale-ribbon::before, .sold-ribbon::before {
    position: absolute;
    top: 35px;
    right: -35px;
    width: 170px;
    color: white;
    transform: rotate(45deg);
    text-align: center;
    padding: 5px 0;
    font-weight: 700; /* Un poco más grueso */
    font-size: 1rem;   /* Un poco más grande */
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* ¡NUEVO! Estilos específicos para la cinta de OFERTA */
.sale-ribbon::before {
    content: '¡PRECIO ESPECIAL!'; /* Texto más llamativo */
    background-color: #ff4136; /* Rojo vibrante */
    animation: pulse-animation 2s infinite; /* Animación de pulso */
}

/* Estilos para la cinta de Vendido (sin cambios) */
.sold-ribbon::before {
    content: 'Vendido';
    background-color: #dc3545;
}

/* ¡NUEVO! Definición de la animación de pulso */
@keyframes pulse-animation {
    0% {
        transform: rotate(45deg) scale(1);
    }
    50% {
        transform: rotate(45deg) scale(1.05);
        box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    }
    100% {
        transform: rotate(45deg) scale(1);
    }
}

/* --- Cuerpo de la Tarjeta (Título) --- */
.vehicle-card-body {
    padding: 20px;
    flex-grow: 1;
}

.vehicle-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #212529;
    margin: 0 0 10px 0;
}

.vehicle-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
}

/* --- Barra Inferior de Especificaciones --- */
.vehicle-specs-bar {
    display: flex;
    justify-content: space-around;
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
    border-right: 1px solid #dee2e6;
    flex: 1;
    justify-content: center;
    padding: 12px 5px;
}

.spec-item:last-child {
    border-right: none;
}

.spec-item i {
    color: #6c757d;
    font-size: 1rem;
}

/* --- Franja de Detalles (Inspección, Garantía, etc.) --- */
.tech-details-strip {
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 40px 0;
}

.detail-item {
    padding: 0 20px;
}

.detail-icon {
    font-size: 2.5rem;
    color: #002C5F;
    margin-bottom: 15px;
}

.detail-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 10px;
}

.detail-text {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
}

/*
============================================
NUEVOS ESTILOS PARA PÁGINA DE DETALLE
============================================
*/

/* --- Nuevo Bloque de Precios Detallado --- */
.price-box-detailed {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.price-box-detailed .price-label {
    font-size: 0.9rem;
    color: #6c757d;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.price-box-detailed .price-amount-detailed {
    font-size: 2.8rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.price-box-detailed .price-msrp {
    font-size: 1rem;
    color: #6c757d;
    text-align: right;
    display: block;
    margin-top: -5px;
}

.btn-offer {
    background-color: #f26622; /* Naranja como en la imagen */
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    padding: 12px 20px;
    display: block;
    text-align: center;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-offer:hover {
    background-color: #d95b1e;
    color: #fff;
}

/* --- Nueva Lista de Especificaciones --- */
.specs-box-detailed .specs-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 3px solid #f26622; /* Línea naranja */
}

.specs-list-detailed {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    font-size: 0.95rem;
}

.specs-list-detailed li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.specs-list-detailed .spec-label {
    color: #6c757d;
    flex-shrink: 0;
}

.specs-list-detailed .spec-dots {
    flex-grow: 1;
    border-bottom: 2px dotted #ccc;
    margin: 0 15px;
    position: relative;
    top: -4px; /* Ajuste vertical para alinear los puntos */
}

.specs-list-detailed .spec-value {
    color: #212529;
    font-weight: 600;
    flex-shrink: 0;
}

/*
============================================
NUEVOS ESTILOS PARA GALERÍA Y PESTAÑAS
============================================
*/

/* --- Contenedor Principal de la Galería --- */
.gallery-section {
    margin-bottom: 25px;
}

.gallery-section .main-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

/* --- Botones de Acción sobre la Imagen --- */
.gallery-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.gallery-actions .btn {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    border-radius: 5px;
}

/* --- Tira de Miniaturas con Flechas Naranjas --- */
.thumbnail-scroller-detailed {
    position: relative;
    padding: 0 45px; /* Espacio para las flechas */
}

.thumbnail-scroller-detailed .thumbnail-strip {
    display: flex;
    gap: 15px;
    overflow: hidden;
    scroll-behavior: smooth;
}

.thumbnail-scroller-detailed .thumbnail-item {
    flex: 0 0 120px;
    height: 80px;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-scroller-detailed .thumbnail-item.active {
    border-color: #f26622; /* Naranja para la activa */
}

.thumbnail-scroller-detailed .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-arrow-detailed {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background-color: #f26622; /* Naranja */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}
.scroll-arrow-detailed:hover {
    background-color: #d95b1e;
}
.scroll-arrow-detailed.left {
    left: 0;
}
.scroll-arrow-detailed.right {
    right: 0;
}

/* --- Pestañas de Navegación --- */
.vehicle-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 25px;
}

.vehicle-tabs .tab-item {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Alinea con el borde inferior */
}

.vehicle-tabs .tab-item.active {
    color: #212529;
    border-bottom-color: #f26622; /* Naranja */
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
/*
============================================
AJUSTE DE ALTURA FIJA PARA LA GALERÍA
============================================
*/

/* 1. Le damos una altura fija al contenedor de la imagen principal */
.gallery-section .main-image-wrapper {
    height: 450px; /* <-- Puedes ajustar este valor a la altura que prefieras */
    background-color: #f4f4f4; /* Un fondo sutil por si una imagen tarda en cargar */
}

/* 2. Hacemos que la imagen llene ese contenedor sin deformarse */
.gallery-section .main-image-wrapper img#main-vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esta es la propiedad clave */
}
/* --- Insignia de Vehículo Certificado --- */
.certified-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #002148;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.certified-badge i {
    font-size: 1rem;
}

/* --- Cinta de "Oferta" --- */
.sale-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    overflow: hidden;
    z-index: 10;
}

.sale-ribbon::before {
    content: '¡OFERTA!';
    position: absolute;
    top: 35px;
    right: -35px;
    width: 170px;
    background-color: #ff4136; /* Rojo vibrante */
    color: white;
    transform: rotate(45deg);
    text-align: center;
    padding: 5px 0;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: rotate(45deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.05); }
    100% { transform: rotate(45deg) scale(1); }
}