/* ===== РАСШИРЕННЫЙ ПОИСК КАК У AVITO ===== */
.advanced-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.advanced-modal.active {
    display: flex;
}

.advanced-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* Категории недвижимости */
.avito-categories {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 0;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) #f0f0f0;
}

.avito-categories::-webkit-scrollbar {
    height: 4px;
}

.avito-categories::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.avito-categories::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 2px;
}

.avito-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
    border: 2px solid transparent;
}

.avito-category.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.avito-category i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.avito-category span {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Вторичка/Новостройка */
.avito-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.avito-type-selector.show {
    display: flex;
}

.type-option {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.type-option.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Контейнер фильтров */
.avito-filters-container {
    margin-bottom: 20px;
}

/* Группы фильтров */
.filter-section-avito {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-section-avito:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title-avito {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Чекбокс-группы */
.checkbox-group-avito {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.checkbox-item-avito {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.checkbox-item-avito:hover {
    background: #e9ecef;
}

.checkbox-item-avito input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item-avito label {
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

/* Радио-группы */
.radio-group-avito {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-item-avito {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.radio-item-avito:hover {
    background: #e9ecef;
}

.radio-item-avito input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Диапазонные поля */
.range-group-avito {
    margin-bottom: 15px;
}

.range-inputs-avito {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-input-wrapper-avito {
    flex: 1;
}

.range-input-avito {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.range-divider-avito {
    color: #666;
    font-weight: bold;
}

.range-unit-avito {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    margin-left: 5px;
}

/* Кнопка Показать ещё */
.avito-show-more {
    text-align: center;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#showMoreBtn {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: var(--secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

#showMoreBtn:hover {
    background: #e9ecef;
}

/* Скрытые дополнительные фильтры */
.extra-filters {
    display: none;
    animation: fadeIn 0.3s ease;
}

.extra-filters.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Кнопка применения */
.avito-apply {
    text-align: center;
    margin-top: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}