/* Настройка фильтра */
/* ----------------- Общие стили для фильтра ----------------- */

.custom-woo-filter-form { 
    background: #FFFFFF; 
    padding: 0; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    border: 1px solid #EAEAEA; 
}

.filter-section { 
    margin-bottom: 0; 
    border-bottom: 1px solid #EEEEEE; 
    padding: 15px 15px 0; 
}

.filter-section:last-of-type { 
    border-bottom: none; 
}

.filter-title { 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin: 0; 
    padding-bottom: 15px; 
    font-size: 16px; 
    font-weight: 600; 
    color: #333333; 
    position: relative; 
}

/* Иконка "плюс/минус" */
.filter-title:after { 
    content: '+'; 
	position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-70%);
    font-size: 18px; 
    color: #000; 
    font-weight: 300; 
    transition: transform 0.3s; 
}

.filter-section.open .filter-title:after { 
    content: '-'; 
    transform: rotate(0deg); 
	transform: translateY(-70%); /* Сохраняем вертикальное центрирование */
} 

/* Скрытие/появление контента */
.filter-content { 
    max-height: 0; 
    overflow: hidden; 
    padding-bottom: 0; 
    transition: max-height 0.3s ease-out, padding-bottom 0.3s ease-out; 
}

.filter-section.open .filter-content { 
    max-height: 200px; /* Фиксированная высота для скролла */
    overflow-y: auto; 
    padding-bottom: 15px; 
}

/* Стили для чекбоксов атрибутов */
.checkbox-label { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
    font-size: 14px; 
    color: #555555; 
    cursor: pointer; 
}

.checkbox-label input[type="checkbox"] { 
    margin-right: 8px; 
    cursor: pointer !important;
}

.term-count { 
    color: #999999; 
    font-size: 12px; 
}

/* Состояние "Disabled" */
.checkbox-label.disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
}

/* === СТИЛИ ДЛЯ ФИЛЬТРА ЦЕНЫ (СЛАЙДЕР) === */
.filter-price .price-content { 
    display: block; 
    padding-bottom: 15px;
}

/* 1. Стили для контейнера слайдера и дорожки */
#price-slider-range {
    margin: 20px 0 10px 0;
    height: 4px; 
    background: #EEEEEE; 
    border: none;
    border-radius: 2px;
}

/* 2. Стили для заполненной части (range) */
#price-slider-range .ui-slider-range {
    background: #CF3B15; /* Активный цвет (WooCommerce Blue) */
    height: 100%;
    border-radius: 2px;
}

/* 3. Стили для ползунков (handles) */
#price-slider-range .ui-slider-handle {
    width: 16px; 
    height: 16px; 
    border: 2px solid #CF3B15; /* Цвет рамки */
    background: #FFFFFF; 
    border-radius: 50%;
    cursor: grab;
    top: -6px; 
    margin-left: -8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15); 
    transition: background-color 0.2s, box-shadow 0.2s;
    outline: none;
}
#price-slider-range .ui-slider-handle:hover {
    background: #F0F0F0;
}

/* ----- Моб версия ползунка цены ---- */

/* 1. Стили для контейнера слайдера и дорожки */
#mob-price-slider-range {
    margin: 20px 0 10px 0;
    height: 4px; 
    background: #EEEEEE; 
    border: none;
    border-radius: 2px;
}

/* 2. Стили для заполненной части (range) */
#mob-price-slider-range .ui-slider-range {
    background: #CF3B15; /* Активный цвет (WooCommerce Blue) */
    height: 100%;
    border-radius: 2px;
}

/* 3. Стили для ползунков (handles) */
#mob-price-slider-range .ui-slider-handle {
    width: 16px; 
    height: 16px; 
    border: 2px solid #CF3B15; /* Цвет рамки */
    background: #FFFFFF; 
    border-radius: 50%;
    cursor: grab;
    top: -6px; 
    margin-left: -8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15); 
    transition: background-color 0.2s, box-shadow 0.2s;
    outline: none;
}
#mob-price-slider-range .ui-slider-handle:hover {
    background: #F0F0F0;
}

