/* ============================================================================
   filters-premium.css
   Polished filter sidebar — category/subcategory/search/best-sellers/new arrivals.
   Scoped under .filters to avoid global side effects.
   ============================================================================ */

/* --- Sidebar container: premium card ------------------------------------ */
.filters {
  border: 1px solid #eef2f6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  padding: 0;
  gap: 0;
}

/* --- Header -------------------------------------------------------------- */
.filters__header {
  padding: 16px 18px;
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}
.filters__title {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* --- Results count: tighter, no heavy card ------------------------------ */
.filters__results-count {
  margin: 0;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  gap: 8px;
  align-items: baseline;
}
.filters__results-number {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary, #2563eb);
  letter-spacing: -0.3px;
}
.filters__results-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* --- Section: collapsible with refined toggle --------------------------- */
.filters__section {
  border-top: 1px solid #f1f5f9;
  padding: 0;
}
.filters__section:first-of-type { border-top: none; }

.filters__section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.filters__section-toggle:hover {
  background: #f8fafc;
  color: var(--primary, #2563eb);
}
.filters__section-chevron {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.15s ease;
  flex-shrink: 0;
}
.filters__section.is-open .filters__section-chevron {
  transform: rotate(180deg);
  color: var(--primary, #2563eb);
}
.filters__section-body {
  padding: 4px 18px 16px;
}

/* --- Radio / checkbox lists --------------------------------------------- */
.filters__radio-list,
.filters__attr-values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filters__radio,
.filters__attr-item button,
.filters__attr-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.filters__radio:hover,
.filters__attr-item:hover .filters__attr-label {
  background: #f8fafc;
  color: #0f172a;
}
.filters__radio[aria-checked="true"],
.filters__attr-checkbox:checked + .filters__attr-label,
.filters__attr-label:has(> input:checked) {
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary, #2563eb);
  font-weight: 700;
}

/* Radio dot (custom) */
.filters__radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
  position: relative;
  background: #ffffff;
  transition: border-color 0.12s ease;
}
.filters__radio[aria-checked="true"] .filters__radio-dot {
  border-color: var(--primary, #2563eb);
  border-width: 5px;
}
.filters__radio:hover .filters__radio-dot {
  border-color: #94a3b8;
}

/* Checkbox custom */
.filters__attr-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary, #2563eb);
  flex-shrink: 0;
  cursor: pointer;
}

/* Count badge on each option */
.filters__radio-count,
.filters__attr-value-count,
.filters__count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.1px;
  flex-shrink: 0;
}
.filters__radio[aria-checked="true"] .filters__radio-count,
.filters__attr-label:has(> input:checked) .filters__attr-value-count {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary, #2563eb);
}

/* Label text */
.filters__radio-label,
.filters__attr-value-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Price range -------------------------------------------------------- */
.filters__price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.filters__price-input-number {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.filters__price-input-number:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.filters__price-separator { color: #94a3b8; font-weight: 500; }
.filters__price-apply {
  margin-top: 10px;
  width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid var(--primary, #2563eb);
  background: var(--primary, #2563eb);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.filters__price-apply:hover { background: #1d4ed8; }

/* --- Brand / attribute search box --------------------------------------- */
.filters__attr-search,
.filters__brand-search {
  margin: 0 0 8px;
}
.filters__attr-search-input,
.filters__brand-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.filters__attr-search-input:focus,
.filters__brand-search input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- Active filters badge ----------------------------------------------- */
.filters__active-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 6px -1px rgba(16, 185, 129, 0.35);
}

/* --- Mobile close button inside drawer ---------------------------------- */
.filters__close {
  top: 12px;
  right: 12px;
}

/* --- Empty state inside facet ------------------------------------------ */
.filters__facet-empty,
.filters__attr-empty {
  font-size: 12px;
  color: #94a3b8;
  padding: 8px 4px;
  font-style: italic;
}
