/* Category Filters Module
   Standalone, reusable sidebar filter panel for category/collection pages.
   Usage: <aside class="filters"> ... </aside> */

.filters {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  align-self: start;
  position: static;
  overflow: hidden;
}
.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--gray-50);
}
.filters-head h3 {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.filters-head a { font-size: 12px; color: var(--gray-500); font-weight: 600; }
.filters-head a:hover { color: var(--anthracite); }

.filter-group { padding: 16px; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--anthracite);
}

.filter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.filter-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}
.filter-list input { accent-color: var(--anthracite); width: 15px; height: 15px; }
.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  flex-shrink: 0;
}

.price-filter { display: grid; gap: 14px; }
.price-filter__values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--anthracite);
}
.price-filter__values strong { font-weight: 700; letter-spacing: -.01em; }
.price-filter__values span { color: var(--gray-400); font-weight: 500; }

.price-filter__slider {
  position: relative;
  height: 28px;
  margin: 2px 0 4px;
}
.price-filter__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 4px;
  border-radius: 999px;
  background: #e8e8e8;
}
.price-filter__track::before {
  content: "";
  position: absolute;
  left: var(--price-start, 0%);
  width: var(--price-span, 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--price-accent, #c9a54a);
}
.price-filter__slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  pointer-events: none;
}
.price-filter__slider input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}
.price-filter__slider input[type="range"]::-moz-range-track {
  background: transparent;
  height: 4px;
  border: 0;
}
.price-filter__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--price-accent, #c9a54a);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  cursor: pointer;
  pointer-events: auto;
}
.price-filter__slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--price-accent, #c9a54a);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  cursor: pointer;
  pointer-events: auto;
}

.price-filter__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.price-filter__inputs label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}
.price-filter__inputs input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: 13px;
  color: var(--gray-700);
  outline: 0;
  background: var(--white);
}
.price-filter__inputs input:focus { border-color: var(--anthracite); }

.filters-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: -6px 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--anthracite);
  cursor: pointer;
  flex-shrink: 0;
}
.filters-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}
.filters.is-open .filters-toggle svg { transform: rotate(180deg); }

@media (max-width: 1000px) {
  .filters { position: static; }
  .filters-head {
    gap: 12px;
    cursor: pointer;
    user-select: none;
  }
  .filters-head h3 { flex: 1; margin: 0; pointer-events: none; }
  .filters-toggle { display: inline-flex; }
  /* Mobilde filtre gövdesi kapalı gelir; .is-open ile açılır. */
  .filters > form { display: none; }
  .filters.is-open > form { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .filters-toggle svg { transition: none; }
}
