/* =========================================================
   SAFI · HASSA — стиль как в каталогах HASSA:
   шоколадный фон, кремовый текст, золотой акцент, EB Garamond + Inter,
   капс с разрядкой, бронзовый акцент, курсивные описания.
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #3b2a20;           /* тёплый шоколад */
  --bg-alt: #463327;       /* чуть светлее — блоки, итог корзины */
  --img-bg: #efe6da;       /* песочная подложка под фото товаров */
  --ink: #f4ece1;          /* кремовый текст */
  --ink-soft: #ddd0bf;     /* курсивные описания */
  --muted: #c3b19b;        /* подписи */
  --line: #5a4536;
  --acc: #d4ad6a;          /* золото */
  --dark: #261b14;         /* самые тёмные блоки (подвал, промо) */
  --on-dark: #f4ece1;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --text: var(--ink);
}

/* ================= База ================= */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; line-height: 1.02; margin: 0 0 .35em; }
h1 { font-size: clamp(40px, 5vw, 72px); }
h2 { font-size: clamp(32px, 3.6vw, 52px); }
h3 { font-size: 26px; }
.container { max-width: 1360px; margin: 0 auto; padding: 0 48px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.serif { font-family: var(--serif); }
[hidden] { display: none !important; }

/* подписи капсом с разрядкой — главный приём каталогов */
.eyebrow, .cap {
  font: 500 12px/1.4 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px;
}
.traits { font: 600 11px/1.5 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin: 6px 0 0; }
.no { font: italic 400 26px/1 var(--serif); color: var(--acc); }
.lead { font: italic 400 22px/1.45 var(--serif); color: var(--ink-soft); }

/* ссылка «КУПИТЬ НА KASPI ›» как в каталоге */
.link, .cta-line {
  display: inline-flex; align-items: center; gap: 14px; background: none; border: 0; padding: 0 0 7px; cursor: pointer;
  font: 600 12px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1.5px solid currentColor;
}
.link { font-size: 11px; letter-spacing: .2em; }
.cta-line span { transition: transform .2s; }
.cta-line:hover span { transform: translateX(4px); }

/* ================= Кнопки ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 54px; padding: 0 30px; border: 1.5px solid var(--ink); border-radius: 0; cursor: pointer;
  font: 600 12px var(--sans); letter-spacing: .22em; text-transform: uppercase;
  transition: background .2s, color .2s, opacity .2s;
}
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: #000; }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--wide { width: 100%; }
.btn--square { width: 54px; padding: 0; flex: none; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg, .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.btn--square.is-on svg { fill: currentColor; }
.btn--kaspi { background: var(--acc); color: var(--dark); border-color: var(--acc); }
.btn--kaspi:hover { background: #000; }
.kaspi-mark { width: 24px; height: 24px; flex: none; }

/* ================= Шапка ================= */
.promo { background: var(--dark); color: var(--on-dark); text-align: center; font: 500 10.5px var(--sans); letter-spacing: .26em; text-transform: uppercase; padding: 10px 16px; }
.header { position: sticky; top: 0; z-index: 20; background: rgba(59,42,32,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 84px; }
.header__left, .header__right { display: flex; align-items: center; gap: 4px; }
.header__right { justify-content: flex-end; }
.gender-nav { display: flex; gap: 28px; font: 600 11px var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.gender-nav a { padding: 6px 0; border-bottom: 1.5px solid transparent; }
.gender-nav a:hover, .gender-nav a.is-on { border-color: var(--ink); }
.logo { display: block; }
.logo img { height: 52px; width: auto; }
.logo img.logo--safi { height: 50px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.badge:empty { display: none; }
.badge { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--acc); color: var(--dark); font-size: 10px; line-height: 16px; text-align: center; }
.burger { display: none; }

.cat-nav { display: flex; justify-content: center; gap: 36px; height: 48px; align-items: center; overflow-x: auto; scrollbar-width: none; font: 500 11px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a { white-space: nowrap; padding: 14px 0; border-bottom: 1.5px solid transparent; }
.cat-nav a:hover, .cat-nav a.is-on { color: var(--ink); border-color: var(--ink); }

.search-bar { border-top: 1px solid var(--line); padding: 18px 0; }
.search-bar input { width: 100%; height: 48px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; font: italic 22px var(--serif); outline: none; }

.drawer { position: fixed; inset: 0; z-index: 40; background: rgba(17,17,17,.45); }
.drawer__panel { width: min(330px, 86vw); height: 100%; background: var(--bg); padding: 16px 28px; overflow-y: auto; }

/* ================= Главная ================= */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: min(86vh, 820px); background: var(--bg); }
.hero__media { position: relative; overflow: hidden; background: var(--dark); order: 2; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero__text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 64px clamp(28px, 6vw, 110px); }
.hero__logo { height: 76px; width: auto; margin-bottom: 48px; }
.hero__text h1 { font-size: clamp(56px, 7vw, 112px); line-height: .92; margin: 0 0 18px; }
.hero__text .lead { margin: 0 0 40px; font-size: clamp(19px, 1.8vw, 25px); max-width: 26ch; }

.section { padding-top: 96px; padding-bottom: 8px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section__head h2 { margin: 0; }
.section__head .eyebrow { margin-bottom: 12px; }

.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.cat-tile { display: flex; flex-direction: column; gap: 4px; }
.cat-tile__img { aspect-ratio: 3/4; overflow: hidden; margin-bottom: 14px; background: var(--img-bg); }
.cat-tile__img img, .cat-tile__img svg { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-tile strong { font: 500 26px/1.1 var(--serif); }
.cat-tile span { font: italic 15px/1.4 var(--serif); color: var(--muted); }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

/* редакционный блок — как разворот каталога */
.editorial { display: grid; grid-template-columns: 1fr 1fr; margin-top: 110px; background: var(--dark); color: var(--on-dark); }
.editorial__img { min-height: 560px; overflow: hidden; }
.editorial__img img, .editorial__img svg { width: 100%; height: 100%; object-fit: cover; }
.editorial__text { padding: 72px clamp(28px, 6vw, 96px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.editorial__text .eyebrow { color: #c9a96a; }
.editorial__text h2 { color: #fff; }
.editorial__text .lead { color: #e2ded6; margin: 0 0 34px; max-width: 30ch; }
.editorial__text .cta-line { color: #fff; }

.brand-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.brand-tile { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--dark); color: #fff; }
.brand-tile__img, .brand-tile__img img, .brand-tile__img svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.brand-tile:hover .brand-tile__img img { transform: scale(1.04); }
.brand-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0) 35%, rgba(10,10,10,.8) 100%); }
.brand-tile__body { position: absolute; z-index: 1; left: 36px; right: 36px; bottom: 32px; }
.brand-tile__logo { height: 64px; width: auto; margin-bottom: 14px; }
.brand-tile__body p { font: italic 19px/1.4 var(--serif); color: rgba(255,255,255,.88); margin: 0 0 18px; max-width: 40ch; }
.brand-tile .cta-line { color: #fff; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 64px; padding-bottom: 64px; margin-top: 96px; border-top: 1px solid var(--line); }
.perks strong { display: block; font: 500 24px/1.15 var(--serif); margin-bottom: 8px; }
.perks span { font: italic 16px/1.4 var(--serif); color: var(--muted); }

/* ================= Карточка товара ================= */
.card { position: relative; display: flex; flex-direction: column; }
.card__img { position: relative; aspect-ratio: 3/4; overflow: hidden; display: block; background: var(--img-bg); }
.card__img img, .card__img > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s, opacity .4s; }
.card:hover .card__img img { transform: scale(1.03); }
.card__alt { opacity: 0; }
@media (hover: hover) { .card:hover .card__alt { opacity: 1; } }
.card__tag { position: absolute; top: 14px; left: 14px; z-index: 2; max-width: calc(100% - 64px); font: 600 9.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; background: var(--bg); padding: 6px 10px; }
.card__wish { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--ink); }
.card__wish svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.card__wish.is-on { color: var(--acc); }
.card__wish.is-on svg { fill: currentColor; }
.card__quick { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; text-align: center; background: var(--bg); font: 600 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; padding: 12px; opacity: 0; transform: translateY(8px); transition: .25s; }
.card:hover .card__quick { opacity: 1; transform: none; }
.card__soldout { position: absolute; right: 14px; bottom: 14px; z-index: 2; font-size: 11px; background: var(--ink); color: var(--bg); padding: 3px 8px; }
.card__info { display: flex; flex-direction: column; padding: 16px 0 0; gap: 2px; }
.card__brand { font: 600 9.5px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.card__name { font: 500 22px/1.15 var(--serif); margin-top: 4px; }
.card__traits { font: italic 14px/1.35 var(--serif); color: var(--muted); }
.card__price { margin-top: 8px; font: 500 13px var(--sans); letter-spacing: .04em; }

/* ================= Каталог ================= */
.crumbs { display: flex; gap: 10px; font: 500 10px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding: 28px 0 10px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; opacity: .5; }
.listing__head { display: flex; align-items: baseline; gap: 18px; margin: 10px 0 34px; flex-wrap: wrap; }
.listing__head h1 { margin: 0; }
.listing__head .muted { font: italic 20px var(--serif); }
.listing { display: grid; grid-template-columns: 210px 1fr; gap: 48px; padding-bottom: 80px; }
.filters details { border-top: 1px solid var(--line); padding: 16px 0; }
.filters summary { cursor: pointer; font: 600 10.5px var(--sans); letter-spacing: .24em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; }
.filters summary::after { content: '+'; color: var(--muted); }
.filters details[open] summary::after { content: '−'; }
.filters summary::-webkit-details-marker { display: none; }
.filters a { display: block; padding: 4px 0; font: 17px var(--serif); color: var(--muted); }
.filters a:first-of-type { margin-top: 10px; }
.filters a:hover { color: var(--ink); }
.filters a.is-on { color: var(--ink); font-style: italic; }
.filters a.is-on::before { content: '— '; color: var(--acc); }
.toolbar { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.toolbar label { display: flex; align-items: center; gap: 12px; font: 500 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.toolbar select { border: 0; border-bottom: 1px solid var(--ink); background: transparent; height: 36px; padding: 0 4px; font: italic 17px var(--serif); color: var(--ink); text-transform: none; letter-spacing: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); padding-bottom: 80px; }
.empty { padding: 72px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty p { font: italic 20px var(--serif); color: var(--muted); margin: 0; }
.empty--big { padding: 130px 0; }

/* ================= Модалка товара — как страница каталога ================= */
body.no-scroll { overflow: hidden; }
.pm { width: min(1180px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 48px); padding: 0; border: 0; background: var(--bg); color: var(--ink); box-shadow: 0 40px 100px rgba(10,10,10,.35); overflow: hidden; }
.pm[open] { animation: pm-in .25s ease-out; }
.pm::backdrop { background: rgba(17,17,17,.6); }
@keyframes pm-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pm__close { position: absolute; top: 12px; right: 12px; z-index: 3; background: var(--bg); border-radius: 50%; }
.pm__body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); max-height: calc(100vh - 48px); overflow-y: auto; }
.pm__gallery { position: sticky; top: 0; align-self: start; background: var(--img-bg); }
.pm__main { aspect-ratio: 4/5; overflow: hidden; }
.pm__main img, .pm__main svg { width: 100%; height: 100%; object-fit: cover; }
.pm__thumbs { display: flex; gap: 6px; padding: 10px; background: var(--bg); overflow-x: auto; }
.pm__thumb { flex: none; width: 60px; aspect-ratio: 3/4; padding: 0; border: 1px solid transparent; background: var(--img-bg); cursor: pointer; overflow: hidden; opacity: .55; }
.pm__thumb.is-on, .pm__thumb:hover { opacity: 1; border-color: var(--ink); }
.pm__thumb img, .pm__thumb svg { width: 100%; height: 100%; object-fit: cover; }
.pm__info { padding: 56px 52px 44px; display: flex; flex-direction: column; }
.pm__info .card__brand { margin-bottom: 18px; }
.pdp__name { font: 500 clamp(44px, 5vw, 76px)/.95 var(--serif); letter-spacing: -.01em; margin: 10px 0 4px; }
.pdp__price { font: 500 26px var(--serif); margin: 22px 0 6px; }
.pm__desc { font: italic 21px/1.45 var(--serif); color: var(--ink-soft); margin: 22px 0 0; }
.review { margin: 28px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.review__stars { color: var(--acc); letter-spacing: .2em; font-size: 13px; }
.review__text { font: italic 20px/1.4 var(--serif); margin: 8px 0 6px; }
.label { font: 600 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.sizes__list { display: flex; flex-wrap: wrap; gap: 8px; }
.sizes__list input { position: absolute; opacity: 0; pointer-events: none; }
.sizes__list span { display: inline-block; min-width: 72px; text-align: center; padding: 12px 16px; border: 1px solid var(--line); cursor: pointer; font: 500 13px var(--sans); }
.sizes__list input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sizes__list input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.pdp__actions { display: flex; gap: 8px; margin: 28px 0 12px; }
.pm__note { font: 500 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.stock { font-size: 12px; color: #9fcf9f; margin: 14px 0 0; }
.stock--low { color: #e3b067; }
.stock--out { color: #ec9a88; }
.accordion { margin-top: 30px; }
.accordion details { border-top: 1px solid var(--line); padding: 16px 0; }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary { cursor: pointer; font: 600 10.5px var(--sans); letter-spacing: .24em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; }
.accordion summary::after { content: '+'; color: var(--muted); }
.accordion details[open] summary::after { content: '−'; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion p { font: 17px/1.5 var(--serif); color: var(--ink-soft); margin: 10px 0 0; }
.pm__related { margin-top: 36px; }
.pm__related-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pm__related-list a { display: flex; flex-direction: column; gap: 6px; font: 15px/1.2 var(--serif); }
.pm__related-list img, .pm__related-list svg { aspect-ratio: 3/4; width: 100%; height: auto; object-fit: cover; background: var(--img-bg); }

/* ================= Корзина / оформление ================= */
.bag { display: grid; grid-template-columns: 1fr 380px; gap: 56px; padding-bottom: 80px; align-items: start; }
.line { display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); }
.line__img { aspect-ratio: 3/4; overflow: hidden; background: var(--img-bg); }
.line__img img, .line__img svg { width: 100%; height: 100%; object-fit: cover; }
.line__info { display: flex; flex-direction: column; gap: 4px; }
.line__info > a { font: 500 22px var(--serif); }
.line__right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); margin-top: 8px; align-self: flex-start; }
.qty button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 16px; }
.qty span { min-width: 28px; text-align: center; }
.summary { background: var(--bg-alt); padding: 32px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 150px; }
.summary h3 { margin: 0 0 6px; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.summary__row span:first-child { color: var(--muted); }
.summary__total { border-top: 1px solid var(--line); padding-top: 14px; font: 500 22px var(--serif); }
.summary__total span:first-child { color: var(--ink); }
.checkout { display: flex; flex-direction: column; gap: 28px; }
.checkout fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.checkout legend { font: 500 26px var(--serif); margin-bottom: 12px; }
.checkout label { display: flex; flex-direction: column; gap: 6px; font: 600 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.checkout input, .checkout select, .checkout textarea, .subscribe input {
  height: 48px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font: 17px var(--serif); text-transform: none; letter-spacing: 0; border-radius: 0;
}
.checkout textarea { height: auto; padding: 10px 2px; resize: vertical; }
.checkout input:focus, .checkout select:focus, .checkout textarea:focus, .subscribe input:focus { outline: none; border-color: var(--acc); }
.form-error { color: #a33a2a; font-size: 13px; margin: 0; }

.prose { max-width: 760px; padding-bottom: 80px; }
.prose h2 { margin-top: 44px; }
.prose p { font: 20px/1.55 var(--serif); color: var(--ink-soft); }
.prose a { border-bottom: 1px solid currentColor; }
.loading { padding: 140px 0; text-align: center; font: italic 22px var(--serif); color: var(--muted); }

/* ================= Подвал — тёмный, как обложка каталога ================= */
.footer { background: var(--dark); color: var(--on-dark); margin-top: 40px; }
.footer__brand { display: flex; align-items: center; justify-content: center; gap: 40px; padding: 72px 0 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__brand img { height: 74px; width: auto; }
.footer__brand .footer__safi { height: 58px; }
.footer__brand i { width: 1px; height: 56px; background: rgba(255,255,255,.2); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-top: 48px; padding-bottom: 48px; }
.footer h4 { margin: 0 0 16px; font: 600 10.5px var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #b9aa98; }
.footer a { display: block; font: 18px/1.7 var(--serif); color: var(--on-dark); }
.footer a:hover { color: #fff; font-style: italic; }
.footer p { font: italic 17px/1.45 var(--serif); color: #b9aa98; margin: 0 0 16px; }
.subscribe { display: flex; gap: 12px; max-width: 440px; }
.subscribe input { flex: 1; min-width: 0; color: #fff; border-color: rgba(255,255,255,.5); }
.subscribe input::placeholder { color: #9a968e; }
.subscribe .btn { height: 48px; background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; padding-bottom: 26px; font: 500 10px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #9a968e; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 14px 24px; font: 600 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ================= Адаптив ================= */
@media (max-width: 1100px) {
  .rail { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .gender-nav { display: none; }
  .burger { display: grid; }
  .pm__info { padding: 44px 34px 36px; }
}
@media (max-width: 860px) {
  .container { padding: 0 16px; }
  .header__row { height: 66px; }
  .logo img { height: 40px; }
  .logo img.logo--safi { height: 38px; }
  .cat-nav { justify-content: flex-start; gap: 26px; padding: 0 16px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__media { order: 0; aspect-ratio: 4/5; }
  .hero__text { padding: 36px 20px 48px; }
  .hero__logo { display: none; }
  .section { padding-top: 64px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .editorial { grid-template-columns: 1fr; margin-top: 72px; }
  .editorial__img { min-height: 0; aspect-ratio: 4/5; }
  .editorial__text { padding: 44px 20px 52px; }
  .brand-tiles { grid-template-columns: 1fr; }
  .brand-tile { aspect-ratio: 4/5; }
  .brand-tile__body { left: 22px; right: 22px; bottom: 24px; }
  .brand-tile__logo { height: 50px; }
  .listing { grid-template-columns: 1fr; gap: 0; }
  .filters { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 8px; }
  .filters details { border: 1px solid var(--line); padding: 10px 14px; flex: none; }
  .grid, .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 34px 10px; }
  .card__name { font-size: 19px; }
  .card__traits { display: none; }
  .rail { grid-auto-columns: 64%; }
  .bag { grid-template-columns: 1fr; gap: 28px; }
  .summary { position: static; }
  .line { grid-template-columns: 84px 1fr; }
  .line__right { grid-column: 2; flex-direction: row; align-items: center; }
  .perks { grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 64px; }
  .footer__brand { gap: 24px; padding: 48px 0 32px; }
  .footer__brand img { height: 52px; }
  .footer__brand .footer__safi { height: 42px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .pm { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; }
  .pm__body { grid-template-columns: minmax(0, 1fr); max-height: 100dvh; }
  .promo { letter-spacing: .14em; font-size: 9.5px; }
  .promo .promo__extra { display: none; }
  .pm__gallery { position: static; }
  .pm__info { padding: 30px 20px 48px; }
  .pdp__name { font-size: 46px; }
}
@media (max-width: 520px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .header__right { gap: 0; }
  .icon-btn { width: 36px; }
  .perks { grid-template-columns: 1fr; }
}
@media (hover: none) { .card__quick { display: none; } }

/* ================= Фото товара целиком (без обрезки) ================= */
/* предметные фото сняты на белом — показываем полностью на белой подложке */
.card__img, .cat-tile__img, .pm__main, .pm__thumb, .line__img { background: var(--img-bg); }
.card__img img, .card__img > svg,
.cat-tile__img img,
.pm__main img,
.pm__thumb img,
.line__img img,
.pm__related-list img { object-fit: contain; }
.card__img img, .card__img > svg { padding: 6%; }
.cat-tile__img img { padding: 8%; }
.pm__related-list img { background: var(--img-bg); padding: 6%; }
/* фото с моделью (второе фото при наведении) — на весь кадр */
.card__img .card__alt { object-fit: cover; padding: 0; }

/* белый фон предметных фото растворяется в песочной подложке */
.card__img img, .cat-tile__img img, .pm__main img, .pm__thumb img, .line__img img, .pm__related-list img { mix-blend-mode: multiply; }
.card__img .card__alt { mix-blend-mode: normal; }
.card__img, .cat-tile__img, .pm__main, .pm__thumb, .line__img, .pm__related-list img { isolation: isolate; }
.pm { box-shadow: 0 40px 120px rgba(0,0,0,.55); border: 1px solid var(--line); }
.editorial__img { background: var(--img-bg); isolation: isolate; }
.editorial__img img { mix-blend-mode: multiply; }
.editorial__text .eyebrow { color: var(--acc); }

/* ================= Варианты товара (цвет / размер / дизайн) ================= */
.label .variant-name { color: var(--ink); font-weight: 600; letter-spacing: .12em; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variant { min-width: 72px; padding: 11px 16px; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; font: 500 13px var(--sans); transition: border-color .15s; }
.variant:hover { border-color: var(--muted); }
.variant.is-on { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.variant:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.variants--pics .variant { width: 64px; min-width: 0; height: 80px; padding: 0; background: var(--img-bg); overflow: hidden; isolation: isolate; }
.variants--pics .variant img { width: 100%; height: 100%; object-fit: contain; padding: 6%; mix-blend-mode: multiply; }
.variants--pics .variant.is-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--acc); border-color: transparent; }
.card__variants { margin-top: 4px; font: 500 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }

/* больше категорий: меню не обрезается, плитки ровной сеткой */
.cat-nav { justify-content: safe center; gap: 28px; letter-spacing: .2em; }
@media (min-width: 1100px) { .cats { grid-template-columns: repeat(6, 1fr); } }

/* ================= Сортировка — текстовые вкладки вместо системного списка ================= */
.toolbar { align-items: center; gap: 18px; flex-wrap: wrap; }
.toolbar__label { font: 500 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sorter { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.sorter a { padding: 8px 16px; border-radius: 999px; font: italic 16px/1 var(--serif); color: var(--muted); white-space: nowrap; transition: color .15s, background .15s; }
.sorter a:hover { color: var(--ink); }
.sorter a.is-on { background: var(--acc); color: var(--dark); font-style: normal; font-weight: 500; }

/* ================= Фильтр размеров ================= */
.size-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.filters .size-filter a, .filters .size-filter a:first-of-type { margin: 0; padding: 6px 10px; border: 1px solid var(--line); font: 500 12px var(--sans); color: var(--muted); }
.filters .size-filter a:hover { border-color: var(--muted); color: var(--ink); }
.filters .size-filter a.is-on { border-color: var(--acc); color: var(--ink); font-style: normal; }
.filters .size-filter a.is-on::before { content: none; }
@media (max-width: 860px) {
  .toolbar { justify-content: flex-start; }
  .toolbar__label { display: none; }
  .sorter { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .sorter a { padding: 8px 12px; font-size: 15px; }
  .size-filter { max-width: 260px; }
}

/* ================= Круглые кнопки (закрыть) — всегда ровный круг ================= */
.round-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.round-btn:hover { border-color: var(--acc); }
.pm__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; background: rgba(59,42,32,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* фокус: только с клавиатуры и только золотом, без синего системного кольца */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.pm__body:focus, .pm__body:focus-visible { outline: none; }
a, button { -webkit-tap-highlight-color: transparent; }

/* ================= Боковое меню ================= */
.drawer { background: rgba(20,13,9,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.drawer:not([hidden]) .drawer__panel { animation: drawer-in .28s cubic-bezier(.2,.8,.2,1); }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
.drawer__panel { width: min(360px, 88vw); padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 4px; box-shadow: 20px 0 60px rgba(0,0,0,.35); padding-top: max(18px, env(safe-area-inset-top)); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer__logo img { height: 34px; width: auto; }
.drawer__search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 8px; }
.drawer__search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.drawer__search input { flex: 1; min-width: 0; border: 0; background: none; font: 15px var(--sans); color: var(--ink); }
.drawer__search input::placeholder { color: var(--muted); }
.drawer__label { font: 600 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.drawer__cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#drawer-nav .drawer__cat { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 12px; font: 500 16px/1.15 var(--serif); color: var(--ink); transition: border-color .15s; min-height: 56px; }
#drawer-nav .drawer__cat.is-on, #drawer-nav .drawer__cat:active { border-color: var(--acc); }
.drawer__cat-img { width: 44px; height: 44px; border-radius: 8px; background: var(--img-bg); overflow: hidden; isolation: isolate; }
.drawer__cat-img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.drawer__cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__cat-count { font: 500 11px var(--sans); color: var(--muted); }
#drawer-nav .drawer__all { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 13px 14px; border-radius: 12px; background: var(--acc); color: var(--dark); font: 600 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.drawer__brands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#drawer-nav .drawer__brands a { display: grid; place-items: center; height: 56px; border: 1px solid var(--line); border-radius: 12px; }
.drawer__brands img { max-height: 28px; width: auto; max-width: 80%; }
.drawer__links { margin-top: 16px; border-top: 1px solid var(--line); }
#drawer-nav .drawer__links a { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line); font: 17px var(--serif); color: var(--ink); }
.drawer__badge:empty { display: none; }
.drawer__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acc); color: var(--dark); font: 600 11px/20px var(--sans); text-align: center; }
.drawer__note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font: 12px var(--sans); color: var(--muted); }
.drawer__note .kaspi-mark { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .icon-btn { width: 40px; height: 40px; }
  .pm__close { top: max(12px, env(safe-area-inset-top)); }
}
#drawer-nav .drawer__cat { grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 0; font-size: 15.5px; }
.drawer__cat-img { grid-row: span 2; }
.drawer__cat-name { align-self: end; }
.drawer__cat-count { align-self: start; font-size: 10.5px; letter-spacing: .04em; }
.drawer__cat-count::after { content: ' шт.'; }
#drawer-nav .drawer__cat { grid-template-columns: 40px 1fr; column-gap: 8px; padding: 6px 8px 6px 6px; font-size: 15px; }
.drawer__cat-img { width: 40px; height: 40px; }
@media (prefers-reduced-motion: reduce) { .drawer:not([hidden]) .drawer__panel { animation: none; } }

/* ================= Фильтры: кнопка + шторка снизу (телефон/планшет) ================= */
.filter-btn { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink); font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; flex: none; }
.filter-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.filter-btn__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: var(--dark); font-size: 10px; letter-spacing: 0; }

.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 82dvh; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--ink); display: none; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,.4); }
.sheet[open] { display: flex; animation: sheet-in .28s cubic-bezier(.2,.8,.2,1); }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.sheet::backdrop { background: rgba(20,13,9,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet__head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 12px; border-bottom: 1px solid var(--line); }
.sheet__head h3 { margin: 0; font-size: 26px; }
.sheet__grip { position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
.sheet__body { overflow-y: auto; padding: 6px 20px 20px; outline: none; }
.sheet__label { font: 600 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-f { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font: 500 13px var(--sans); color: var(--ink); white-space: nowrap; }
.chip-f.is-on { background: var(--acc); border-color: var(--acc); color: var(--dark); }
.sheet__foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet__foot .btn { height: 48px; width: 100%; }

@media (max-width: 860px) {
  .listing .filters { display: none; }
  .filter-btn { display: inline-flex; }
  .toolbar { flex-wrap: nowrap; gap: 10px; margin-bottom: 18px; }
  .sorter { flex: 1; min-width: 0; }
  .listing__head { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.listing > * { min-width: 0; }
@media (max-width: 860px) { .listing { grid-template-columns: minmax(0, 1fr); } }
.sheet__foot .btn { white-space: nowrap; letter-spacing: .14em; padding: 0 12px; }
