/* =========================================================
   Estructura general
========================================================= */

.vehicles {
    padding: 45px 0 70px;
}

.vehicles__layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}


/* =========================================================
   Filtro lateral
========================================================= */

.vehicles-filter {
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    padding: 28px 28px 32px;
    background-color: #fff;
}

.vehicles-filter__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 27px;
}

.vehicles-filter__title,
.vehicles-filter__subtitle {
    margin: 0;
    color: #111;
    font-family: var(--font-main);
    font-weight: 400;
}

.vehicles-filter__title {
    font-size: 19px;
    line-height: 1.3;
}

.vehicles-filter__subtitle {
    margin-bottom: 7px;
    font-size: 17px;
    line-height: 1.3;
}

.vehicles-filter__clear {
    padding: 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: #aaa;
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

.vehicles-filter__clear:hover {
    color: var(--color-orange);
}

.vehicles-filter__group {
    margin-bottom: 8px;
}

.vehicles-filter__group:last-child {
    margin-bottom: 0;
}

.vehicles-filter__options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.vehicles-filter__option {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: #181818;
    font-family: var(--font-main);
    font-size: 17px;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.vehicles-filter__option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.vehicles-filter__check {
    position: relative;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    border: 1px solid #d4d4d4;
    border-radius: 5px;
    background-color: #fff;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.vehicles-filter__option input:checked
    + .vehicles-filter__check {
    border-color: var(--color-orange);
    background-color: var(--color-orange);
}

.vehicles-filter__option input:checked
    + .vehicles-filter__check::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 5px;
    width: 4px;
    height: 7px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.vehicles-filter__option input:focus-visible
    + .vehicles-filter__check {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}

.vehicles-filter__text {
    display: inline-block;
}

.vehicles-filter__count {
    white-space: nowrap;
}


/* =========================================================
   Rango de precios
========================================================= */

.vehicles-price {
    margin-top: 10px;
}

.vehicles-price__values {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 12px 0 15px;
    color: #111;
    font-family: var(--font-main);
    font-size: 17px;
    line-height: 1.2;
}

.vehicles-price__slider {
    --range-start: 0%;
    --range-end: 100%;

    position: relative;
    width: 100%;
    height: 22px;
}

.vehicles-price__track,
.vehicles-price__progress {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 6px;
    border-radius: 10px;
    transform: translateY(-50%);
}

.vehicles-price__track {
    background-color: #d6d6d6;
}

.vehicles-price__progress {
    left: var(--range-start);
    right: calc(100% - var(--range-end));
    background-color: var(--color-orange);
}

.vehicles-price__slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}

.vehicles-price__slider input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
}

.vehicles-price__slider input[type="range"]::-webkit-slider-thumb {
    width: 17px;
    height: 17px;
    margin-top: -6px;
    border: 2px solid #fff;
    border-radius: 50%;
    background-color: var(--color-orange);
    box-shadow: 0 0 0 1px #bbb;
    cursor: pointer;
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
}

.vehicles-price__slider input[type="range"]::-moz-range-track {
    height: 6px;
    background: transparent;
}

.vehicles-price__slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    background-color: var(--color-orange);
    box-shadow: 0 0 0 1px #bbb;
    cursor: pointer;
    pointer-events: auto;
}


/* =========================================================
   Resultados
========================================================= */

.vehicles-results {
    min-width: 0;
}

.vehicles-results__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 26px;
    transition: opacity 0.2s ease;
}

.vehicles-results__grid.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.vehicles-results__status {
    min-height: 24px;
    margin-top: 18px;
    color: #666;
    font-family: var(--font-main);
    font-size: 15px;
    text-align: center;
}

.vehicles-results__empty {
    grid-column: 1 / -1;
    padding: 55px 25px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    font-family: var(--font-main);
    font-size: 18px;
    text-align: center;
}


/* =========================================================
   Card
========================================================= */

.vehicle-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    background-color: #fff;
}

.vehicle-card__image-link {
    display: block;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    background-color: #eee;
}

.vehicle-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 1.28 / 1;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.vehicle-card:hover .vehicle-card__image {
    transform: scale(1.035);
}

.vehicle-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1.28 / 1;
    color: #777;
    font-family: var(--font-main);
}

