/* filter.css */
.smart-filter {
    background: #F4EFEC;
    padding: 20px 60px 40px 60px;
    margin-bottom: 40px;
    border-radius: 28px;
    display: flex
;
    flex-direction: column;
    gap: 20px;
}

.main-filters {
    display: flex
;
    justify-content: space-between;
}

.filter-group {
    flex: 0 1 calc(50% - 10px);
}

.filter-group label {
    display: block;
    margin-bottom: 12px;
    color: #311D12;
    font-family: Wix Madefor Display;
    font-weight: 400;
    font-size: 15px;
    line-height: 120%;
}

.range-fields {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-fields input {
    padding: 15px 24px;
    border-radius: 16px;
    transition: all 0.3s;
    border: none;
    color: #311D1299;
    font-family: Wix Madefor Display;
    font-weight: 400;
    font-size: 15px;
    width: 100%;
    line-height: 120%;
}


/* Стили для табов */

.tabs-header {
    display: flex;
    flex-wrap: wrap;
   width:  100%;
}

.tab-header {
    padding: 15px 20px;
    background: white;
    cursor: pointer;
    color: #311D12;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
    border-bottom: none;
    font-family: Wix Madefor Display;
    font-weight: 400;
    font-size: 15px;
    flex: 1;
    text-align: center;
    line-height: 120%;
}
.tab-header:last-child{
    border-radius: 0 16px 16px 0 ;
}
.tab-header:first-child{
    border-radius: 16px 0 0 16px;
}

.tab-header:hover {
    color: #9C8068;
}

.tab-header.active {
    background: #311D12;
    color: white;
    z-index: 2;
    font-family: Wix Madefor Text;
    font-weight: 600;
    font-size: 15px;
    line-height: 120%;
}

.tab-badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    margin-left: 5px;
}

.tabs-content {
    position: relative;
    margin-top: 12px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    text-decoration: none;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s
    ease;
    color: #311D12;
    white-space: nowrap;
    font-family: Wix Madefor Display;
    font-weight: 400;
    font-size: 15px;
    line-height: 120%;
    padding: 13px 20px;
    border: 1px solid #F4EFEC;
}

.chip:hover {
    color: #9C8068;
}

.chip.active {
    background: none;
    color: #311D12;
    border: 1px solid #311D12;
    font-family: Wix Madefor Display;
    font-weight: 600;
    line-height: 135%;
}

.filter-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.filter-submit {
    background: #3498db;
    color: white;
}

.filter-submit:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.filter-reset {
    font-family: Raleway;
    font-weight: 500;
    font-size: 15px;
    line-height: 120%;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 0%;
    text-decoration-skip-ink: auto;
    width: fit-content;
    color: #311D1299;
    margin-left: auto;
}
.range-field {
    position: relative;
    width: 50%;

}

.range-field input {
    padding-right: 18px;
}
.range-field::after {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
    font-family: Arial, sans-serif;
    pointer-events: none;
}
.range-field[name_ld="square_total_min"]::after,
.range-field[name_ld="square_total_max"]::after {
    content: 'м²';
}
.range-field[name_ld="price_min"]::after,
.range-field[name_ld="price_max"]::after {
    content: '₽';
}
.filter-reset:hover {

    color: #311D12;

}
@media (max-width: 768px) {
    .smart-filter {
        padding: 16px 20px;
    }
    .main-filters {
        flex-direction: column;
        gap: 16px;
    }
    .chip,
    .tab-header,
    .range-fields input,
    .filter-group label {
        font-size: 14px;
    }
}


