/* ---------- каталог ---------- */
.header--compact .wrap { min-height: 72px; }
.header--compact .search { flex: 1; max-width: 640px; }
.header--compact .search input { width: 100%; }
.header__phone { font-weight: 600; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.header__phone:hover { color: var(--accent-hover); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: var(--r-s); background: var(--ink); color: var(--surface); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn .n { font-variant-numeric: tabular-nums; }

.cat-head { padding-block: 26px 22px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9375rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--line-strong); }
.cat-head h1 { margin-top: 14px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); font-weight: 780; line-height: 1.02; letter-spacing: -0.03em; }
.cat-sub { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.cat-sub p { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--ink-soft); }
.cat-sub p a { color: var(--ink); font-weight: 600; }
.sort { display: flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--ink-soft); }
.sort select { height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--ink); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%2316191C' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; cursor: pointer; }
.demo-note { margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; font-family: var(--f-mono); font-size: .75rem; color: #8F3207; background: var(--accent-soft); padding: 6px 10px; border-radius: 6px; }

.chips { display: flex; gap: 8px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 500; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.cat-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: clamp(56px, 8vw, 96px); }
.filters { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; display: grid; gap: 22px; }
.filters__head { display: none; }
.fgroup { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.fgroup legend { font-family: var(--f-display); font-weight: 650; font-size: 1.0625rem; margin-bottom: 4px; padding: 0; }
.check { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; cursor: pointer; line-height: 1.3; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--ease); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check .cnt { color: var(--ink-soft); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.check:hover input { border-color: var(--ink); }
.filters__reset { justify-self: start; background: none; border: 0; padding: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: .9375rem; }
.filters__reset:hover { color: var(--ink); }

.list { display: grid; gap: 12px; min-width: 0; }
.item {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 210px; gap: 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px 20px 16px 16px;
  transition: border-color .18s, box-shadow .25s var(--ease);
}
@media (hover: hover) { .item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); } }
.item .pack-ph { width: 120px; aspect-ratio: 1; border-radius: 10px; }
.item__main { display: grid; gap: 6px; min-width: 0; }
.item__name { font-family: var(--f-display); font-weight: 650; font-size: 1.3125rem; letter-spacing: -0.015em; line-height: 1.2; }
.item__desc { color: var(--ink-soft); font-size: 1rem; }
.item__packs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.item__packs span { font-size: .8125rem; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.item__side { display: grid; gap: 10px; justify-items: start; }
.item__btns { display: flex; gap: 8px; }
.item__btns .btn { min-height: 44px; }
.btn--pdf { background: var(--surface); border-color: var(--line-strong); color: var(--ink-soft); font-weight: 500; padding: 0 .9em; }
.btn--pdf[aria-disabled="true"] { opacity: 1; pointer-events: auto; cursor: not-allowed; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-m); padding: 40px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty h2 { font-size: 1.375rem; font-weight: 650; }
.empty p { color: var(--ink-soft); max-width: 44ch; }

.filters-open { display: none; }

/* анимация при смене фильтра */
@media (prefers-reduced-motion: no-preference) {
  .item { animation: itemIn .38s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
  @keyframes itemIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 1020px) {
  .header--compact .search { display: block; }
  .header__phone { display: none; }
  .cat-body { grid-template-columns: 1fr; }
  .filters-open { display: inline-flex; }
  .filters {
    position: fixed; inset: 0; z-index: 85; border-radius: 0; border: 0; overflow-y: auto; align-content: start;
    padding: calc(18px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
    transform: translateY(100%); transition: transform .3s var(--ease); visibility: hidden;
  }
  .filters[data-open="true"] { transform: none; visibility: visible; }
  .filters__head { display: flex; align-items: center; justify-content: space-between; }
  .filters__head h2 { font-size: 1.5rem; font-weight: 700; }
  .filters__show { position: sticky; bottom: 0; }
}
@media (min-width: 1021px) { .filters__show { display: none; } }
@media (max-width: 720px) {
  .header--compact .wrap { flex-wrap: wrap; row-gap: 10px; padding-block: 10px; }
  .header--compact .search { order: 3; flex-basis: 100%; max-width: none; }
  .cart-btn { padding: 0 12px; }
  .cart-btn .lbl { display: none; }
  .cat-sub { flex-direction: column; align-items: stretch; }
  .sort { width: 100%; }
  .sort label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sort select { flex: 1; min-width: 0; height: 40px; }
  .item { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px; align-items: start; }
  .item .pack-ph { width: 84px; }
  .item__name { font-size: 1.0625rem; }
  .item__desc { font-size: .9375rem; }
  .item__side { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
  .item__btns { grid-column: 1 / -1; }
  .item__btns .btn:first-child { flex: 1; }
}

/* ---------- фильтр «Группа товаров» ---------- */
.cat-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cat-side .filters { position: static; }
.fgroup--groups { gap: 0; }
.gsec { border-top: 1px solid var(--line); }
.gsec:first-of-type { border-top: 0; }
.gsec__head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 6px; margin: 0;
  border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; font-weight: 600; font-size: .9688rem; color: var(--ink);
}
.gsec__head:hover { background: var(--surface-2); }
.gsec__head svg { width: 16px; height: 16px; flex: none; color: var(--ink-soft); transition: transform .2s var(--ease); }
.gsec__head[aria-expanded="true"] svg { transform: rotate(180deg); }
.gsec__list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 1px; }
.glink { display: block; padding: 7px 8px 7px 16px; border-radius: 6px; text-decoration: none; font-size: .9375rem; line-height: 1.3; color: var(--ink); }
.glink:hover { background: var(--surface-2); }
.glink--all { padding: 9px 6px; margin-bottom: 2px; font-weight: 600; }
.glink[aria-current="page"] { background: var(--accent-soft); color: #8F3207; font-weight: 600; }
.gsec__head.is-empty, .glink.is-empty { color: #9AA0A5; }
.glink.is-empty[aria-current="page"] { color: #8F3207; }
.active-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.active-tags:empty { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 14px; border-radius: 999px;
  background: var(--accent-soft); color: #8F3207; border: 0; font-weight: 600; font-size: .875rem; cursor: pointer;
}
.tag svg { width: 14px; height: 14px; }
.tag:hover { background: #F2D3BF; }
.tag--clear { background: none; color: var(--ink-soft); text-decoration: underline; font-weight: 500; padding: 0 6px; }
.tag--clear:hover { background: none; color: var(--ink); }
.empty__img { width: 120px; height: 120px; object-fit: contain; }
@media (max-width: 1020px) { .cat-side .filters { position: fixed; } }

/* ---------- реальные фото, теги, «показать ещё» ---------- */
.pack-ph--photo { background: #fff; border: 1px solid var(--line); padding: 6px; display: grid; place-items: center; }
.pack-ph--photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.item__packs .t-appl { background: var(--accent-soft); border-color: transparent; color: #8F3207; }
.item__name { overflow-wrap: anywhere; }
.gcnt { color: var(--ink-soft); font-size: .8125rem; font-variant-numeric: tabular-nums; margin-left: 4px; }
.check.is-zero { opacity: .45; }
.more { justify-self: center; margin-top: 8px; }
.item__name a { text-decoration: none; color: inherit; }
.item__name a:hover { color: var(--accent); }
a.pack-ph { text-decoration: none; }

/* SEO-текст раздела */
.seo-text { padding-bottom: clamp(56px, 8vw, 104px); }
.seo-text[hidden] { display: none; }
.seo-text__inner { max-width: 820px; border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 48px); }
.seo-text h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); font-weight: 720; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 20px; }
.seo-text h3 { font-family: var(--f-display); font-size: clamp(1.125rem, 1.05rem + .4vw, 1.375rem); font-weight: 650; margin: 28px 0 10px; }
.seo-text p, .seo-text li { font-size: 1.0156rem; line-height: 1.7; color: #343A3F; }
.seo-text p { margin-bottom: 14px; }
.seo-text ul { margin: 0 0 16px; padding-left: 1.2em; display: grid; gap: 6px; }
.seo-text strong { color: var(--ink); font-weight: 650; }

/* ---------- вопросы и ответы ---------- */
.faq { display: grid; gap: 0; margin-top: 8px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; line-height: 1.35; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font-size: 1.4rem; font-weight: 400; color: var(--ink-soft); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; line-height: 1.6; color: #343A3F; max-width: 70ch; }

.citystrip { margin: 0 0 14px; font-size: .9375rem; color: var(--ink-soft); }
.citystrip b { color: var(--ink); }
