/* =================== hc-cat-filters.css =================== */
/* hc-cat-filters — форма фильтров на /shop. Размещается внутри
 * .hc-cat-filter-aside (desktop sticky / mobile drawer — отдельный block).
 * Только normal flow, без negative margins, без overflow-hacks.
 * Strict isolation: .hc-cat-filters / .hc-cat-filters__*. */

/* ─── root ─── */
.hc-cat-filters {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 16px;
  box-sizing: border-box;
  background: var(--hc-paper, #ffffff);
  border: 0.5px solid rgba(141, 109, 71, 0.16);
  border-radius: 14px;
}
.hc-cat-filters::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--hc-gold-1, #d4b896), var(--hc-accent, #8b7355));
  border-radius: 1px;
}
.hc-cat-filters__form {
  display: grid;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* ─── head ─── */
.hc-cat-filters__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid rgba(141, 109, 71, 0.20);
}
.hc-cat-filters__head h4 {
  margin: 0;
  font-family: var(--hc-serif, "Playfair Display", Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: var(--hc-ink, #1a1714);
}
.hc-cat-filters__close {
  display: none;
}
@media (max-width: 1024px) {
  .hc-cat-filters__close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 0.5px solid rgba(141, 109, 71, 0.22);
    border-radius: 999px;
    font-family: var(--hc-mono, "JetBrains Mono", monospace);
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--hc-ink-soft);
    cursor: pointer;
  }
}

/* ─── section ─── */
.hc-cat-filters__section {
  padding: 8px 0 12px;
  border-bottom: 0.5px dashed rgba(141, 109, 71, 0.20);
}
.hc-cat-filters__section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}
.hc-cat-filters__section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* v8.6 — collapsible-вариант (<details>) для facet'ов с >5 значениями. */
.hc-cat-filters__section--collapsible {
  list-style: none;
}
.hc-cat-filters__section--collapsible > .hc-cat-filters__section-head {
  cursor: pointer;
  user-select: none;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.hc-cat-filters__section--collapsible > .hc-cat-filters__section-head::-webkit-details-marker {
  display: none;
}
.hc-cat-filters__section--collapsible > .hc-cat-filters__section-head::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.4px solid var(--hc-ink-mid, rgba(26, 23, 20, 0.45));
  border-bottom: 1.4px solid var(--hc-ink-mid, rgba(26, 23, 20, 0.45));
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}
.hc-cat-filters__section--collapsible[open] > .hc-cat-filters__section-head::after {
  transform: translateY(-30%) rotate(225deg);
}
.hc-cat-filters__section-count {
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 10px;
  font-weight: 500;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.45));
  margin-left: auto;
}
.hc-cat-filters__section-head h4,
.hc-cat-filters h4 {
  margin: 0;
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.55));
}
.hc-cat-filters__section-head h4::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hc-gold-1, #d4b896), var(--hc-accent, #8b7355));
  vertical-align: middle;
}

/* .hc-small in filter heads is owned here, not in generic small.css */
.hc-cat-filters__section-head .hc-small,
.hc-cat-filters__section-head span {
font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(26, 23, 20, 0.45);
  white-space: nowrap;
}
.hc-cat-filters__section-head .hc-small {
font-family: var(--hc-sans, "Outfit", sans-serif);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.42));
}

/* ─── categories stack ─── */
.hc-cat-filters__category-stack,
.hc-cat-filters__category-scroll {
  display: grid;
  gap: 2px;
  width: 100%;
  max-width: 100%;
}
.hc-cat-filters__category-scroll {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 109, 71, 0.3) transparent;
}
.hc-cat-filters__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--hc-ink-soft, rgba(26, 23, 20, 0.72));
  font-family: var(--hc-sans, "Outfit", sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: background 0.16s ease, color 0.16s ease;
}
.hc-cat-filters__cat:hover {
  background: rgba(212, 184, 150, 0.14);
  color: var(--hc-ink, #1a1714);
}
.hc-cat-filters__cat.hc-chip--active,
.hc-cat-filters__cat[aria-current="true"] {
  background: rgba(212, 184, 150, 0.22);
  color: var(--hc-ink, #1a1714);
  font-weight: 600;
}
.hc-cat-filters__cat .hc-chip__count {
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 10px;
  font-weight: 500;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.45));
}

