/* css/filterSidebar.css */

.filter-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

/* Sidebar */
.filter-sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  /* header.js: --site-header-h navbar yüksekliği; yoksa 90px */
  top: var(--site-header-h, 90px);
}

/* Üst bar gizlendiğinde (header.js) filtre sütunu viewport’ta yukarı oturur */
html.header-rolled-up .filter-sidebar {
  top: 12px;
  max-height: calc(100dvh - 24px) !important;
}

/* Header */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.filter-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

#clearFiltersBtn {
  background: none;
  border: none;
  font-size: 13px;
  color: #2563eb;
  cursor: pointer;
}

/* Filter sections */
.filter-section {
  margin-bottom: 18px;
}

.filter-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #111827;
}

/* Checkbox list */
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #374151;
}

/* Responsive: mobile = hidden (later we add modal) */
@media (max-width: 1024px) {
  .filter-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    display: none;
  }
}

/* Collapsible section */
.filter-section h4 {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-section h4::after {
  content: "▾";
  font-size: 14px;
  transition: transform 0.2s ease;
}

/* COLLAPSED STATE */
.filter-section.collapsed h4::after {
  transform: rotate(-90deg);
}

.filter-section .filter-body {
  max-height: 200px;
  overflow-y: auto;
  transition: max-height 0.25s ease;
}

.filter-section.collapsed .filter-body {
  max-height: 0;
  overflow: hidden;
}

/* ----- Price range (dual thumb, category / favorites / show-all) ----- */
.filter-price-wrap {
  position: relative;
  padding: 4px 0 2px;
}

.filter-price-rail-slot {
  position: relative;
  height: 36px;
  margin: 6px 0 12px;
}

.filter-price-visual {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  pointer-events: none;
}

.filter-price-track-bg {
  position: absolute;
  inset: 0;
  background: var(--border-light, #e5e7eb);
  border-radius: 9999px;
}

.filter-price-track-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--ossi-navy, #1a334e);
  border-radius: 9999px;
}

.filter-price-sliders {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.filter-price-sliders input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  position: absolute;
  width: 100%;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  margin: 0;
  pointer-events: none;
}

.filter-price-sliders input[type="range"]#priceMinSlider {
  z-index: 2;
}

.filter-price-sliders input[type="range"]#priceMaxSlider {
  z-index: 3;
}

.filter-price-sliders input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.filter-price-sliders input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--bg-white, #ffffff);
  border: 2px solid var(--ossi-navy, #1a334e);
  box-shadow: 0 1px 3px rgba(26, 51, 78, 0.15);
  cursor: pointer;
  pointer-events: auto;
}

.filter-price-sliders input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}

.filter-price-sliders input[type="range"]::-moz-range-thumb {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-white, #ffffff);
  border: 2px solid var(--ossi-navy, #1a334e);
  box-shadow: 0 1px 3px rgba(26, 51, 78, 0.15);
  cursor: pointer;
  pointer-events: auto;
}

.filter-price-pills {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.filter-price-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark, #1a334e);
  padding: 4px 10px;
  background: var(--bg-light, #f1f5f9);
  border-radius: var(--radius-sm, 8px);
}

