.listing-sort {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.sort-label {
    margin-right: 15px;
    font-family: var(--font-subheading);
    color: var(--asphalt-black);
    font-size: 1rem;
}

.sort-select {
    width: 220px;
    border: 2px solid var(--chrome-silver);
    font-family: var(--font-subheading);
    padding: 8px 15px;
    cursor: pointer;
}

.sort-select:focus {
    border-color: var(--gasoline-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 95, 140, 0.1);
}

.listing-container {
    display: grid;
    gap: 25px;
}

.listing-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {

    .listing-item {
        flex-direction: row;
        min-height: 250px;
    }
    
    .listing-img-container {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .listing-details {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.listing-img-container {
    position: relative;
    overflow: hidden;
}

.listing-img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.listing-details {
    padding: 25px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.listing-details h3 {
    font-family: var(--font-heading);
    color: var(--gasoline-blue);
    margin: 0 0 15px 0;
    font-size: 1.6rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.listing-meta-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--asphalt-black);
    white-space: nowrap;
}

.listing-meta-item i {
    color: var(--racing-red);
    margin-right: 8px;
    font-size: 1.1rem;
}

.listing-price {
    font-family: var(--font-subheading);
    color: var(--racing-red);
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0 20px 0;
}

.btn-listing {
    margin-top: auto;
    align-self: flex-start;
    background-color: var(--racing-red);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-family: var(--font-subheading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-listing:hover {
    background-color: var(--gasoline-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 95, 140, 0.3);
}

/* Анимации */
.listing-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.listing-item:hover .listing-img {
    transform: scale(1.03);
}

/* ========== PAGINATION ========== */
.listing-pagination {
    margin-top: 50px;
}

.pagination {
    justify-content: center;
    gap: 8px;
}

.page-item .page-link {
    color: var(--asphalt-black);
    border: 2px solid var(--chrome-silver);
    border-radius: 4px;
    font-family: var(--font-subheading);
    min-width: 40px;
    text-align: center;
    transition: all 0.3s;
}

.page-item.active .page-link {
    background-color: var(--racing-red);
    border-color: var(--racing-red);
    color: white;
}

.page-item:not(.active) .page-link:hover {
    background-color: var(--leather-tan);
    border-color: var(--gasoline-blue);
    color: var(--racing-red);
}

/* ========== FILTER STYLES ========== */
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--chrome-silver);
    border-radius: 6px;
    font-family: var(--font-subheading);
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
}

.range-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.range-group {
    position: relative;
}

.range-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--asphalt-black);
    opacity: 0.8;
}

.range-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--chrome-silver);
    border-radius: 6px;
    font-family: var(--font-subheading);
    font-size: 0.9rem;
}

.range-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--chrome-silver);
    border-radius: 6px;
    font-family: var(--font-subheading);
    font-size: 0.9rem;
}

.price-slider-container {
    margin-top: 25px;
}

.price-slider {
    height: 6px;
    background: var(--chrome-silver);
    border-radius: 3px;
    margin-bottom: 10px;
    position: relative;
}

.price-slider .noUi-connect {
    background: var(--racing-red);
}

.price-slider .noUi-handle {
    width: 18px;
    height: 18px;
    right: -9px;
    top: -7px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--racing-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: grab;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--asphalt-black);
    opacity: 0.7;
}

.btn-apply {
    width: 100%;
    background-color: var(--racing-red);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-family: var(--font-subheading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-apply:hover {
    color: #ffffff;
    background-color: var(--gasoline-blue);
    transform: translateY(-2px);
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 991px) {
    
    .listing-title {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .listing-img-container {
        height: 300px;
    }
    
    .listing-details h3 {
        font-size: 1.4rem;
    }
    
    .listing-price {
        font-size: 1.6rem;
    }
    
    .sort-select {
        width: 180px;
    }
}

@media (max-width: 575px) {
    .price-inputs {
        grid-template-columns: 1fr;
    }
    
    .listing-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-listing {
        width: 100%;
        justify-content: center;
    }
}