/* ─── quick grid (В наличии / Со скидкой / Новинки / Хиты) ─── */
.hc-cat-filters__quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: 100%;
}

/* ─── facet (checkbox row) ─── */
.hc-cat-filters__facet {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--hc-ink, #1a1714);
  cursor: pointer;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: background 0.16s ease;
}
.hc-cat-filters__facet:hover {
  background: rgba(212, 184, 150, 0.14);
}
.hc-cat-filters__facet-label {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.hc-cat-filters__facet--tile {
  flex-wrap: wrap;
  border: 0.5px solid rgba(141, 109, 71, 0.18);
  padding: 9px 11px;
  background: var(--hc-paper, #ffffff);
}
.hc-cat-filters__facet input[type="checkbox"],
.hc-cat-filters__facet .hc-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  background: var(--hc-paper, #ffffff);
  border: 1.4px solid rgba(141, 109, 71, 0.42);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.hc-cat-filters__facet input[type="checkbox"]:hover,
.hc-cat-filters__facet .hc-checkbox:hover {
  border-color: var(--hc-accent-dark, #5d4d3a);
}
.hc-cat-filters__facet input[type="checkbox"]:checked,
.hc-cat-filters__facet .hc-checkbox:checked {
  background: linear-gradient(135deg, var(--hc-gold-1, #d4b896), var(--hc-accent, #8b7355));
  border-color: var(--hc-accent-dark, #5d4d3a);
}
.hc-cat-filters__facet input[type="checkbox"]:checked::after,
.hc-cat-filters__facet .hc-checkbox:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--hc-paper, #ffffff);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  -webkit-mask-size: 12px 12px;
  mask-size: 12px 12px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.hc-cat-filters__facet small {
  margin-left: auto;
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 10px;
  font-weight: 500;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.45));
  flex-shrink: 0;
}

/* ─── facet-stack (vertical list of facets для group) ─── */
.hc-cat-filters__facet-stack {
  display: grid;
  gap: 2px;
  width: 100%;
}

/* ─── price ─── */
.hc-cat-filters__price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hc-cat-filters__price-input {
  height: 36px;
  padding: 8px 12px;
  background: var(--hc-paper, #ffffff);
  border: 0.5px solid rgba(141, 109, 71, 0.22);
  border-radius: 10px;
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 13px;
  color: var(--hc-ink, #1a1714);
}
.hc-cat-filters__price-input:focus {
  outline: none;
  border-color: var(--hc-accent, #8b7355);
  box-shadow: 0 0 0 3px rgba(212, 184, 150, 0.20);
}

/* ─── price slider (single owner: hc-cat-filters) ─── */
.hc-cat-filters .hc-price-slider {
display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0;
}

.hc-cat-filters .hc-price-slider__track {
position: relative;
  height: 4px;
  background: rgba(141, 109, 71, 0.16);
  border-radius: 999px;
  /* Sprint46.v3 — убран 6px horizontal margin, чтобы track визуально
   * выравнивался с чекбоксами серий (которые flush с aside padding).
   * Top 12px / bottom 6px оставляем для воздуха между inputs и track. */
  margin: 12px 0 6px;
}

.hc-cat-filters .hc-price-slider__track::before {
content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.hc-cat-filters .hc-price-slider__fill {
position: absolute;
  inset: 0;
  height: 4px;
  background: var(--hc-accent, #8b7355);
  border-radius: 999px;
}

.hc-cat-filters .hc-price-slider__thumb {
position: absolute;
  top: 50%;
  width: 100%;
  height: 0;
  margin: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  transform: translateY(-50%);
}

.hc-cat-filters .hc-price-slider__thumb::-webkit-slider-thumb {
-webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hc-ink, #1a1714);
  border: 2px solid var(--hc-paper, #ffffff);
  box-shadow: 0 2px 6px rgba(20, 17, 14, 0.18);
  pointer-events: auto;
  cursor: pointer;
}

.hc-cat-filters .hc-price-slider__thumb::-moz-range-thumb {
width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hc-ink, #1a1714);
  border: 2px solid var(--hc-paper, #ffffff);
  box-shadow: 0 2px 6px rgba(20, 17, 14, 0.18);
  pointer-events: auto;
  cursor: pointer;
}

.hc-cat-filters .hc-price-slider__bounds {
display: flex;
  justify-content: space-between;
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(26, 23, 20, 0.50);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.hc-cat-filters--premium .hc-price-slider {
padding: 8px 4px 0;
}

.hc-cat-filters--premium .hc-price-slider__track {
height: 28px;
margin: 8px 0 14px;
background: transparent;
}

.hc-cat-filters--premium .hc-price-slider__track::before {
top: 50%;
  bottom: auto;
  height: 3px;
  transform: translateY(-50%);
  background: rgba(180, 151, 115, 0.20);
  border-radius: 2px;
}

.hc-cat-filters--premium .hc-price-slider__fill {
top: 50%;
  bottom: auto;
  left: 0;
  right: 0;
  height: 3px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--hc-gold, #d4b896), var(--hc-accent, #8b7355));
  border-radius: 2px;
}

.hc-cat-filters--premium .hc-price-slider__thumb {
inset: 0;
  width: 100%;
  height: 28px;
  transform: none;
}

.hc-cat-filters--premium .hc-price-slider__thumb::-webkit-slider-thumb {
width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hc-paper, #ffffff);
  border: 2px solid var(--hc-ink, #1a1714);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}

.hc-cat-filters--premium .hc-price-slider__thumb::-moz-range-thumb {
width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hc-paper, #ffffff);
  border: 2px solid var(--hc-ink, #1a1714);
}

/* ─── actions (sticky bottom) ─── */
.hc-cat-filters__actions {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, transparent, var(--hc-paper, #ffffff) 30%);
  border-top: 0.5px solid rgba(141, 109, 71, 0.22);
}

/* ─── applied chips strip ─── */
.hc-cat-filters__applied {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  padding: 12px;
  margin: 0 0 12px;
  background: linear-gradient(180deg, rgba(212, 184, 150, 0.14), rgba(184, 154, 111, 0.06));
  border: 0.5px solid var(--hc-gold-border, rgba(212, 184, 150, 0.42));
  border-radius: 12px;
  box-sizing: border-box;
}
.hc-cat-filters__applied-label {
  font-family: var(--hc-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hc-accent-dark, #5d4d3a);
}
.hc-cat-filters__applied-clear {
  margin-left: auto;
  background: transparent;
  border: 0;
  font-family: var(--hc-mono);
  font-size: 10px;
  color: var(--hc-accent-dark, #5d4d3a);
  cursor: pointer;
}

/* ---- folded from 059-hc-cat-filter-chip.css ---- */
.hc-cat-filter-chip[aria-pressed="true"],
.hc-cat-filter-chip.is-active {
  background:rgba(212,184,150,0.22);
  border-color:#c8a96a;
}
.hc-cat-filter-chip[aria-pressed="true"]::after,
.hc-cat-filter-chip.is-active::after {
  content:"✓";
  margin-left:5px;
  color:var(--hc-accent-dark, #5d4d3a);
  font-weight:700;
}

/* ---- folded from 067-hc-cat-results-loading.css ---- */
.hc-cat-results-loading {display: none; position: absolute; top: 0; left: 0; right: 0; z-index: 2; background: var(--hc-paper, #ffffff); padding: 12px 0; border-radius: 12px}

/* ─── Sprint24.2: collapsible facet groups ─── */
/* Каждая группа фасетов держит по умолчанию 6 видимых options.
   Остальные скрыты до клика по .hc-facet-more — Alpine toggle. */
.hc-facet-group {
  display: contents;
}
.hc-facet-group .hc-facet-extra {
  display: none;
}
.hc-facet-group.is-expanded .hc-facet-extra {
  display: flex;
}
.hc-facet-more {
  align-self: flex-start;
  margin: 4px 0 6px;
  padding: 4px 8px;
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--hc-accent-dark, #7a6548);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--hc-dur-fast, 160ms) ease;
}
.hc-facet-more:hover {
  color: var(--hc-ink, #1a1714);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hc-facet-more::before {
  content: "+ ";
  font-weight: 600;
}
.hc-facet-group.is-expanded .hc-facet-more::before {
  content: "− ";
}