.vehicle-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 18px 16px;
}

.vehicle-card__title {
    margin: 0;
    color: #090909;
    font-family: var(--font-main);
    font-size: clamp(18px, 1.35vw, 26px);
    font-weight: 600;
    line-height: 1.18;
    text-align: center;
}

.vehicle-card__title a {
    color: inherit;
    text-decoration: none;
}

.vehicle-card__specifications {
    margin-top: 18px;
    padding: 17px 12px;
    border-top: 1px solid #d7d7d7;
    border-bottom: 1px solid #d7d7d7;
}

.vehicle-card__specification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: #111;
    font-family: var(--font-main);
    font-size: clamp(15px, 1vw, 18px);
    font-weight: 500;
    line-height: 1.25;
}

.vehicle-card__km {
    color: var(--color-orange);
    text-align: right;
    white-space: nowrap;
}

.vehicle-card__price {
    margin: 23px 0;
    color: #090909;
    font-family: var(--font-main);
    font-size: clamp(20px, 1.55vw, 27px);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.vehicle-card__actions {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: auto;
}

.vehicle-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    padding: 12px 18px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-family: var(--font-main);
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.vehicle-card__button:hover {
    color: #fff;
    opacity: 0.88;
    transform: translateY(-1px);
}

.vehicle-card__button--information {
    background-color: var(--color-gray);
}

.vehicle-card__button--quote {
    background-color: var(--color-orange);
}


/* =========================================================
   Botón Ver más
========================================================= */

.vehicles-results__more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 280px);
    min-height: 48px;
    margin: 28px auto 0;
    padding: 12px 25px;
    border: 0;
    border-radius: 5px;
    background-color: var(--color-gray);
    color: #fff;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.vehicles-results__more:not(:disabled):hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.vehicles-results__more:disabled {
    background-color: #bdbdbb;
    color: #343434;
    cursor: not-allowed;
    opacity: 1;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1200px) {
    .vehicles__layout {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 25px;
    }

    .vehicles-results__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .vehicles {
        padding: 30px 0 55px;
    }

    .vehicles__layout {
        grid-template-columns: 1fr;
    }

    .vehicles-filter {
        width: 100%;
    }
}

@media (max-width: 580px) {
    .vehicles-results__grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .vehicles-filter {
        padding: 23px 20px 27px;
    }

    .vehicle-card__title {
        font-size: 23px;
    }

    .vehicle-card__specification {
        font-size: 17px;
    }

    .vehicle-card__price {
        font-size: 25px;
    }

    .vehicle-card__button {
        min-height: 54px;
        font-size: 17px;
    }
}

/* SINGLE */

/* =========================================================
   Nuevos ingresos
========================================================= */

.new-vehicles {
    padding: 65px 0 80px;
    background-color: #fff;
}

.new-vehicles__header {
    max-width: 950px;
    margin: 0 auto 42px;
    text-align: center;
}

.new-vehicles__title {
    margin: 0;
    color: var(--color-black);
    font-family: var(--font-header);
    font-size: clamp(35px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
}

.new-vehicles__subtitle {
    margin: 7px 0 0;
    color: var(--color-black);
    font-family: var(--font-main);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.4;
}

.new-vehicles__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 38px;
}

/*
 * Ajustes de las tarjetas únicamente
 * dentro de Nuevos ingresos.
 */
.new-vehicles .vehicle-card__title {
    font-size: clamp(18px, 1.3vw, 23px);
}

.new-vehicles .vehicle-card__body {
    padding: 17px 17px 15px;
}

.new-vehicles .vehicle-card__specifications {
    margin-top: 14px;
    padding: 13px 7px;
}

.new-vehicles .vehicle-card__specification {
    font-size: 15px;
}

.new-vehicles .vehicle-card__price {
    margin: 18px 0;
    font-size: clamp(22px, 2vw, 28px);
}

.new-vehicles .vehicle-card__button {
    min-height: 48px;
    font-size: 15px;
}

@media (max-width: 1200px) {
    .new-vehicles__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }
}

@media (max-width: 900px) {
    .new-vehicles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .new-vehicles {
        padding: 45px 0 60px;
    }

    .new-vehicles__header {
        margin-bottom: 30px;
    }

    .new-vehicles__grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}