/* Новый фильтр - горизонтальная строка */

.filter-new-container {
    margin-top: 50px;
}

.filter-new-line {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

/* Итем фильтра (селект) */
.filter-new-item {
    position: relative;
}

.filter-new-item-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 14px;
    background-color: rgb(246, 246, 246);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-new-item-trigger:hover {
    background-color: #e9ecef;
}

.filter-new-item.active .filter-new-item-trigger {
    background-color: #e9ecef;
}

.filter-new-item-trigger .filter-icon {
    display: flex;
    align-items: center;
    width: 15px;
    height: 16px;
}

.filter-new-item-trigger .filter-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.filter-new-item-trigger .filter-text {
    font-size: 16px;
    font-weight: 600;
    color: rgb(68, 68, 68);
    white-space: nowrap;
}

.filter-new-item-trigger .filter-arrow {
    display: flex;
    align-items: center;
    width: 21px;
    height: 11px;
    transition: transform 0.2s ease;
    position: relative;
    top: 1px;
}

.filter-new-item-trigger .filter-arrow img {
    width: 100%;
    height: 100%;
    display: block;
}

.filter-new-item.active .filter-new-item-trigger .filter-arrow {
    transform: rotate(180deg);
}

/* Выпадающий блок */
.filter-new-item-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-new-item.active .filter-new-item-dropdown {
    display: block;
}

.filter-new-item-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Кастомные radio кнопки (из старого фильтра) */
.filter-new-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}


.filter-new-radio-input {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.filter-new-radio-input input[type="radio"] {
    display: none;
}

.filter-new-radio-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    z-index: 10;
    border: 3px solid #d8d8d8;
    transition: border-color 0.2s ease;
}

.filter-new-radio-input input[type="radio"]:checked ~ .filter-new-radio-inner {
    border: 5px solid #4579ae;
}

.filter-new-radio-text {
    padding-left: 12px;
    font-size: 16px;
    color: #444444;
    white-space: nowrap;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-new-line {
        gap: 8px;
    }
    
    .filter-new-item-trigger {
        padding: 10px 14px;
        gap: 8px;
    }
    
    .filter-new-item-trigger .filter-text {
        font-size: 14px;
    }
    
    .filter-new-item-trigger .filter-icon {
        width: 18px;
        height: 18px;
    }
    
    .filter-new-item-dropdown {
        left: 0;
        right: 0;
        min-width: auto;
        width: 100%;
    }
    
    .filter-new-radio-text {
        font-size: 14px;
    }
}

/* Фильтр по цене */


.filter-new-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-new-price-input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    font-size: 16px;
    color: #444444;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    text-align: center;
    width: 100px;

}

.filter-new-price-input:focus {
    outline: none;
    border-color: #4579ae;
}

.filter-new-price-separator {
    font-size: 16px;
    color: #444444;
    font-weight: 500;
}

.filter-new-price-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.filter-new-price-apply,
.filter-new-price-reset {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-new-price-apply {
    color: #fff;
    background-color: #4579ae;
}

.filter-new-price-apply:hover {
    background-color: #3a6690;
}

.filter-new-price-apply:active {
    background-color: #2f5275;
}

.filter-new-price-reset {
    color: #444444;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

.filter-new-price-reset:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.filter-new-price-reset:active {
    background-color: #dee2e6;
}

/* Badge для чекбоксов */
.filter-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background-color: #4579ae;
    border-radius: 12px;
}

/* Стили для характеристик */
.filter-new-char-search {
    margin-bottom: 15px;
}

.filter-new-char-search-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 16px;
    color: #444444;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.filter-new-char-search-input:focus {
    outline: none;
    border-color: #4579ae;
}

.filter-new-char-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-new-char-list-hidden {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    margin-top: 0; /* Убираем отступ сверху */
}

