/* Фронтенд стили фильтра - СЛЕВА */

.ridea-product-filter {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

/* ДЕСКТОП - фильтр слева */
@media (min-width: 769px) {
    .ridea-product-filter {
        float: left;
        width: 280px;
        margin-right: 30px;
        position: sticky;
        top: 20px;
    }
    
    /* Контейнер с товарами */
    .woocommerce .products {
        overflow: hidden;
    }
    
    /* Принудительная очистка после фильтра */
    .ridea-product-filter + * {
        clear: none !important;
    }
}

/* МОБИЛКА - фильтр сверху */
@media (max-width: 768px) {
    .ridea-product-filter {
        width: 100%;
        position: static;
    }
}

.ridea-filter-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.ridea-filter-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.ridea-filter-reset {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    width: 100%;
    margin-top: 10px;
}

.ridea-filter-reset:hover {
    background: #c82333;
}

/* Группы фильтров */
.ridea-filter-groups {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.ridea-filter-group {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
}

.ridea-filter-group.active {
    border-color: #0073aa;
    background: #e7f5fe;
}

.ridea-filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f5f5f5;
    cursor: pointer;
    user-select: none;
}

.ridea-filter-group.active .ridea-filter-group-header {
    background: #0073aa;
    color: white;
}

.ridea-filter-group-header:hover {
    background: #ebebeb;
}

.ridea-filter-group.active .ridea-filter-group-header:hover {
    background: #005a87;
}

.ridea-filter-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0;
    cursor: pointer;
}

.ridea-filter-group.active .ridea-filter-label {
    color: white;
}

.ridea-filter-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s;
    color: #666;
}

.ridea-filter-group.active .ridea-filter-toggle {
    color: white;
}

.ridea-filter-group.collapsed .ridea-filter-toggle {
    transform: rotate(-90deg);
}

.ridea-filter-group-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
}

.ridea-filter-group.collapsed .ridea-filter-group-content {
    display: none;
}

/* Выпадающий список */
.ridea-filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.ridea-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Чекбоксы */
.ridea-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ridea-checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.ridea-checkbox-label:hover {
    background: #f5f5f5;
}

.ridea-filter-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    color: #333;
    gap: 8px;
}

.checkbox-count {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

/* Радиокнопки */
.ridea-filter-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ridea-radio-label {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.ridea-radio-label:hover {
    background: #f5f5f5;
}

.ridea-filter-radio {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-text {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    color: #333;
    gap: 8px;
}

.radio-count {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

/* Диапазон */
.ridea-filter-range {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ridea-range-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ridea-range-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.range-separator {
    color: #999;
    font-weight: bold;
}

.range-info {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* Кнопки действий */
.ridea-filter-actions {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.ridea-filter-submit {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.ridea-filter-submit:hover {
    background: #005a87;
}

/* Скроллбар */
.ridea-filter-group-content::-webkit-scrollbar {
    width: 6px;
}

.ridea-filter-group-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ridea-filter-group-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.ridea-filter-group-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}