/* 4. Стили для полей ввода цены */
.price-inputs-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}
.price-input-label { 
    display: flex; 
    align-items: center; 
    width: 50%; 
    font-size: 14px; 
    color: #333; 
    font-weight: 500;
}
.filter-price input[type="number"] { 
    width: 100%; 
    padding: 8px 10px; 
    border: 1px solid #DDDDDD; 
    border-radius: 4px; 
    margin-left: 8px; 
    box-sizing: border-box; 
    text-align: right;
    font-size: 14px;
}

/* ----------------- Стили для кнопок (действия) ----------------- */
.filter-actions { 
    padding: 15px; 
    display: flex; 
    justify-content: space-between; 
    gap: 10px; 
    border-top: 1px solid #EEEEEE; 
}

.apply-filter-btn { 
    flex-grow: 1; 
    background-color: #CF3B15; 
    color: white; 
    border: none; 
    padding: 10px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 600; 
    transition: background-color 0.2s; 
}
.apply-filter-btn:hover { 
    background-color: #CF3B15; 
}

.reset-filter { 
    background-color: transparent; 
    color: #888888; 
    border: 1px solid #CCCCCC; 
    padding: 10px; 
    border-radius: 4px; 
    text-decoration: none; 
    text-align: center; 
    flex-grow: 1; 
    font-size: 14px; 
    transition: border-color 0.2s, color 0.2s; 
}
.reset-filter:hover { 
    border-color: #555555; 
    color: #555555; 
}


/* --- Стили для аккордеона (выпадающий список) --- */

.custom-woo-filter-form .filter-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.custom-woo-filter-form .filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.custom-woo-filter-form .filter-section h4 {
    margin: 0;
    padding-right: 25px;
    position: relative;
    font-size: 16px;
    line-height: 1.5;
}

/* Иконка + / - 
.custom-woo-filter-form .filter-section h4:after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: transform 0.3s;
} */

/* Если секция открыта 
.custom-woo-filter-form .filter-section:not(.cwf-collapsed) h4:after {
    content: '-';
    transform: translateY(-50%); /* Сохраняем вертикальное центрирование 
}   */

/* Ограничение по высоте и прокрутка */
.custom-woo-filter-form .filter-section .cwf-content-wrap {
    max-height: 160px; /* Ваш желаемый предел */
    overflow-y: auto;
    padding-right: 15px; /* Для отступа прокрутки */
    padding-top: 5px;
}


/* ------------------------------------------------ */
/* СТИЛИ ПАГИНАЦИИ */
/* ------------------------------------------------ */
.custom-pagination {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 6px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.custom-pagination .page-link,
.custom-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ddd;
    color: #333;
    background-color: #fff;
    transition: all 0.2s ease;
    user-select: none;
}

/* При наведении */
.custom-pagination .page-link:hover {
    background-color: #CF3B15;
    border-color: #CF3B15;
    color: #fff;
}

/* Активная страница */
.custom-pagination .page-numbers.current {
    background-color: #CF3B15;
    border-color: #CF3B15;
    color: #fff;
    cursor: default;
}

/* Кнопки "вперед" и "назад" */
.custom-pagination .page-link.prev,
.custom-pagination .page-link.next {
    font-size: 18px;
    line-height: 1;
    padding-top: 1px;
    width: 38px;
    height: 38px;
}

/* Убираем выделение */
.custom-pagination .page-link:focus,
.custom-pagination .page-link:active {
    outline: none;
    box-shadow: none;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .custom-pagination .page-link,
    .custom-pagination .page-numbers {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* ---Результаты фильтра карточки товаров--- */

/* По умолчанию: 3 колонки (для планшетов и десктопов) */
.custom-woo-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Настройки для мобильных устройств (менее 768px) */
@media (max-width: 767px) {
    .custom-woo-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 колонки на мобильных */
        gap: 15px !important; /* Можно уменьшить отступы на мобильных */
    }
}

/* Сортировка товаров в каталоге */

    .cwf-sorting {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
    }
    .cwf-sorting select {
        padding: 5px 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
			  font-size: 14px;
    }