.car-selection {
    padding: 1rem;
    background-color: #f9f9f9;
    width: 90vw;
    text-align: center;
}

.car-selection h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.filters {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.filter-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 30px;
    transition: background-color 0.3s ease;
}

.filter-button:hover {
    background-color: var(--secondary-color);
}

.car-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    /* justify-content: center; */
    align-items: center;
    text-transform: capitalize;
}

.car-card {
  background-color: var(--white-color);
  border: 1px solid var(--shadow-color);
  box-shadow: 0 4px 6px var(--shadow-color);
    width: 300px;
    padding: 1rem;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.car-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
    object-fit: cover;
    object-position: center;
    height: 20vh;
    aspect-ratio: 16/9;
    object-fit: contain;
}

.car-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.car-card p {
    font-size: 0.8rem;
    margin: 0.3rem 0;
    color: #555;
}

.car-card .book-now {
  background-color: var(--primary-color);
  color: var(--white-color);
    border: none;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.car-card .book-now:hover {
  background-color: var(--secondary-color);
}

.car-card .price {
  color: var(--secondary-color);
  font-size: 1rem; /* Slightly larger font size */
  font-weight: bold; /* Make the text bold */
  margin-top: 0.5rem; /* Add spacing above the price */
}

@media screen and (min-width: 786px) and (max-width: 1460px) {
    .car-cards{
        width: 80vw;
        padding-left: 50px;
        justify-content: center;
    }
    .filters{
        justify-content: center;
        gap: 1rem;
    }
    .filter-button{
        padding: 10px 20px;
    }
    .car-card{
        width: 45%;
    }
}


@media screen and (max-width: 768px) {
    .car-selection {
        width: 100vw;
        padding: 1rem;
    }

    .filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .car-card {
        width: 100%;
        max-width: 100vw;
        height: 80vh;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        /* min-height: 80vw; */
        /* height: 50vh; */
        /* justify-content: space-around; */
    }
    .car-card img {
        height: 50%;
    }
    .car-card h3 {
        font-size: 1.2rem;
    }
    .car-card p {
        font-size: 0.9rem;
    }
    .book-now {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 40%;
    }
}