.filter-new-char-show-all {
    display: block;
    text-align: left;
    padding: 10px;
    padding-left: 0;
    font-size: 16px;
    color: #4579ae;
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.filter-new-char-show-all:hover {
    color: #3a6690;
    text-decoration: underline;
}

/* Кастомные чекбоксы (стили из старого фильтра) */
.filter-new-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.filter-new-checkbox-input {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-new-checkbox-input input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.filter-new-checkbox-inner {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s ease;
    position: relative;
}

.filter-new-checkbox-input input[type="checkbox"]:checked + .filter-new-checkbox-inner {
    background-color: #4579ae;
    border-color: #4579ae;
}

.filter-new-checkbox-input input[type="checkbox"]:checked + .filter-new-checkbox-inner::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-new-checkbox-text {
    font-size: 16px;
    color: #444444;
}

/* Кнопки для характеристик */
.filter-new-char-text-apply,
.filter-new-char-checkbox-apply,
.filter-new-char-reset {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-new-char-text-apply,
.filter-new-char-checkbox-apply {
    color: #fff;
    background-color: #4579ae;
}

.filter-new-char-text-apply:hover,
.filter-new-char-checkbox-apply:hover {
    background-color: #3a6690;
}

.filter-new-char-text-apply:active,
.filter-new-char-checkbox-apply:active {
    background-color: #2f5275;
}

.filter-new-char-reset {
    color: #444444;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

.filter-new-char-reset:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.filter-new-char-reset:active {
    background-color: #dee2e6;
}

/* Анимация появления */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-new-item.active .filter-new-item-dropdown {
    animation: fadeInDown 0.2s ease;
}

/* ========================================
   КНОПКА "ВСЕ ФИЛЬТРЫ"
   ======================================== */

.filter-all-filters-btn {
    cursor: pointer;
}


.filter-all-filters-btn .filter-new-item-trigger {
    position: relative;
    background-color: rgb(50, 69, 84);
    color:#fff;
}
.filter-all-filters-btn .filter-new-item-trigger .filter-text{
    color:#fff;
}
.filter-all-filters-loader {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

/* ========================================
   МОДАЛКА "ВСЕ ФИЛЬТРЫ"
   ======================================== */

#filterModal .modal-dialog {
    max-width: 1200px;
}

#filterModal .modal-content {
    border-radius: 22px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 44px;
}

#filterModal .modal-body {
    padding: 0;
}

/* Кнопка закрытия */
.filter-modal-content {
    position: relative;
}

#filterModal .custom-modal-close1 {
    position: absolute;
    top: -30px;
    right: -26px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}


.custom-modal-close1 a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-close1 img {
    width: 16px;
    height: 16px;
    display: block;
}

/* Шапка модалки */
.filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
}

.filter-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.filter-modal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-modal-search {
    width: 250px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.filter-modal-search:focus {
    outline: none;
    border-color: #4579ae;
}

.filter-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-modal-clear {
    color: #444444;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

.filter-modal-clear:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.filter-modal-clear:active {
    background-color: #dee2e6;
}

.filter-modal-apply {
    color: #fff;
    background-color: #4579ae;
    border: 2px solid #4579ae;
}

.filter-modal-apply:hover {
    background-color: #2f5275;
    border-color: #2f5275;
}

.filter-modal-apply:active {
    background-color: #2f5275;
}

/* Тело модалки */
.filter-modal-body {
    padding: 20px 0;
    max-height: 70vh;
    overflow-y: auto;
    margin-top: 20px;
}

/* Мобильный футер скрыт на десктопе */
.filter-modal-footer-mobile {
    display: none;
}

/* Колонки */
.filter-modal-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.filter-modal-column {
    display: flex;
    flex-direction: column;
    background-color: rgb(246, 246, 246);
    min-width: 0;
    border-radius: 12px;
    padding: 12px 16px;
}

/* Итем фильтра (аккордеон) - как в filter-new-item */
.filter-modal-item {
    overflow: hidden;
    transition: all 0.2s ease;
    border-top: 1px solid rgb(224 224 224);
}

/* Убираем border у первого видимого элемента */
.filter-modal-item.first-visible {
    border-top: none !important;
}




.filter-modal-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    padding: 14px 0;
}

.filter-modal-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #444444;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}
.filter-modal-item-header:hover .filter-modal-item-title{
    color: #4579ae;
}

.filter-modal-item-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 11px;
    transition: transform 0.2s ease;
}

.filter-modal-item-toggle img {
    width: 100%;
    height: 100%;
    display: block;
}

.filter-modal-item-content {
    padding: 0 0 12px 0;
}

/* Группы элементов в модалке */
.filter-modal-radio-group,
.filter-modal-char-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Радио кнопки в модалке (ТОЧНО как в filter-new) */
.filter-modal-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}


.filter-modal-radio-input {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.filter-modal-radio-input input[type="radio"] {
    display: none;
}

.filter-modal-radio-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    z-index: 10;
    border: 3px solid #d8d8d8;
    transition: border-color 0.2s ease;
}

.filter-modal-radio-input input[type="radio"]:checked ~ .filter-modal-radio-inner {
    border: 5px solid #4579ae;
}

.filter-modal-radio-text {
    padding-left: 12px;
    font-size: 16px;
    color: #444444;
    white-space: nowrap;
}

/* Чекбоксы в модалке (ТОЧНО как в filter-new) */
.filter-modal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    margin: 0;
}

