/* ---- Хлебные крошки ---- */
.crumbs { background: var(--white); border-bottom: 1px solid var(--line); }
.crumbs .container { display: flex; align-items: center; gap: 9px; height: 44px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); transition: color .15s; }
.crumbs a:hover { color: var(--orange-dark); }
.crumbs .sep { color: var(--muted-2); }
.crumbs .cur { color: var(--ink-2); }

/* ---- Шапка каталога ---- */
.cat-header { padding: 26px 0 22px; }
.cat-header h1 { margin: 0 0 8px; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.cat-header .sub { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13.5px; }
.cat-header .sub b { color: var(--ink-2); font-weight: 600; }

/* подкатегории-«пилюли» */
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.subcats a {
  font-size: 13px; padding: 7px 14px; border-radius: 100px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink-2);
  transition: all .15s;
}
.subcats a:hover { border-color: var(--orange); color: var(--orange-dark); }
.subcats a.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Раскладка каталога ---- */
.cat-layout { display: grid; grid-template-columns: 268px 1fr; gap: 28px; padding-bottom: 60px; align-items: start; }

/* ---- Фильтры ---- */
.filters {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  position: sticky; top: 148px;
}
.filters-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.filters-head b { font-size: 15px; font-weight: 600; }
.filters-head a { font-size: 12.5px; color: var(--orange-dark); }
.fgroup { border-bottom: 1px solid var(--line); padding: 16px 18px; }
.fgroup:last-of-type { border-bottom: none; }
.fgroup > h4 {
  margin: 0 0 13px; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); display: flex; align-items: center; justify-content: space-between;
}
.fopt { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.fopt:hover { color: var(--ink); }
.fopt input { position: absolute; opacity: 0; }
.fopt .box {
  width: 17px; height: 17px; border: 1.5px solid var(--line-strong); border-radius: 4px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.fopt input:checked + .box { background: var(--orange); border-color: var(--orange); }
.fopt input:checked + .box::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
.fopt .lbl { flex: 1; }
.fopt .cnt { color: var(--muted-2); font-size: 12px; font-family: 'IBM Plex Mono', monospace; }
.fopt.row-active .lbl { color: var(--ink); font-weight: 500; }

/* категории-список */
.fcat { display: flex; flex-direction: column; gap: 1px; }
.fcat a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.fcat a:hover { background: var(--surface); }
.fcat a.active { background: var(--orange-tint); color: var(--orange-dark); font-weight: 600; }
.fcat a .cnt { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted-2); }
.fcat a.active .cnt { color: var(--orange-dark); }

/* цвета */
.colors { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong);
  cursor: pointer; position: relative; transition: transform .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--orange); }

/* цена */
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input {
  width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 11px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; outline: none;
}
.price-range input:focus { border-color: var(--orange); }
.price-range span { color: var(--muted-2); }

.filters-foot { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }

/* ---- Тулбар результатов ---- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 16px; margin-bottom: 16px;
}
.toolbar-left { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); }
.toolbar-left b { color: var(--ink); }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 4px 7px 4px 11px;
  color: var(--ink-2);
}
.chip button { border: none; background: none; color: var(--muted); font-size: 14px; line-height: 1; padding: 0; }
.chip button:hover { color: var(--orange-dark); }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.toolbar-right label { font-size: 13px; color: var(--muted); }
.toolbar-right select {
  height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 30px 0 12px; font-family: inherit; font-size: 13.5px; color: var(--ink); background: var(--white);
  cursor: pointer; outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8780' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.view-toggle { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { width: 36px; height: 38px; border: none; background: var(--white); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.view-toggle button.on { background: var(--ink); color: #fff; }

/* ---- Пагинация ---- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.pager a {
  min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--ink-2);
  font-family: 'IBM Plex Mono', monospace; transition: all .15s; background: var(--white);
}
.pager a:hover { border-color: var(--ink-2); }
.pager a.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.pager a.nav { gap: 6px; }

@media (max-width: 980px) {
  .cat-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
}

/* Тулбар (счётчик/сортировка/вид) не переносился на новую строку —
   из-за этого вся колонка каталога раздувалась шире экрана на телефонах */
@media (max-width: 560px) {
  .toolbar { flex-wrap: wrap; row-gap: 10px; }
  .toolbar-left, .toolbar-right { flex-wrap: wrap; }
}
