/* Abordazh faceted filter — redesign per Illustrator mockup (290px sidebar).
   Everything IBM Plex Sans 16px / line-height 24px. Icons inline SVG.
   Grid: title & section headers = 48px bands, checkbox rows = 24px, dividers #dcdcdc. */

.search-filters {
  --abzf-border: #dcdcdc;   /* panel border + dividers */
  --abzf-ink:    #001400;   /* section headers + labels */
  --abzf-title:  #051e05;   /* panel title + tune icon */
  --abzf-check:  #d2dcdc;   /* unchecked checkbox outline */
  --abzf-checked:#051e05;   /* checked checkbox fill */
  --abzf-red:    #e60000;   /* clear all */
  font-family: var(--font-body, "IBM Plex Sans", system-ui, sans-serif);
  color: var(--abzf-ink);
  background: #fff;
  border: 1px solid var(--abzf-border);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  overflow: hidden;
}
.search-filters * { box-sizing: border-box; }
.search-filters a, .search-filters button, .search-filters label, .search-filters li {
  font-size: 14px; line-height: 24px;
}
.search-filters a { color: inherit; text-decoration: none; }

.abzf-ic { display: inline-block; flex: none; width: 24px; height: 24px; color: currentColor; }
.abzf-ic svg, .search-filters .abzf-ic > svg { display: block; width: 100%; height: 100%; }

/* ---------------- TITLE BAND (48px) ---------------- */
/* NB: this <p> also carries Bootstrap's .d-none.d-md-block (display utilities with
   !important), so we do NOT fight them with flex — center via line-height instead,
   which works while display stays block and keeps the .d-none mobile-hide intact. */
.search-filters .left-block__title {
  height: 48px; line-height: 48px; margin: 0; padding: 0 20px;
  font-size: 16px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  color: var(--abzf-title);
  border-bottom: 1px solid var(--abzf-border);
}
.search-filters .left-block__title .abzf-ic {
  vertical-align: middle; margin-right: 10px; margin-top: -2px; color: var(--abzf-title);
}

/* ---------------- ACCORDION / SECTIONS ---------------- */
.search-filters .accordion,
.search-filters .accordion-flush { border: 0; background: transparent; }
.search-filters .accordion-item {
  border: 0; border-bottom: 1px solid var(--abzf-border); background: transparent;
}

/* section header row (48px) */
.search-filters .accordion-button {
  display: flex; align-items: center;
  height: 48px; padding: 0 20px; border-radius: 0;
  background: #fff !important; color: var(--abzf-ink);
  font-family: inherit; font-size: 14px; line-height: 24px; font-weight: 700;
  box-shadow: none !important;
}
.search-filters .accordion-button:focus { box-shadow: none !important; outline: none; }
.search-filters .accordion-button:not(.collapsed) { color: var(--abzf-ink); }

/* chevron: down when collapsed, Bootstrap rotates it up when open */
.search-filters .accordion-button::after {
  width: 16px; height: 16px; margin-left: auto; background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23001400' stroke-width='1.3'/%3E%3C/svg%3E") !important;
}

/* ---------------- CHECKBOX ROWS (24px each) ---------------- */
.search-filters .accordion-body { padding: 4px 20px 12px; margin: 0; list-style: none; }
.search-filters .accordion-body > li { margin: 0; padding: 0; }

.search-filters .search-filters__item { display: block; }
.search-filters .search-filters__form-check.form-check {
  display: flex; align-items: center; gap: 12px;
  min-height: 24px; margin: 0; padding: 0;
}
.search-filters .search-filters__form-label.form-check-label {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 auto; min-height: 24px; margin: 0; cursor: pointer;
}
.search-filters .search-filters__link { display: inline; }
.search-filters .search-filters__magnitude { color: #7a857a; }

/* the square checkbox / radio */
.search-filters .form-check-input {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; margin: 0; flex: none; float: none;
  border: 1px solid var(--abzf-check); border-radius: 2px; background: #fff;
  position: relative; cursor: pointer; transition: background .12s, border-color .12s;
}
.search-filters .form-check-input:hover { border-color: #a9b7b7; }
.search-filters .form-check-input:checked {
  background: var(--abzf-checked); border-color: var(--abzf-checked);
}
.search-filters .form-check-input:checked::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-7' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center/13px no-repeat;
}
.search-filters .form-check-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(5,30,5,.12); }

/* color swatch dot (shown next to the square, per design) */
.search-filters .color.color-sm {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.18); box-shadow: none;
}

/* two-column layout (numeric values / colors) */
.search-filters .accordion-body.search-filters__grid {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 0;
}

/* dropdown facet (rare) — keep readable */
.search-filters .facet-dropdown .dropdown-toggle {
  font-size: 16px; line-height: 24px; border-radius: 4px; border-color: var(--abzf-border);
}

/* slider facet (price / weight) — inherits fonts, keep body padding */
.search-filters .search-filters__slider-container { padding-top: 8px; }

/* ---------------- CLEAR ALL (red + trash) ---------------- */
.search-filters .search-filters__clear {
  padding: 12px 20px; margin: 0;
}
.search-filters .search-filters__clear .js-search-filters-clear-all {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; border-radius: 0;
  color: var(--abzf-red); font-family: inherit; font-size: 16px; line-height: 24px;
  font-weight: 500; cursor: pointer;
}
.search-filters .search-filters__clear .js-search-filters-clear-all:hover { text-decoration: underline; }
.search-filters .search-filters__clear .abzf-ic { color: var(--abzf-red); }

/* ---------------- ACTIVE FILTERS (one pill per characteristic) ----------------
   "Товщина, мм: 5 , 9 , 10 ×" — each value is its own remove-link; × removes the facet. */
#js-active-search-filters.active-filters { font-family: var(--font-body, "IBM Plex Sans", system-ui, sans-serif); }
.active-filters__list {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.active-filters__item { margin: 0; padding: 0; }
.active-filters__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border: 1px solid #dcdcdc; border-radius: 999px; background: #fff;
  font-size: 16px; line-height: 24px; color: #001400; white-space: nowrap;
}
.active-filters__facet { color: #001400; font-weight: 400; }
.active-filters__value {
  color: #001400; font-weight: 700; text-decoration: none;
}
.active-filters__value:hover { text-decoration: underline; }
.active-filters__sep { color: #001400; margin: 0 -2px 0 -4px; }
.active-filters__remove {
  display: inline-flex; align-items: center; justify-content: center;
  color: #001400; margin-left: 4px; line-height: 1; text-decoration: none;
  transition: color .12s ease;
}
.active-filters__remove .material-icons { font-size: 18px; }
.active-filters__remove:hover { color: var(--abzf-red, #e60000); }
