/* ================================
   🎯 FILTER TOGGLE BUTTON
================================ */
.filter-btn {
  position: fixed;
  top: 110px;
  left: 20px;
  background: linear-gradient(135deg, #d4af37, #b8962e);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 999;
}
.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* ================================
   📦 FILTER SIDEBAR (GLASS UI)
================================ */
.filter-sidebar {
  position: fixed;
  top: 0;
  left: -360px;
  width: 340px;
  height: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 8px 0 35px rgba(0,0,0,0.35);
  padding: 26px 22px;
  transition: all 0.35s ease;
  z-index: 1002;
  overflow-y: auto;
  border-top-right-radius: 22px;
  border-bottom-right-radius: 22px;
}
.filter-sidebar.active {
  left: 0;
}

/* ================================
   🌑 OVERLAY
================================ */
.filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.filter-overlay.active {
  display: block;
  opacity: 1;
}

/* ================================
   🧭 SIDEBAR HEADER (NO BORDER)
================================ */
.filter-sidebar h3 {
  font-size: 1.45rem;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* removed border-bottom per request */
  padding-bottom: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.25s ease;
}
.close-btn:hover {
  transform: rotate(90deg);
  color: #000;
}

/* ================================
   🧾 FILTER GROUP (with separator)
================================ */
.filter-group {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(30,30,30,0.06); /* subtle divider */
}

/* last group no divider (optional) */
.filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 10px;
  padding-bottom: 0;
}

/* ================================
   ✅ FILTER HEADING: bold, no border
================================ */
.filter-title {
  font-size: 1.03rem;
  font-weight: 900;      /* bold */
  margin-bottom: 10px;
  color: #111;
  letter-spacing: 0.3px;
  text-transform: none;  /* keep original casing */
  padding-left: 0;       /* removed left border */
}

/* ================================
   ✅ PERFECT CHECKBOX & RADIO ALIGNMENT
   Robust for multiple Django markup patterns
================================ */
/* Reset ul/li default rendering */
.filter-checkbox-list ul,
.filter-radio-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Common row container for a single option */
.filter-checkbox-list li,
.filter-radio-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  line-height: 1.2;
  font-size: 0.95rem;
}

/* CASE A: Django renders <label><input/> Option text</label>
   Make label a flex container so checkbox is left and text to the right */
.filter-checkbox-list li label,
.filter-radio-list li label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  color: #222;
  font-weight: 500;
}

/* CASE B: Django renders <input/> <label>Option text</label>
   Ensure sibling input + label align too */
.filter-checkbox-list li > input[type="checkbox"],
.filter-radio-list li > input[type="radio"] {
  margin: 0;
  transform: scale(1.15);
  accent-color: #d4af37;
  flex: 0 0 auto;
  cursor: pointer;
}

/* If input is inside label, tighten margins */
.filter-checkbox-list li label input[type="checkbox"],
.filter-radio-list li label input[type="radio"] {
  margin: 0;
  transform: scale(1.15);
  accent-color: #d4af37;
  cursor: pointer;
}

/* Ensure text portion grows and wraps nicely */
.filter-checkbox-list li label span,
.filter-radio-list li label span,
.filter-checkbox-list li label .option-label-text,
.filter-radio-list li label .option-label-text,
.filter-checkbox-list li > label,
.filter-radio-list li > label {
  flex: 1 1 auto;
  min-width: 0;
  color: #333;
}

/* Small tweak for touch targets */
.filter-checkbox-list li,
.filter-radio-list li {
  padding: 6px 4px;
  border-radius: 6px;
}

/* Hover highlight for rows (subtle) */
.filter-checkbox-list li:hover,
.filter-radio-list li:hover {
  background: rgba(212,175,55,0.04);
}

/* ================================
   🔢 INPUTS & SELECT (except range)
================================ */
.filter-sidebar input:not([type="range"]),
.filter-sidebar select {
  width: auto;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-sidebar input:focus,
.filter-sidebar select:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212,175,55,0.16);
}

/* ================================
   ✅ PRICE SEEK BAR (NO BORDER/OUTLINE WHILE DRAGGING)
================================ */
#priceSlider {
  width: 100%;
  margin: 6px 0 4px;
  accent-color: #d4af37;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  outline: none;
  border: none !important;
  box-shadow: none !important;
}

/* WebKit track/thumb styling for consistent appearance */
#priceSlider::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(200,200,200,0.45);
  border-radius: 6px;
}
#priceSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d4af37;
  margin-top: -6px; /* centers the thumb vertically */
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  border: none;
}

/* Firefox */
#priceSlider::-moz-range-track {
  height: 6px;
  background: rgba(200,200,200,0.45);
  border-radius: 6px;
}
#priceSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d4af37;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Remove focus outline on thumb in all browsers */
#priceSlider:focus::-webkit-slider-thumb { box-shadow: 0 2px 6px rgba(0,0,0,0.25); outline: none; }
#priceSlider:focus::-moz-range-thumb { box-shadow: 0 2px 6px rgba(0,0,0,0.25); outline: none; }

/* Price bottom value */
.price-bottom-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #444;
}
.price-bottom-value strong {
  color: #000;
  font-weight: 800;
  font-size: 1rem;
}

/* ================================
   🚀 APPLY BUTTON
================================ */
.filter-sidebar button[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, #d4af37, #b8962e);
  border: none;
  color: white;
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.filter-sidebar button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* ================================
   📱 MOBILE RESPONSIVE
================================ */
@media (max-width: 480px) {
  .filter-sidebar {
    width: 100%;
    border-radius: 0;
  }
  .filter-btn { left: 12px; top: 90px; }
}

/* ================================
   🛍 PRODUCT GRID FIX
================================ */
.products-grid {
  margin-top: 90px;
}

/* ================================
   ✅ CLEANUP: remove br gaps
================================ */
.filter-content br { display: none; }

/* ✅ FORCE CHECKBOX + LABEL SIDE-BY-SIDE (FINAL FIX) */
.filter-checkbox-list ul,
.filter-radio-list ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.filter-checkbox-list li,
.filter-radio-list li {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-checkbox-list li label,
.filter-radio-list li label {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  cursor: pointer;
}

.filter-checkbox-list li input,
.filter-radio-list li input {
  margin: 0 !important;
  transform: scale(1.15);
}

/* ================================
   ✅ FILTER HEADER LAYOUT WITH CLEAR BTN
================================ */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Right side buttons */
.filter-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ✅ CLEAR FILTERS BUTTON */
.clear-filters-btn {
  background: transparent;
  border: 1.5px solid #d4af37;
  color: #d4af37;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-filters-btn:hover {
  background: #d4af37;
  color: #fff;
}

/* ================================
   ✅ BRAND SHOW MORE / LESS BUTTON
================================ */
.show-more-wrapper {
  margin-top: 6px;
  text-align: left;
}

.show-more-btn {
  background: transparent;
  border: none;
  color: #b8962e;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.show-more-btn:hover {
  color: #d4af37;
  text-decoration: underline;
}

/* ================================
   ✅ FIX: Sidebar Not Fully Hiding on Mobile
================================ */
@media (max-width: 480px) {
  .filter-sidebar {
    width: 100vw !important;   /* Sidebar becomes full width */
    left: -100vw !important;   /* Fully hidden off-screen */
  }

  .filter-sidebar.active {
    left: 0 !important;        /* Fully visible when opened */
  }
}