.filter-modal-checkbox-input {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal-checkbox-input input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.filter-modal-checkbox-inner {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s ease;
    position: relative;
}

.filter-modal-checkbox-input input[type="checkbox"]:checked + .filter-modal-checkbox-inner {
    background-color: #4579ae;
    border-color: #4579ae;
}

.filter-modal-checkbox-input input[type="checkbox"]:checked + .filter-modal-checkbox-inner::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-modal-checkbox-text {
    font-size: 16px;
    color: #444444;
}

/* Кнопка "Показать все" в модалке */
.filter-modal-char-show-all {
    display: block;
    text-align: left;
    padding: 10px 0;
    font-size: 14px;
    color: #4579ae;
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s ease;
    font-weight: bold;
}

.filter-modal-char-show-all:hover {
    color: #3a6690;
}

/* Поиск в модалке */
.filter-modal-char-search {
    margin-bottom: 12px;
}

.filter-modal-char-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    background-color: transparent;
}

.filter-modal-char-search-input:focus {
    outline: none;
    border-color: #4579ae;
}

/* Диапазоны (цена, текстовые) в модалке */
.filter-item-price-range,
.filter-item-text-range {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.filter-item-price-range span,
.filter-item-text-range span {
    color: #666;
    font-size: 14px;
}

.filter-price-input,
.filter-text-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-modal-item .filter-price-input,
.filter-modal-item .filter-text-input{
    background-color: transparent;
}

.filter-price-input:hover,
.filter-text-input:hover {
    border-color: #adb5bd;
}

.filter-price-input:focus,
.filter-text-input:focus {
    outline: none;
    border-color: #4579ae;
}

/* ========================================
   BOTTOM SHEET ДЛЯ МОБИЛЬНЫХ ФИЛЬТРОВ
   ======================================== */

.filter-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Fallback для старых браузеров */
    height: 100dvh; /* Dynamic viewport height для iOS Safari */
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.filter-bottom-sheet.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

.filter-bottom-sheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.filter-bottom-sheet-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 90vh; /* Fallback для старых браузеров */
    max-height: 90dvh; /* Dynamic viewport height для iOS Safari */
    min-height: 33vh;
    min-height: 33dvh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.filter-bottom-sheet.active .filter-bottom-sheet-content {
    transform: translateY(0);
}

/* Полноэкранный режим (при "Показать все") */
.filter-bottom-sheet.fullscreen .filter-bottom-sheet-content {
    max-height: 100vh; /* Fallback для старых браузеров */
    max-height: 100dvh; /* Dynamic viewport height для iOS Safari */
    border-radius: 0;
}

/* Шапка */
.filter-bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.filter-bottom-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: #444444;
    margin: 0;
}

.filter-bottom-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.filter-bottom-sheet-close:hover {
    color: #333;
}

/* Тело */
.filter-bottom-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Футер с кнопкой */
.filter-bottom-sheet-footer {
    padding: 12px 20px;
    border-top: 1px solid #dee2e6;
    background-color: #fff;
    flex-shrink: 0;
}

.filter-bottom-sheet-apply {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #4579ae;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-bottom-sheet-apply:hover {
    background-color: #2f5275;
}

/* Контент внутри bottom sheet */
.filter-bottom-sheet-body .filter-new-radio-group,
.filter-bottom-sheet-body .filter-new-char-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-bottom-sheet-body .filter-new-radio-label,
.filter-bottom-sheet-body .filter-new-char-label {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding-left: 0;
    padding-right: 0;
}

.filter-bottom-sheet-body .filter-new-radio-label:hover{
    background-color: transparent;
}

.filter-bottom-sheet-body input[type="radio"]:checked + .filter-new-radio-label,
.filter-bottom-sheet-body input[type="checkbox"]:checked + .filter-new-char-label {
    background-color: #e3f2fd;
    border-color: #4579ae;
    color: #4579ae;
    font-weight: 600;
}

/* Кнопка "Показать все" */
.filter-bottom-sheet-body .filter-new-show-all {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    font-size: 14px;
    color: #4579ae;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* Диапазоны (цена, текстовые характеристики) */
.filter-bottom-sheet-body .filter-new-price-range,
.filter-bottom-sheet-body .filter-new-char-text-range,
.filter-bottom-sheet-body .filter-new-price-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-bottom-sheet-body .filter-new-price-separator {
    color: #666;
    font-size: 16px;
}

.filter-bottom-sheet-body .filter-new-price-input,
.filter-bottom-sheet-body .filter-new-char-text-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.filter-bottom-sheet-body .filter-new-price-input:focus,
.filter-bottom-sheet-body .filter-new-char-text-input:focus {
    outline: none;
    border-color: #4579ae;
}

/* Кнопки в диапазонах */
.filter-bottom-sheet-body .filter-new-price-buttons {
    display: none; /* Скрываем кнопки "Сбросить" и "Применить" внутри, используем общую кнопку внизу */
}

/* Адаптивность */
@media (max-width: 1280px) {
    #filterModal .modal-content{
        padding: 45px 20px;
        border-radius: 22px;
    }
    #filterModal .modal-dialog{
        padding-left: 15px;
        padding-right: 15px;
    }
    #filterModal .custom-modal-close1{
        top: -30px;
        right: 2px;
    }
}
@media (min-width: 769px) and (max-width: 992px) {
    .filter-modal-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .filter-new-line {
        margin-left: -15px;
        margin-right: -15px;
        flex-wrap: nowrap;
        padding-left: 15px;
        padding-right: 15px;
        overflow: auto;
    }
    .filter-new-line::-webkit-scrollbar-track {
        display: none;
    }

    .filter-new-line::-webkit-scrollbar-thumb {
        display: none;
    }
    .filter-new-line::-webkit-scrollbar {
        display: none;
    }
    .filter-new-item-trigger .filter-text{
        font-size: 12px;
    }
    .filter-new-item-trigger{
        height: 35px;
    }
}

