/* Простые стили для мобильной панели фильтров */

/* Основные стили offcanvas */
#mobileFilters {
    max-width: 320px;
}

#mobileFilters .offcanvas-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

#mobileFilters .offcanvas-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

#mobileFilters .offcanvas-body {
    padding: 0;
}

/* Секции фильтров */
.filter-section {
    border-bottom: 1px solid #f8f9fa;
}

.filter-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-label-row:hover {
    background-color: #f8f9fa;
}

.filter-label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.chevron {
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.chevron.rotated {
    transform: rotate(90deg);
}

.filter-content {
    padding: 0 1.5rem 1rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Сворачиваемые секции */
.filter-section.collapsed .filter-content {
    display: none;
}

/* Кастомные чекбоксы */
.custom-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.custom-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 24px;
    height: 24px;
}

.custom-checkbox input[type="checkbox"]:checked {
    background-color: #2b4392;
    border-color: #2b4392;
}

.custom-checkbox span {
    color: #333;
    line-height: 1.4;
}

/* Размеры */
.size-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.size-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.size-checkbox:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.size-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 14px;
    height: 14px;
}

.size-checkbox input[type="checkbox"]:checked+span {
    color: #007bff;
    font-weight: 500;
}

/* Цвета */
.color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.color-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
}

.color-checkbox input[type="checkbox"] {
    display: none;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    position: relative;
}

.color-checkbox input[type="checkbox"]:checked+.color-circle {
    border-color: #007bff;
    transform: scale(1.1);
}

.color-checkbox input[type="checkbox"]:checked+.color-circle::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Переключатель */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #007bff;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Категории */
.category-group {
    margin-bottom: 1rem;
}

.category-header {
    margin-bottom: 0.5rem;
}

.category-toggle-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.category-arrow {
    transition: transform 0.2s ease;
}

.category-toggle-label:hover .category-arrow {
    color: #007bff;
}

.subcategories-filter {
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.subcategories-filter .custom-checkbox {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

/* Кнопки действий */
.filter-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

.filter-actions .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

/* Цена */
.price-values {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.price-value {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
}

/* Показать все размеры */
.show-all-sizes {
    color: #007bff;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 0.5rem;
}

.show-all-sizes:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 576px) {
    #mobileFilters {
        max-width: 100%;
    }

    .filter-label-row {
        padding: 1rem;
    }

    .filter-content {
        padding: 0 1rem 1rem;
    }

    .filter-actions {
        padding: 1rem;
    }
}