/* Ваш колір */
:root {
  --primary-color: #cadbcd;
  --text-color: #333;
  --border-color: #ddd;
  --bg-color: #ffffff;
  --slider-track-color: #f0f0f0;
}

.filter-sidebar {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  border-radius: 12px;
  padding: 24px;
  max-width: 320px; /* Або 100% на мобільному */
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: var(--text-color);
}

.sidebar__section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.sidebar__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  border: none !important;
}

/* --- Стилі для Чекбоксів --- */
.size__list {
  margin-top: 16px;
}

.filter-label {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  width: fit-content;
}

.filter-label:hover .checkmark {
  border-color: #adbece;
}

/* Ховаємо оригінальний чекбокс */
.filter-label .control {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Створюємо кастомний */
.checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  background-color: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
}

/* Стиль при виборі */
.filter-label .control:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* "Галочка" всередині */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Показати "галочку" при виборі */
.filter-label .control:checked ~ .checkmark:after {
  display: block;
}

/* --- Стилі для Range Слайдера --- */
.range {
  position: relative;
}

.range-slider {
  position: relative;
  height: 5px;
  background: var(--slider-track-color);
  border-radius: 5px;
}

.range-selected {
  position: absolute;
  height: 100%;
  background: var(--primary-color);
  border-radius: 5px;
}

.range-input {
  position: relative;
}

.range-input input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  width: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  pointer-events: auto;
}

.range-input input[type="range"]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  pointer-events: auto;
}

#price-display {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
}

/* --- Стилі для "Collapse" --- */
/* .filter-collapse {
  display: none;
  overflow: hidden;
}
.filter-collapse.show {
  display: block;
} */

.toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.icon-arrow {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--text-color);
  border-right: 2px solid var(--text-color);
  transform: rotate(45deg); /* Стрілка вниз */
  transition: transform 0.3s ease;
}

.toggle-btn[aria-expanded="true"] .icon-arrow {
  transform: rotate(-135deg); /* Стрілка вгору */
}
