/* catalog.css — template «Категория (и поиск)», 017 demo, build P6 (agent catalog, 27.09.2026). Map NEW_MAP_2 §2 B1–B6.
   Category styles — site/DESIGN.md «Стиль категорий» (background of the section = style of the head photo).
   Motion: transform and opacity only. Colours: tokens of base.css + the section backgrounds named in DESIGN.md. */

.cat { position: relative; --cbg: var(--paper); }

/* ---------- 2.B1 head ---------- */
.chd { position: relative; overflow: hidden; isolation: isolate; }
.chd--photo { height: clamp(520px, 43vw, 680px); }
.chd__img { position: absolute; inset: 0; z-index: -2; }
.chd__img img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; }
.chd__shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.chd--photo .chd__shade { background: linear-gradient(90deg, rgba(247, 243, 236, .78) 0%, rgba(247, 243, 236, .42) 36%, rgba(247, 243, 236, 0) 56%); }
.cat--dark .chd--photo .chd__shade { background: linear-gradient(90deg, rgba(13, 26, 69, .74) 0%, rgba(13, 26, 69, .36) 38%, rgba(13, 26, 69, 0) 58%); }
.cat--krevetki .chd--photo .chd__shade, .cat--ikra .chd--photo .chd__shade { background: linear-gradient(90deg, rgba(244, 247, 250, .6) 0%, rgba(244, 247, 250, .25) 36%, rgba(244, 247, 250, 0) 54%); }
.chd__pattern { display: none; }
.chd--paper .chd__pattern { display: block; opacity: .07; }
.chd__in { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 30px; padding-bottom: 104px; }
.chd--paper .chd__in { padding-top: 56px; padding-bottom: 150px; min-height: 470px; }
.chd .crumbs { margin-bottom: 26px; }
.chd__cap { display: block; margin-bottom: 18px; }
.chd__t { margin: 0; font: 500 clamp(64px, 6.4vw, 100px)/.92 var(--serif); letter-spacing: -.012em; max-width: 9.5em; }
.chd__t--s { font-size: clamp(88px, 9.4vw, 148px); letter-spacing: -.02em; }
.chd__t--m { font-size: clamp(64px, 6.4vw, 100px); }
.chd__t--l { font-size: clamp(52px, 5vw, 80px); max-width: 8.6em; }
.chd__lead { margin: 22px 0 0; max-width: 31ch; color: var(--ink-2); }
.cat--dark .chd { color: #fff; }
.cat--dark .chd .crumbs { color: rgba(255, 255, 255, .78); }
.cat--dark .chd__lead { color: rgba(255, 255, 255, .84); }
.cat--search .chd__lead, .cat--all .chd__lead { color: var(--ink-2); }
.chd__gull { width: 118px; left: 25%; top: 26px; opacity: .88; z-index: 2; }
.cat--dark .chd__gull { filter: brightness(0) invert(1); opacity: .72; }
.chd--paper .chd__gull { left: auto; right: 34%; top: 60px; opacity: .7; }
.chd__draw { display: none; }
.chd--paper .chd__draw { display: block; right: var(--g); top: 48px; width: min(32vw, 430px); z-index: 1; }
.cat--search .chd__draw { width: min(24vw, 300px); top: 70px; right: calc(var(--g) + 60px); }
.chd__srch { position: relative; display: flex; align-items: center; max-width: 540px; margin-top: 28px; }
.chd__srch[hidden] { display: none; }
.chd__srch svg { position: absolute; left: 22px; width: 18px; height: 18px; pointer-events: none; }
.chd__srch input { width: 100%; height: 58px; border: 1px solid var(--ink-3); border-radius: 29px; background: rgba(255, 255, 255, .72); padding: 0 24px 0 54px; font-size: 18px; box-shadow: 0 18px 40px -26px rgba(13, 26, 69, .45); }

/* ---------- body of the page in the direction's colour ---------- */
.cbody { position: relative; padding: 0 0 130px; background: var(--cbg); }
.cbody .wave--top { z-index: 2; }
.cbody__pattern { opacity: .05; }
.cat--krevetki .cbody { background: linear-gradient(#e7eef6, #f4f7fa 26%, var(--paper) 70%); }
.cat--ikra .cbody { background: linear-gradient(#dfeaf7, var(--paper) 75%); }
.cat--ryba .cbody, .cat--lobster .cbody { background: #f7f3ec; }
.cat--dark .cbody { color: #fff; }
.cat--dark .cbody__pattern { background-image: url(../img/pattern_w.webp); opacity: .05; }
.cat--all .cbody, .cat--search .cbody { background: none; padding-top: 6px; }
.cat--all .cbody__pattern, .cat--search .cbody__pattern { display: none; }
.cbody > .wrap { position: relative; z-index: 3; }
.cat--nosubs .cbody { padding-top: 40px; }

/* ---------- 2.B1 circles ---------- */
.csub { position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: -92px; padding-bottom: 34px; }
.csub__it { display: grid; justify-items: center; align-content: start; gap: 12px; width: 124px; text-align: center; }
.csub__ring { position: relative; display: block; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--paper-2);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px rgba(22, 36, 94, .28), 0 22px 36px -14px rgba(13, 26, 69, .55); transition: transform .6s var(--out); }
.csub__ring img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; transform: scale(1.28); transition: transform 1s var(--out); }
.csub__ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--red); opacity: 0; transform: scale(.9); transition: opacity .35s, transform .5s var(--out); }
.csub__it:hover .csub__ring { transform: translateY(-5px); }
.csub__it:hover .csub__ring img { transform: scale(1.42); }
.csub__it:hover .csub__ring::after { opacity: 1; transform: none; }
.csub__it b { font: 500 20px/1.08 var(--serif); }
.csub__it small { font-size: 13px; color: var(--ink-2); margin-top: -6px; }
.cat--dark .csub__ring { box-shadow: 0 0 0 5px var(--cbg), 0 0 0 6px rgba(255, 255, 255, .4), 0 22px 36px -14px rgba(0, 0, 0, .6); }
.csub--cats { margin-top: -110px; gap: 18px; justify-content: space-between; }
.csub--cats .csub__it { width: 168px; }
.csub--cats .csub__ring { width: 136px; height: 136px; background: var(--paper) url(../img/paper.webp); }
.csub--cats .csub__ring img { object-fit: contain; padding: 18px; transform: none; }
.csub--cats .csub__it:hover .csub__ring img { transform: rotate(-6deg) scale(1.06); }

/* ---------- 2.B2 filters ---------- */
.cfl { margin: 8px 0 34px; padding: 18px 0 14px; border-top: 1px solid currentColor; border-bottom: 4px double currentColor; }
.cat--dark .cfl { border-color: rgba(255, 255, 255, .55); }
.cfl__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; }
.cfl__g { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cfl__l { margin-right: 4px; font-size: 11.5px; opacity: .7; }
.cfl__sort { margin-left: auto; }
.cfl .chip { height: 38px; padding: 0 15px; }
.cfl__st { display: flex; align-items: center; gap: 22px; min-height: 22px; margin-top: 12px; }
.cfl__st .t-cap { font-size: 11.5px; opacity: .7; }
.cfl__reset { font: 600 13px var(--sans); text-decoration: underline; text-underline-offset: 4px; color: var(--red); }
.cfl__reset[hidden] { display: none; }
.cat--dark .chip { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .06); color: #fff; }
.cat--dark .chip::before { background: #fff; }
.cat--dark .chip:hover, .cat--dark .chip.is-on { color: var(--ink); }
.cat--dark .cfl__reset { color: var(--coral); }

/* ---------- 2.B4 hint ---------- */
.chint { margin: 0 0 40px; border-radius: 22px; background: var(--paper) url(../img/paper.webp); color: var(--ink); box-shadow: 0 1px 0 var(--ink-3), 0 26px 50px -34px rgba(13, 26, 69, .5); overflow: hidden; }
.chint[hidden] { display: none; }
.chint__q { width: 100%; display: grid; grid-template-columns: 70px 1fr 38px; align-items: center; gap: 22px; padding: 16px 26px 16px 20px; text-align: left; }
.chint__q > img { height: 64px; width: auto; justify-self: center; transition: transform .8s var(--out); }
.chint__q:hover > img { transform: rotate(-10deg) scale(1.06); }
.chint__txt .t-cap { display: block; margin-bottom: 7px; font-size: 11px; opacity: .66; }
.chint__txt b { font: 500 clamp(22px, 1.8vw, 28px)/1.15 var(--serif); }
.chint__q i { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-3); position: relative; transition: transform .45s var(--out); }
.chint__q i::before, .chint__q i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.chint__q i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .45s var(--out); }
.chint.is-open .chint__q i { transform: rotate(180deg); }
.chint.is-open .chint__q i::after { transform: translate(-50%, -50%) rotate(0deg); }
.chint__a { display: none; padding: 6px 26px 30px; border-top: 1px solid var(--ink-3); }
.chint.is-open .chint__a { display: block; animation: accin .5s var(--out); }
.chint__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.chint__cell { display: grid; justify-items: center; align-content: end; gap: 6px; padding: 22px 12px 4px; text-align: center; }
.chint__cell + .chint__cell { border-left: 1px solid var(--ink-3); }
.chint__cell img { width: auto; margin-bottom: 8px; }
.chint__cell b { font: 500 46px/1 var(--serif); }
.chint__cell span { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.chint__prod { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 13px/1.3 var(--sans); color: var(--red); text-align: left; }
.chint__prod svg { width: 16px; height: 16px; flex: none; }
.chint__shr { display: grid; grid-template-columns: auto auto 1fr; align-items: end; gap: 40px; padding-top: 22px; }
.chint__shr figure { margin: 0; display: grid; justify-items: center; gap: 8px; }
.chint__shr img { width: auto; }
.chint__shr b { font: 500 40px/1 var(--serif); }
.chint__shr p { margin: 0; align-self: center; max-width: 52ch; font: 400 17px/1.55 var(--sans); color: var(--ink-2); }

/* ---------- 2.B3 grid: lead cards (R16) and tiles ---------- */
.cgr { position: relative; min-height: 200px; }
.cgr:empty, .cgr:has(+ .cemp:not([hidden])) { min-height: 0; }  /* r2: an empty result kept a 200 px hole above the empty-state card */
.clead { display: grid; gap: 24px; margin-bottom: 44px; }
.clead--2 { grid-template-columns: 1fr 1fr; }
.clead--3 { grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.lc { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; min-height: 470px; padding: 40px 0 0 40px; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: var(--paper) url(../img/paper.webp); color: var(--ink); box-shadow: 0 34px 70px -40px rgba(13, 26, 69, .6); }
.lc--big { grid-template-columns: 1fr 1.1fr; min-height: 580px; padding: 60px 0 0 72px; }
.lc__text { position: relative; z-index: 3; align-self: center; padding-bottom: 40px; }
.lc__new { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 50%; background: var(--red); color: #fff; font: 700 11px/1 var(--sans); letter-spacing: .06em; transform: rotate(-12deg); }
.lc__name { display: block; font: 500 clamp(30px, 2.5vw, 40px)/1.04 var(--serif); letter-spacing: -.005em; }
.lc--big .lc__name { font-size: clamp(40px, 3.6vw, 58px); max-width: 11em; }
.lc__lines { list-style: none; margin: 18px 0 0; padding: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.lc__lines li { position: relative; padding-left: 20px; }
.lc__lines li + li { margin-top: 5px; }
.lc__lines li::before { content: "◆"; position: absolute; left: 0; top: 1px; font-size: 8px; color: var(--cobalt); }
.lc__stock { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; font: 600 13px/1 var(--sans); letter-spacing: .04em; }
.lc__stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1f9e57; box-shadow: 0 0 0 4px rgba(31, 158, 87, .16); }
.lc__gift { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font: 500 14px/1.3 var(--sans); }
.lc__gift img { width: 40px; height: auto; }
.lc__ask { margin: 0; font-size: 14px; color: var(--ink-2); }
.lc__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.lc__more { width: 44px; height: 44px; border-radius: 50%; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.lc__more::after { display: none; }
.lc__pic { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 100%; }
.lc__wave { position: absolute; left: -10%; bottom: 0; width: 110%; height: 50%; color: var(--cobalt); z-index: 0; }
.lc__w1 { opacity: .34; animation: lcw 7s var(--inout) infinite alternate; }
.lc__w2 { opacity: .96; }
@keyframes lcw { to { transform: translateY(12px); } }
.lc__fr { position: relative; z-index: 1; width: min(74%, 290px); }
.lc--big .lc__fr { width: min(64%, 360px); }
.lc__img { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 22px 22px 0 0; overflow: hidden; box-shadow: 0 -10px 40px -18px rgba(13, 26, 69, .45); }
.lc__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out), opacity .6s; }
.lc__img .alt { opacity: 0; }
.lc:hover .lc__img img { transform: scale(1.05); }
.lc:hover .lc__img .alt { opacity: 1; }
.seal { position: absolute; z-index: 4; top: 22px; left: -58px; width: 124px; height: 124px; transform: rotate(-10deg); }
.lc--big .seal { left: -70px; top: 34px; width: 144px; height: 144px; }
.seal__in { position: relative; width: 100%; height: 100%; display: grid; place-content: center; text-align: center; color: #fff; transition: transform .9s var(--out); }
.seal__bg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--ink); filter: drop-shadow(0 12px 18px rgba(13, 26, 69, .35)); }
.seal b { position: relative; font: 600 21px/1 var(--sans); white-space: nowrap; }
.lc--big .seal b { font-size: 24px; }
.seal small { position: relative; display: block; margin-top: 6px; font: 500 11px/1.15 var(--sans); letter-spacing: .03em; opacity: .82; max-width: 84px; justify-self: center; }
.lc:hover .seal__in { transform: rotate(14deg) scale(1.04); }
.cat--dark .lc { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .75); }
.cat--rakushki .lc__wave, .cat--krab .lc__wave { color: var(--cobalt); }
.cat--ryba .lc__wave, .cat--lobster .lc__wave { color: var(--ink); }

.cgr__tiles .tile__img, .clead--3 .tile__img { box-shadow: 0 24px 50px -28px rgba(13, 26, 69, .45); }
/* the gift label's scissors: base.css `.tile__img img` makes it absolute and it covers «Но…» — keep it in the row */
.tile__img .gift img { position: static; inset: auto; width: 34px; height: auto; }
.cat--dark .tile__img { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.cat--dark .tile__name { color: #fff; }
.cat--dark .tile__meta, .cat--dark .price small, .cat--dark .tile__buy .t-small { color: rgba(255, 255, 255, .7); }
.cat--dark .step { color: #fff; }
.cat--dark .add::before { background: #fff; }
.cat--dark .add:hover { color: var(--ink); }

/* whole catalog: a group per direction */
.cgrp { margin-bottom: 70px; }
.cgrp__head { display: flex; align-items: center; gap: 18px; padding: 0 0 18px; margin-bottom: 28px; border-bottom: 1px solid var(--ink-3); }
.cgrp__head img { height: 58px; width: auto; transition: transform .8s var(--out); }
.cgrp__head:hover img { transform: rotate(-8deg) scale(1.06); }
.cgrp__head .t-cap { font-size: 11.5px; opacity: .62; }
.cgrp__all { margin-left: auto; }

/* ---------- 2.B6 nothing found ---------- */
.cemp { margin: 6px 0 20px; }
.cemp[hidden] { display: none; }
.cemp__card { position: relative; display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 36px; padding: 44px 56px 46px 44px; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: var(--paper) url(../img/paper.webp); color: var(--ink); box-shadow: 0 1px 0 var(--ink-3), 0 30px 60px -36px rgba(13, 26, 69, .5); }
.cemp__shell { width: 190px; justify-self: center; animation: cbob 5.5s var(--inout) infinite alternate; }
@keyframes cbob { to { transform: translateY(-10px) rotate(-7deg); } }
.cemp__mermaid { position: absolute; right: -14px; bottom: -40px; width: 180px; opacity: .16; z-index: -1; transform: rotate(8deg); }
.cemp__text .t-h3 { max-width: 22em; }
.cemp__tel { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; white-space: nowrap; }
.cemp__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cemp__btns [hidden] { display: none; }
.cemp__cap { display: block; margin: 54px 0 22px; }
.cat--dark .cemp__cap { color: rgba(255, 255, 255, .8); }

/* ---------- 2.B5 bar + the toast above it ---------- */
.freebar__note { margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .62); }
.page-cat .toast { bottom: 132px; }

/* dark directions flow straight into the sea of the footer (its own wave stays as the seam) */
.page-cat--dark .ftr { margin-top: 0; }

@media (max-width: 1180px) {
  .grid4.cgr__tiles, .cemp__grid { grid-template-columns: repeat(3, 1fr); }
  .clead--2 { grid-template-columns: 1fr; }
  .csub--cats { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .grid4.cgr__tiles, .cemp__grid, .clead--3 { grid-template-columns: repeat(2, 1fr); }
  .lc, .lc--big { grid-template-columns: 1fr; padding: 28px 24px 0; }
  .chint__row { grid-template-columns: repeat(3, 1fr); }
  .cemp__card { grid-template-columns: 1fr; }
}