@media (max-width: 768px) {
    /* Модалка на весь экран */
    #filterModal .modal-dialog {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        margin: 0;
        padding: 0;
    }
    
    #filterModal .modal-content {
        height: 100vh;
        border-radius: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Скрываем стандартную кнопку закрытия */
    #filterModal .custom-modal-close1 {
        top: 25px;
        right: 20px;
        z-index: 1000;
        position: fixed;
    }
    
    /* Шапка - fixed сверху */
    .filter-modal-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background-color: #fff;
        padding: 16px 20px;
        border-bottom: 1px solid #dee2e6;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-shrink: 0;
        flex-wrap: wrap;
    }
    
    .filter-modal-title {
        font-size: 18px;
        font-weight: 600;
        margin: 0;
    }
    
    /* Кнопка "Очистить" в шапке */
    .filter-modal-controls {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0;
        width: auto;
        flex-wrap: wrap;
        margin-right: 40px;
    }
    
    .filter-modal-clear {
        padding: 8px 16px;
        font-size: 14px;
        order: 1;
    }
    
    /* Скрываем кнопку "Применить" из шапки */
    .filter-modal-controls .filter-modal-apply {
        display: none;
    }
    
    /* Поиск - перемещается в body через JS */
    .filter-modal-body > .filter-modal-search {
        width: 100%;
        margin: 0 0 16px 0;
        padding: 10px 16px;
        font-size: 14px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    /* Контент - скроллится */
    .filter-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px 20px 80px 20px;
        max-height: none;
        background-color: #fff;
        margin-top: 0;
    }
    
    .filter-modal-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .filter-modal-column {
        padding: 0;
        background-color: transparent;
        border-radius: 0;
    }
    
    /* Уменьшаем элементы */
    .filter-modal-item-header {
        padding: 12px 0;
    }
    
    .filter-modal-item-title {
        font-size: 15px;
    }
    
    .filter-modal-radio-label,
    .filter-modal-char-label {
        padding: 8px 0;
        font-size: 14px;
    }
    
    .filter-price-input,
    .filter-text-input {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    /* Футер с кнопкой "Применить" - fixed снизу */
    .filter-modal-footer-mobile {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        border-top: 1px solid #dee2e6;
        padding: 12px 20px;
        z-index: 101;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .filter-modal-apply-mobile {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 600;
    }
    
    /* Фильтр А - мобильная версия */
    .filter-all-filters-btn .filter-new-item-trigger .filter-text {
        display: none !important;
    }
    
    .filter-new-item[data-filter-type="sort"] .filter-text,
    .filter-new-item[data-filter-type="sort"] .filter-arrow {
        display: none;
    }
    
    .filter-new-item-trigger {
        border-radius: 8px;
        padding: 0 9px;
        height: 30px;
    }
    
    .filter-new-item-trigger .filter-arrow {
        width: 14px;
        height: auto;
    }
    
    .filter-new-container {
        margin-top: 30px;
    }
    
    .filter-new-item-trigger .filter-icon {
        width: 12px;
        height: auto;
    }
    
    .filter-new-line {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .filter-new-badge{
        min-width: 14px;
        height: 14px;
        padding: 0 5px;
        font-size: 9px;
        position: relative;
        top: 1px;
    }
    .razdel_cat_main_box_content_list1 .alert{
        margin-top: 20px;
        font-size: 14px;
        margin-left: -5px;
        margin-right: -5px;
        width: calc(100% + 10px);
    }
}

/* Блок "Ничего не найдено" в модалке */
.filter-modal-no-results {
    display: none;
    padding: 60px 20px;
    text-align: center;
}

.filter-modal-no-results-content {
    max-width: 300px;
    margin: 0 auto;
}

.filter-modal-no-results-content svg {
    color: #cbd5e0;
    margin-bottom: 20px;
}

.filter-modal-no-results-content p {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
}

.filter-modal-no-results-content span {
    font-size: 14px;
    color: #718096;
    display: block;
}
