/* Этно-точка · каталог с фильтрами слева (20.11.2026)
   Референс: e-commerce с боковой колонкой фильтров.
   Подключается после shop.css и premium.css. */

.cat-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 38px);
  align-items: start;
  padding-top: 10px;
}

/* ── Сайдбар ──────────────────────────────────────────── */
.cat-side {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.cat-side::-webkit-scrollbar { width: 6px; }
.cat-side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.cat-side-head {
  display: none; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
}
.cat-side-head b { font-size: 18px; }

.fblock { padding: 17px 0; border-top: 1px solid var(--line); }
.fblock:first-of-type { border-top: 0; padding-top: 2px; }
.fblock h3 {
  margin: 0 0 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}

/* категории */
.fcat { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fcat a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: background .16s, color .16s;
}
.fcat a:hover { background: var(--cream-2); color: var(--ink); }
.fcat a.is-active { background: var(--ink); color: #fff; font-weight: 600; }
.fcat small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.fcat a.is-active small { color: rgba(255, 255, 255, .62); }

/* поиск в сайдбаре */
.fsearch { position: relative; }
.fsearch input {
  width: 100%; min-height: 42px; padding: 0 12px 0 34px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font: inherit; font-size: 13.5px; color: var(--ink);
}
.fsearch svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2;
}

/* цена */
.fprice-row { display: flex; align-items: center; gap: 8px; }
.fprice-row input {
  width: 100%; min-width: 0; min-height: 40px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font: inherit; font-size: 13.5px; color: var(--ink); text-align: center;
}
.fprice-row span { color: var(--muted); font-size: 12px; }
.fprice-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fprice-quick button {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; transition: background .16s, border-color .16s, color .16s;
}
.fprice-quick button:hover { border-color: var(--brass); }
.fprice-quick button.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* диапазон ширины */
.frange { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.frange b { font-size: 13px; font-weight: 600; }
.frange span { font-size: 12px; color: var(--muted); }
input[type="range"][data-width-range] {
  width: 100%; accent-color: var(--ink); cursor: pointer;
}

/* чекбоксы материала */
.fcheck {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 0; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.fcheck input { width: 17px; height: 17px; accent-color: var(--ink); flex: none; }

/* избранное / кнопки */
.fchip-fav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 42px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: background .16s, border-color .16s, color .16s;
}
.fchip-fav:hover { border-color: var(--brass); }
.fchip-fav.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip-fav small {
  min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px;
  border-radius: 11px; background: var(--cream-2); color: var(--ink); font-size: 11.5px; font-weight: 700;
}
.fchip-fav.is-active small { background: rgba(255, 255, 255, .18); color: #fff; }

.freset {
  width: 100%; min-height: 42px; margin-top: 10px; border-radius: 9px;
  font-size: 13px; box-shadow: none;
}
.freset:disabled { opacity: .45; cursor: default; }

.fhelp {
  margin-top: 18px; padding: 16px 15px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--cream-2);
}
.fhelp b { display: block; font-size: 13.5px; line-height: 1.3; }
.fhelp p { margin: 6px 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.fhelp .btn { width: 100%; min-height: 40px; border-radius: 8px; font-size: 12.5px; box-shadow: none; }
.fhelp a.tel { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); text-decoration: none; text-align: center; }
.fhelp a.tel:hover { color: var(--ink); }

/* ── Правая колонка ───────────────────────────────────── */
.cat-main { min-width: 0; }
.cat-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 0 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.cat-shown { margin: 0; font-size: 13.5px; color: var(--muted); }
.cat-bar-right { display: flex; align-items: center; gap: 10px; }
.cat-bar select {
  min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
}
.filter-toggle {
  display: none; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.filter-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.cat-main .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-overlay {
  position: fixed; inset: 0; z-index: 58;
  background: rgba(26, 20, 17, .45); backdrop-filter: blur(2px);
}
.cat-overlay[hidden] { display: none; }

/* ── Адаптив ──────────────────────────────────────────── */
@media (max-width: 1180px) {
  .cat-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 24px; }
  .cat-main .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-main .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-side {
    position: fixed; z-index: 60; top: 0; bottom: 0; left: 0;
    width: min(340px, 88vw); max-height: none;
    padding: 18px 18px 28px; margin: 0;
    background: var(--cream); box-shadow: 24px 0 60px -40px rgba(0, 0, 0, .6);
    transform: translateX(-102%); transition: transform .28s var(--ease, ease);
    overflow-y: auto;
  }
  .cat-side.is-open { transform: translateX(0); }
  .cat-side-head { display: flex; }
  .filter-toggle { display: inline-flex; }
  body.cat-filters-open { overflow: hidden; }
}
@media (max-width: 760px) {
  .cat-main .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-bar { flex-wrap: wrap; gap: 10px; }
  .cat-bar-right { flex: 1 1 100%; justify-content: space-between; }
  .cat-bar select { flex: 1; }
  .filter-toggle { flex: 1; justify-content: center; }
}
@media (min-width: 1025px) {
  .cat-overlay { display: none !important; }
}
