/* ==========================================================================
   Каталог и поиск
   ========================================================================== */

.cat { padding-top: clamp(14px, 2vw, 26px); padding-bottom: clamp(36px, 5vw, 72px); }
.cat__head { margin-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cat__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cat__h1 { margin: 0; }
.cat__count { font: 400 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.cat__tools { display: flex; align-items: center; gap: 6px; }
.cat__fbtn { min-height: 42px; padding: 0 14px; border: 1px solid var(--ink); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 8px; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.cat__fbtn .ico { stroke: #fff; stroke-width: 1.8; }
.cat__sort { min-height: 42px; border: 1px solid var(--line-4); background: #fff; padding: 0 12px; border-radius: 0; font: 500 12px/1 var(--sans); cursor: pointer; }

.cat__body { margin-top: clamp(24px, 3vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 2.6vw, 40px); align-items: start; }
.cat__main { min-width: 0; }
.cat.is-loading .cat__main { opacity: .5; transition: opacity .2s; pointer-events: none; }

/* Сайдбар: на десктопе — колонка, на мобильном — выезжающая панель слева */
.cat__side-head, .cat__side-foot { display: none; }
@media (min-width: 960px) {
	.cat__fbtn { display: none; }
	.cat__body { grid-template-columns: 240px minmax(0, 1fr); }
	.cat__side { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 4px; scrollbar-width: none; }
	.cat__side::-webkit-scrollbar { display: none; }
	.admin-bar .cat__side { top: 120px; }
}
@media (max-width: 959.98px) {
	.cat__side { position: fixed; inset: 0 auto 0 0; z-index: 61; width: min(100%, 430px); background: #fff; display: none; flex-direction: column; box-shadow: 0 0 60px rgba(15, 15, 15, .14); }
	.is-filters .cat__side { display: flex; animation: drawerinL .28s cubic-bezier(.22, .7, .24, 1); }
	.is-filters .cat::before { content: ''; position: fixed; inset: 0; z-index: 60; background: rgba(15, 15, 15, .34); animation: fadein .18s ease; }
	.cat__side-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
	.cat__side-head span { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
	.cat__side-head button { width: 40px; height: 40px; border: 0; background: none; font-size: 16px; }
	.cat__side-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px 20px; }
	.cat__side-foot { flex: 0 0 auto; padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 6px; }
	.cat__side-foot .btn { flex: 0 0 auto; min-height: 52px; padding: 0 16px; }
	.cat__side-foot .btn--dark { flex: 1 1 auto; padding: 0 24px; }
	.side-reset { display: none; }
}

.side-cats { padding: 2px 0 12px; border-bottom: 1px solid var(--line-2); }
.side-k { padding: 10px 0 6px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tree--side .tree__row { display: flex; align-items: center; }
/* Без отступов: уровень виден по начертанию (0 — капс, 1 — средний, 2 — обычный, 3 — моно) */
.tree--side .tree__link { padding: 8px 0; font: 400 13px/1.3 var(--sans); color: var(--mute-3); }
.tree--side .d0 > .tree__row .tree__link { font: 600 12px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.tree--side .d1 > .tree__row .tree__link { font: 500 13px/1.3 var(--sans); color: #2a2826; }
.tree--side .d3 > .tree__row .tree__link { font: 400 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tree--side .is-active > .tree__row .tree__link { color: var(--ink); font-weight: 600; }
.tree--side .d0.is-active > .tree__row .tree__link { text-decoration: underline; text-underline-offset: 3px; }
.tree--side .tree__toggle { flex: 0 0 30px; width: 30px; height: 30px; font: 300 17px/1 var(--sans); color: var(--mute); }

.fgroup { border-bottom: 1px solid var(--line-2); padding: 16px 0; }
.fgroup__head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; background: none; border: 0; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: left; }
.fgroup__n { color: var(--accent); }
.fgroup__mark { color: var(--mute); }
.fgroup__body { display: none; }
.fgroup.is-open .fgroup__body { display: block; }
.fgroup__q { margin-top: 12px; width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-4); border-radius: 0; background: #fff; font: 400 12.5px/1 var(--sans); -webkit-appearance: none; appearance: none; }
.flist { margin-top: 10px; display: flex; flex-direction: column; }
.flist.is-limited .fopt.is-extra { display: none; }
.flist.is-expanded { max-height: 300px; overflow-y: auto; }
.fopt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; font: 400 13px/1.2 var(--sans); color: var(--ink); }
.fopt:hover { color: var(--ink); }
.fopt__box { flex: 0 0 16px; height: 16px; border: 1.5px solid #c9c7c3; background: #fff; color: #fff; display: grid; place-items: center; font-size: 10px; line-height: 1; }
.fopt.is-on .fopt__box { border-color: var(--ink); background: var(--ink); }
.fopt__label { flex: 1 1 auto; min-width: 0; }
.fgroup__more { margin-top: 8px; }
.fchipset { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.fopt-chip { min-width: 46px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-4); background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font: 500 12px/1 var(--mono); }
.fopt-chip:hover { border-color: var(--ink); color: var(--ink); }
.fopt-chip.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }
[data-n3-fsearch-hide] { display: none !important; }
.side-reset { display: inline-block; margin-top: 14px; }

/* Выбранные фильтры */
/* Подкатегории над сеткой: одна строка с прокруткой */
.subcats { margin-bottom: clamp(14px, 1.8vw, 22px); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 32px; }
.subcats::-webkit-scrollbar { display: none; }
@media (hover: hover) { .subcats { cursor: grab; } .subcats:active { cursor: grabbing; } .subcats__a { user-select: none; -webkit-user-drag: none; } }
.subcats__a { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-3); background: #fff; font: 500 12.5px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.subcats__a span { font: 400 10px/1 var(--mono); color: var(--mute); }
.subcats__a:hover { border-color: var(--ink); color: var(--ink); }
.subcats__a.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }
.subcats__a.is-on span { color: var(--mute-5); }
.fchips { margin-bottom: clamp(14px, 1.8vw, 22px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fchip { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--ink); background: #fff; font: 500 12px/1 var(--sans); color: var(--ink); }
.fchip:hover { background: var(--soft); color: var(--ink); }
.fchip__g { font: 400 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.fchip__x { font-size: 11px; color: var(--mute-3); }
.fchips__all { margin-left: 4px; }

.grid--cat { gap: clamp(28px, 3.2vw, 52px) clamp(8px, 1vw, 14px); }
.cat__empty { border-color: var(--line-4); }

/* Пагинация */
.pager { margin-top: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pager__more { min-height: 50px; padding: 0 28px; }
.pager__nums { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pager__arrow { width: 40px; height: 40px; display: grid; place-items: center; font: 400 15px/1 var(--sans); color: var(--ink); }
.pager__arrow.is-off { color: #c9c7c3; }
.pager__n { min-width: 40px; height: 40px; padding: 0 6px; border: 1px solid var(--line-5); background: #fff; color: var(--ink); display: grid; place-items: center; font: 500 12.5px/1 var(--mono); }
.pager__n:hover { border-color: var(--ink); color: var(--ink); }
.pager__n.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }
.pager__gap { min-width: 20px; text-align: center; font: 500 12.5px/1 var(--mono); color: var(--mute); }
.pager__info { font: 400 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute-4); }

/* SEO-текст */
.seo { margin-top: clamp(56px, 7vw, 110px); padding-top: 18px; border-top: 1px solid var(--line-2); max-width: 860px; }
.seo__title { margin: 0; font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.seo__p { margin: 10px 0 0; font: 400 12.5px/1.7 var(--sans); color: var(--mute); text-wrap: pretty; }
.seo__p p, .seo__p ul, .seo__p ol { margin: 0; }
.seo__p ul, .seo__p ol { padding-left: 18px; }
.seo__p a { color: var(--mute-2); border-bottom: 1px solid #dcd8d4; }
.seo__more { margin-top: 10px; padding-bottom: 2px; border-bottom-color: #c9c7c3; }

/* Поиск */
.cat--search { padding-top: clamp(16px, 2.2vw, 30px); }
.cat__q { margin: 11px 0 0; font: 600 clamp(21px, 3.2vw, 38px)/1.05 var(--sans); letter-spacing: -.02em; }
.cat__qn { margin-top: 9px; font: 400 12px/1 var(--mono); color: var(--mute-3); }
.cat__pop { margin-top: 18px; gap: 8px; }
.cat__pop .chip { min-height: 0; padding: 10px 14px; border-color: var(--line-3); }
.grid--search { margin-top: clamp(18px, 2.2vw, 30px); gap: clamp(14px, 1.8vw, 26px) clamp(8px, 1vw, 14px); }
.cat--search .cat__empty { margin-top: 30px; border-color: var(--line-3); }
