.home-available-autos-wrapper {
    margin: 0 auto;
}

.home-available-title {
    margin-bottom: 16px;
    font-size: 48px;
    line-height: 1.15;
    font-weight: 600;
}

.home-available-descr {
    max-width: 900px;
    margin: 0 0 40px;
    font-size: 16px;
    line-height: 1.5;
}

.available-tabs {
    display: inline-flex;
    justify-content: center;
    padding: 6px;
    border-radius: 40px;
    background-color: #fff;
}

.available-tab {
    padding: 12px 16px;
    border: 0;
    border-radius: 40px;
    outline: none;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease,
    color 0.2s ease;
}

.available-tab.active {
    background: #07a01d;
    color: #fff;
}

.available-fields {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0;
    padding: 32px;
    border-radius: 16px;
    background-color: #fff;
    font-size: 16px;
}

.available-fields > select {
    width: calc(25% - 12px);
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid #d8dce2;
    border-radius: 8px;
    outline: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23838B95' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    color: #1a1f29;
    font-size: 14px;
    font-weight: 400;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.available-fields > select:hover,
.price-range:hover {
    border-color: #c3c9d0;
}

.available-fields > select:focus {
    border-color: #00a33e;
    box-shadow: 0 0 0 3px rgba(0, 163, 62, 0.1);
}

.price-range {
    display: flex;
    align-items: center;
    width: calc(25% - 12px);
    height: 48px;
    overflow: hidden;
    border: 1px solid #d8dce2;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.price-range:focus-within {
    border-color: #00a33e;
    box-shadow: 0 0 0 3px rgba(0, 163, 62, 0.1);
}

.price-range input {
    width: 50%;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    outline: none;
    background: #fff;
    color: #1a1f29;
    font-size: 14px;
}

.price-range input:last-child {
    border-left: 1px solid #d8dce2;
}

.price-range input::placeholder {
    color: #838b95;
}

.available-sort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.sort-text {
    margin: 0;
    color: #7a7f86;
    font-size: 16px;
}

.sort-btn {
    min-height: 35px;
    padding: 8px 12px;
    border: 1px solid #c9ced6;
    border-radius: 8px;
    background: #fff;
    color: #8a8f96;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.sort-btn.active {
    border-color: #00a33e;
    background: transparent;
    color: #00a33e;
}

.sort-btn:hover {
    border-color: #00a33e;
    color: #00a33e;
}

/*
 * Сетка карточек.
 */
.available-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
}

/*
 * Обычная карточка автомобиля.
 */
.available-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 31, 41, 0.06);
}

.available-card[hidden] {
    display: none;
}

.available-card-image {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #f4f7fa;
}

.available-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.available-card:hover .available-card-image img {
    transform: scale(1.03);
}

.available-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #838b95;
    font-size: 13px;
}

.available-card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 20px 20px;
}

.available-card-title {
    margin: 0 0 8px;
    color: #1a1f29;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.available-card-payment {
    margin: 0 0 14px;
    color: #1a1f29;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 400;
}

.available-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.available-card-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 4px;
    background: #f4f7fa;
    color: #6f7782;
    font-size: 12px;
    line-height: 1.3;
}

.available-card-button {
    width: 100%;
    min-height: 54px;
    margin-top: auto;
    padding: 10px 15px;
    border: 1px solid #07a01d;
    border-radius: 8px;
    background: #fff;
    color: #07a01d;
    font-size: 18px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.available-card-button:hover {
    border-color: #07a01d;
    background: #07a01d;
    color: #fff;
}

/*
 * Последняя CTA-карточка.
 */
.available-card-contact {
    min-height: 100%;
    border: 1px solid #07a01d;
    background: #fff;
    box-shadow: none;
}

.available-card-contact-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 100%;
    padding: 24px 20px 20px;
}

.available-card-contact h3 {
    margin: 0 0 10px;
    color: #1a1f29;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 600;
}

.available-card-contact p {
    margin: 0 0 20px;
    color: #6f7782;
    font-size: 14px;
    line-height: 1.45;
}

.available-card-contact .available-contact-button {
    border-color: #07a01d;
    background: #07a01d;
    color: #fff;
}

.available-card-contact .available-contact-button:hover {
    border-color: #078a1b;
    background: #078a1b;
}

/*
 * Кнопка "Показать ещё".
 */
.available-more-wrapper {
    width: 100%;
    margin-top: 16px;
}

.available-more-wrapper[hidden] {
    display: none;
}

.available-more-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 10px 20px;
    border: 0;
    border-radius: 6px;
    background: rgba(7, 160, 29, 0.12);
    color: #07a01d;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease,
    color 0.2s ease;
}

.available-more-button:hover {
    background: rgba(7, 160, 29, 0.2);
}

.available-more-icon {
    font-size: 16px;
    line-height: 1;
}

/*
 * Сообщение при отсутствии результатов.
 */
.available-empty {
    display: none;
    margin: 24px 0 0;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    color: #6f7782;
    text-align: center;
}

.available-empty.visible {
    display: block;
}

/*
 * Планшеты.
 */
@media (max-width: 1024px) {
    .available-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .available-fields {
        flex-wrap: wrap;
    }

    .available-fields > select,
    .price-range {
        width: calc(50% - 8px);
    }
}

/*
 * Небольшие планшеты.
 */
@media (max-width: 768px) {
    .home-available-title {
        font-size: 38px;
    }

    .available-fields {
        padding: 24px;
    }

    .available-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .available-card-contact-info {
        min-height: 280px;
    }
}

/*
 * Телефоны.
 */
@media (max-width: 480px) {
    .home-available-title {
        font-size: 32px;
    }

    .home-available-descr {
        margin-bottom: 24px;
        font-size: 14px;
    }

    .available-tabs {
        width: 100%;
    }

    .available-tab {
        flex: 1;
    }

    .available-fields {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .available-fields > select,
    .price-range {
        width: 100%;
    }

    .available-sort {
        align-items: flex-start;
    }

    .sort-text {
        width: 100%;
    }

    .available-grid {
        grid-template-columns: 1fr;
    }

    .available-card-image {
        height: 220px;
    }

    .available-card-contact-info {
        min-height: 230px;
    }

    .available-more-button {
        min-height: 50px;
        font-size: 15px;
    }
}