.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;
}

/* Кастомный скроллбар */
.catalog-filter::-webkit-scrollbar {
  width: 6px;
}

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

.catalog-filter::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.catalog-filter::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.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;
  top: -2px;
}

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: 0px;
  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 0;
  border-top: 1px solid #ececec;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Обновляем стили для кнопки применения фильтра */
.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;
}

.filter-reset {
  width: 100%;
  height: 40px;
  background: transparent;
  color: #999;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 8px;
  transition: all 0.2s;
}

.filter-reset:hover {
  color: #333;
  border-color: #999;
  background: #f5f5f5;
}

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

  .filter-buttons {
    padding: 15px;
  }
}

.loading {
  margin-bottom: 20px;
}

.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: -9px;
}

.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: 8px 10px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  padding: 4px 8px 4px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
  transition: all 0.2s;
  white-space: nowrap;
}

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

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

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

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

.active-filter-tag .remove-filter:hover svg {
  stroke: #fff;
}

.active-filter-tag .remove-filter svg {
  width: 10px;
  height: 10px;
  stroke: #777;
  transition: stroke 0.2s;
}

.active-filter-tag:hover {
  background-color: #e5e5e5;
  border-color: #d5d5d5;
}

/* Стили для фильтров-слайдеров габаритов (используют классы price-*) */
/* Убедимся, что отступы согласованы */
.dimension-filter .filter-attribute-list {
  padding-top: 10px;
}

/* Дополнительные стили, если нужны специфичные для габаритов */
.dimension-filter .dimension-inputs {
  /* Если нужны отличия от .price-inputs */
}

.dimension-filter .dimension-range {
  /* Если нужны отличия от .price-range */
  margin-bottom: 0;
}

.dimension-filter .dimension-range-input {
  /* Если нужны отличия от .range-input */
  height: 16px;
  margin-bottom: 15px;
}

/* Плейсхолдер для слайдера (пока он не заменен JS) */
.dimension-slider-placeholder {
  min-height: 20px;
  /* Можно добавить анимацию загрузки */
}

/* ... (rest of the styles) ... */

/* Стили для меток активных фильтров (уже есть, просто проверим) */
.active-filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  padding: 4px 8px 4px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
  transition: all 0.2s;
  white-space: nowrap;
}

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

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

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

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

.active-filter-tag .remove-filter:hover svg {
  stroke: #fff;
}

.active-filter-tag .remove-filter svg {
  width: 10px;
  height: 10px;
  stroke: #777;
  transition: stroke 0.2s;
}

.active-filter-tag:hover {
  background-color: #e5e5e5;
  border-color: #d5d5d5;
}
