/* --- TÍTULOS --- */
.car-title {
    font-size: 22px;
    margin-bottom: 5px;
    line-height: 1.2;
    color: white;
    margin-top: 0;
}

/* --- TARJETA PRINCIPAL --- */
.car-card {
    /* Fondo y Estilos Base */
    background-image: url('https://ecrentacar.com/ni/wp-content/uploads/sites/5/2026/02/fondo_flota.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    color: #fff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    text-align: left;

    /* Flexbox para ordenar todo verticalmente */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Distribuye el espacio */
    min-height: 380px;
    /* Altura mínima sugerida */

    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
    /* Asegura que el padding no rompa layouts */
}

/* Efecto Hover en la tarjeta */
.car-card:hover {
    box-shadow: 0px 0px 0px 2px #ff8000;
    transform: scale(1.03);
}

/* --- IMAGEN DEL VEHÍCULO --- */
.car-card .car-image {
    display: block;
    width: 100%;
    height: auto;
    /* Mantiene proporción */
    max-height: 200px;
    /* Evita que la imagen sea demasiado alta */
    object-fit: contain;
    margin: 10px auto;
}

/* --- DETALLES E ICONOS --- */
.car-details {
    display: flex;
    flex-wrap: wrap;
    /* Permite que los iconos bajen si no caben (móvil) */
    gap: 15px;
    margin: 10px 0;
    align-items: center;
}

.car-details span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: white;
}

.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* --- BOTÓN DE RESERVA --- */
.car-reservation-container {
    margin-top: auto;
    /* Empuja hacia abajo si hay espacio extra */
    margin-bottom: 10px;
}

.car-reservation {
    /* Estructura y Color */
    background-color: #FF8000;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    /* Para enlaces */
    display: inline-block;

    /* TAMAÑO PERFECTO */
    padding: 10px 15px;
    font-size: 14px;
    width: fit-content;

    transition: all 0.3s ease-in-out;
}

.car-reservation:hover {
    transform: scale(1.05);
    background-color: #e67300;
    color: white;
}

/* --- AJUSTES EXTRA --- */
.car-card p {
    margin: 0;
    opacity: 0.9;
}

.car-subtitle {
    font-size: 16px;
    margin-bottom: 10px;
}

.car-info {
    margin-bottom: 15px;
    font-size: 14px;
}

/* --- PRECIO --- */
.car-price {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    margin-top: 10px;
}

.price-day {
    font-size: 1.2em;
    font-weight: bold;
}

.price-total {
    font-size: 0.9em;
    opacity: 0.8;
}

/* --- GRID DE LA FLOTA [car_fleet] --- */
.cfm-fleet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns by default (Desktop) */
    gap: 20px;
    padding: 20px 0;
}

/* Responsive Breakpoints */

/* Tablet (2 columns) */
@media (max-width: 1024px) {
    .cfm-fleet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (1 column) */
@media (max-width: 768px) {
    .cfm-fleet-grid {
        grid-template-columns: 1fr;
    }

    .car-title {
        font-size: 20px;
    }

    .car-card {
        padding: 15px;
        min-height: auto;
        /* Allow height to adjust content */
    }

    .car-details {
        gap: 10px;
    }

    .cfm-filter-btn {
        width: 100%;
        margin: 5px 0;
        display: block;
        /* Stack buttons on mobile */
    }
}

/* --- FILTROS DE CATEGORIA --- */
.cfm-filter-container {
    text-align: center;
    margin-bottom: 30px;
}

.cfm-filter-btn {
    background: transparent;
    border: 2px solid #FF8000;
    color: #FF8000;
    padding: 8px 16px;
    margin: 0 5px 10px;
    cursor: pointer;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cfm-filter-btn:hover,
.cfm-filter-btn.active {
    background: #FF8000;
    color: white;
}

/* --- PRECIO IMPROVED --- */
.car-price-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 10px;
    border-radius: 5px;
}

.price-label {
    font-size: 0.85em;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-weight: bold;
    font-size: 1.1em;
    color: #ffffff;
    /* Highlight color */
}

/* Hide old price class if still present */
.car-price {
    display: none;
}