/* public/assets/css/filters.css
 *
 * Active filter strip + chip styles, shared by shop.php and subcategory.php.
 *
 * Other filter UI (chips inside cards, price form, sibling browse) is styled
 * by subcategory.css / shop.css. This file only owns the "currently filtering
 * by" strip that appears above the grid.
 */

:root {
  --tsc-filt-brand:        #7a0f0f;
  --tsc-filt-brand-hover:  #5e0a0a;
  --tsc-filt-border:       #dee2e6;
  --tsc-filt-bg:           #fff;
  --tsc-filt-bg-soft:      #f8f9fa;
  --tsc-filt-muted:        #6c757d;
}

/* -------- Active filter strip -------- */

.tsc-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background-color: var(--tsc-filt-bg-soft);
  border: 1px solid var(--tsc-filt-border);
  border-radius: 0.5rem;
}

.tsc-active-filters__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tsc-filt-muted);
  margin-right: 0.25rem;
}

.tsc-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.625rem;
  background-color: var(--tsc-filt-bg);
  border: 1px solid var(--tsc-filt-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: #212529;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tsc-active-filter:hover {
  background-color: var(--tsc-filt-brand);
  border-color: var(--tsc-filt-brand);
  color: #fff;
}

.tsc-active-filter__dim {
  color: var(--tsc-filt-muted);
  font-weight: 600;
  margin-right: 0.125rem;
}

.tsc-active-filter:hover .tsc-active-filter__dim {
  color: rgba(255, 255, 255, 0.85);
}

.tsc-active-filter__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--tsc-filt-muted);
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 700;
}

.tsc-active-filter:hover .tsc-active-filter__x {
  background-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.tsc-active-filter--clear {
  margin-left: auto;
  padding: 0.25rem 0.625rem;
  background-color: transparent;
  border: none;
  color: var(--tsc-filt-brand);
  font-weight: 600;
}

.tsc-active-filter--clear:hover {
  background-color: transparent;
  border: none;
  color: var(--tsc-filt-brand-hover);
  text-decoration: underline;
}

/* -------- Price filter form (subcategory) -------- */

.tsc-filter-range__inputs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* -------- Mobile -------- */

@media (max-width: 575.98px) {
  .tsc-active-filters {
    padding: 0.625rem 0.75rem;
  }
  .tsc-active-filter--clear {
    margin-left: 0;
    width: 100%;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--tsc-filt-border);
  }
}