.catalog-filter {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding-bottom: 0px; /* 48px высота кнопки + 40px отступы */
}

.catalog-filter.active {
    left: 0;
}

/* Заголовок фильтра */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

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

.filter-close {
    cursor: pointer;
    padding: 5px;
}

/* Стили для фильтра по цене */
.price-filter {
    margin-bottom: 15px;
    border-bottom: 1px solid #ececec;
    padding-bottom: 15px;
}

.price-filter .price-filter-title {
    padding: 10px 0;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.price-input {
    width: 50%;
    position: relative;
}

.price-input input {
    width: 100%;
    height: 40px;
    border: 1px solid #ececec;
    border-radius: 3px;
    padding: 0 15px;
    font-size: 14px;
    background: #f8f8f8;
}

/* Стили для range slider */
.price-range {
    position: relative;
    height: 2px;
    background: #ececec;
    margin: 0 10px;
}

.price-progress {
    position: absolute;
    height: 100%;
    background: #1d7656;
}

.range-input {
    position: relative;
}

.range-input input {
    position: absolute;
    width: 100%;
    height: 2px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #1d7656;
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
}

/* Стили для атрибутов */
.filter-attribute {
    margin-bottom: 15px;
    border-bottom: 1px solid #ececec;
    padding-bottom: 15px;
}

.filter-attribute-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.filter-attribute-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.filter-attribute-arrow {
    transition: transform 0.3s ease;
}

.filter-attribute-arrow svg {
    display: block;
}

/* Класс для открытого состояния */
.filter-attribute.active .filter-attribute-arrow {
    transform: rotate(180deg);
}

.filter-attribute-list {
    padding-top: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-checkbox input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid #ececec;
    border-radius: 2px;
    position: relative;
    background: #f8f8f8;
}

.filter-checkbox input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #1d7656;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 14px;
    color: #333;
}

/* Обновляем стили для кнопок фильтра */
.filter-buttons {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 20px 0 0;
    margin: 0 -30px;
    padding: 20px 30px;
    border-top: 1px solid #ececec;
}

/* Убираем кнопку сброса */
.filter-reset {
    display: none;
}

/* Обновляем стили для кнопки применения фильтра */
.filter-apply {
    width: 100%;
    height: 48px;
    background: #1d7656;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    font-weight: 500;
}

.filter-apply:hover {
    background: #165c43;
}

/* Затемнение фона */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
}

.filter-overlay.active {
    display: block;
}

/* Адаптивные стили */
@media (max-width: 480px) {
    .catalog-filter {
        width: 100%;
        left: -100%;
        padding-bottom: 0px; /* 48px высота кнопки + 30px отступы */
    }
    
    .filter-buttons {
        padding: 15px;

    }
}

.archive-products-content.loading {
    position: relative;
    min-height: 200px;
}

.archive-products-content.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.archive-products-content.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1d7656;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Стили для range слайдеров габаритов (глубина, ширина, высота) */
.dimension-filter {
    margin-bottom: 15px;
    border-bottom: 1px solid #ececec;
    padding-bottom: 15px;
}

.dimension-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.dimension-filter-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.dimension-filter.active .filter-attribute-arrow {
    transform: rotate(180deg);
}

.dimension-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.dimension-input {
    width: 50%;
    position: relative;
}

.dimension-input input {
    width: 100%;
    height: 40px;
    border: 1px solid #ececec;
    border-radius: 3px;
    padding: 0 15px;
    font-size: 14px;
    background: #f8f8f8;
}

.dimension-range {
    position: relative;
    height: 2px;
    background: #ececec;
    margin: 0 10px;
    margin-bottom: 20px;
}

.dimension-progress {
    position: absolute;
    height: 100%;
    background: #1d7656;
}

.dimension-range-input {
    position: relative;
    height: 16px;
    margin-bottom: 15px;
}

.dimension-range-input input {
    position: absolute;
    width: 100%;
    height: 2px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    top: 0;
}

.dimension-range-input input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #1d7656;
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
}

.dimension-range-input input[type="range"]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #1d7656;
    pointer-events: auto;
    cursor: pointer;
}

.dimension-range-input input[type="range"]::-ms-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #1d7656;
    pointer-events: auto;
    cursor: pointer;
}

/* Убираем стандартный вид слайдера для разных браузеров */
.dimension-range-input input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    height: 2px;
}

.dimension-range-input input[type="range"]::-moz-range-track {
    background: transparent;
    height: 2px;
}

.dimension-range-input input[type="range"]::-ms-track {
    background: transparent;
    height: 2px;
}

/* Стили для меток активных фильтров */
.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.active-filter-tag {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: #333;
    transition: all 0.3s;
}

.active-filter-tag .filter-name {
    font-weight: 500;
    margin-right: 5px;
}

.active-filter-tag .filter-value {
    margin-right: 8px;
}

.active-filter-tag .remove-filter {
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e0e0e0;
    transition: all 0.3s;
}

.active-filter-tag .remove-filter:hover {
    background-color: #d0d0d0;
}

.active-filter-tag .remove-filter svg {
    width: 10px;
    height: 10px;
    stroke: #666;
}

.active-filter-tag:hover {
    background-color: #eaeaea;
} 