/* Япоша — оптовый склад. Концепция: «красное солнце» логотипа на белом,
   каталог читается как аккуратный оптовый прайс: плотно, с ровными ценами. */
:root {
  --red: #d3202f;
  --red-dark: #a8121f;
  --red-tint: #fdeeee;
  --ink: #1d1716;
  --muted: #6f6461;
  --paper: #ffffff;
  --wash: #f8f4f2;
  --line: #ece3e0;
  --wa: #1fae5b;
  --ok: #1f8a4c;

  --f-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Golos Text', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(29, 23, 22, .05), 0 8px 24px rgba(29, 23, 22, .06);
  --wrap: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font: 16px/1.55 var(--f-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5.4vw, 56px); }
h2 { font-size: clamp(22px, 3.2vw, 32px); }
h3 { font-size: 18px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 60ch; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-line { border-color: var(--line); background: var(--paper); }
.btn-line:hover { border-color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; color: var(--muted); padding: 0 10px; }
.btn-ghost:hover { color: var(--red); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- шапка ---------- */
.topbar { background: var(--ink); color: #f1e9e6; font-size: 13px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar a:hover { color: #fff; }
.topbar-info { display: flex; gap: 18px; align-items: center; min-width: 0; }
.topbar-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; opacity: .8; }

.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-sun { width: 34px; height: 34px; border-radius: 50%; background: var(--red); box-shadow: inset 0 0 0 5px #fff, 0 0 0 1.5px var(--red); }
.logo-mark { height: 46px; width: auto; display: block; }
.logo-badge { display: inline-block; background: #fff; border-radius: 14px; padding: 8px 14px; line-height: 0; }
.logo-badge img { height: 84px; width: auto; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .04em; }
.logo-sub { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--wash); }
.nav a[aria-current="page"] { color: var(--red); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 14px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; }
.cart-btn:hover { background: var(--red-dark); }
.cart-btn svg { width: 20px; height: 20px; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--red); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.burger { display: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 50%; background: none; place-items: center; }
.burger svg { width: 20px; height: 20px; }

@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-left, 0px)) 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); }
  .burger { display: inline-grid; }
  .topbar .hide-sm { display: none; }
}
.topbar > .wrap > a { white-space: nowrap; flex: none; }
.lang-top { display: none; border-color: #3b3230; }
.lang-top button { color: #bfb3af; padding: 3px 9px; font-size: 12px; }
.lang-top button[aria-pressed="true"] { background: #fff; color: var(--ink); }
@media (max-width: 520px) {
  .lang-top { display: flex; }
  .lang-head, .topbar-info { display: none; }
  .header .wrap { gap: 10px; min-height: 60px; }
  .logo-sub { display: none; }
  .logo-name { font-size: 16px; }
  .logo-mark { height: 38px; }
  .logo-badge img { height: 68px; }
  .cart-btn { padding: 0 12px; }
  .cart-btn .cart-label { display: none; }
  .lang button { padding: 5px 8px; }
}

/* ---------- общие блоки ---------- */
main { min-height: 60vh; }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { max-width: 22ch; }
.link-more { font-weight: 600; color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.link-more:hover { text-decoration: underline; }
.page-head { padding-block: 36px 8px; }
.page-head h1 { font-size: clamp(28px, 4vw, 42px); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--red); }

/* ---------- главная: hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--wash); isolation: isolate; }
/* Фото склада: медленно «приближается» при загрузке; слева белая дымка, чтобы текст читался. */
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url(/assets/hero.webp) center right / cover no-repeat;
  animation: hero-zoom 14s ease-out both; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, .93) 0%, rgba(255, 255, 255, .82) 34%, rgba(255, 255, 255, .25) 58%, rgba(255, 255, 255, 0) 75%); }
@keyframes hero-zoom { from { transform: scale(1.1); } }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; padding-block: clamp(40px, 6vw, 72px); }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { margin: 18px 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-facts div { display: flex; flex-direction: column; }
.hero-facts b { font-family: var(--f-display); font-size: 26px; font-weight: 600; }
.hero-facts span { font-size: 14px; color: var(--muted); }

.sun-stage { position: relative; aspect-ratio: 1; max-width: 480px; width: 100%; margin-left: auto; }
.sun { position: absolute; inset: 8%; border-radius: 50%; background: var(--red);
  box-shadow: 0 30px 80px -20px rgba(211, 32, 47, .55); }
.sun::after { content: ''; position: absolute; inset: -4%; border-radius: 50%; border: 1.5px dashed rgba(211, 32, 47, .35); animation: spin 60s linear infinite; }
.sun-word { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: .14em; text-align: center; line-height: 1.2; }
.sun-word small { display: block; font-size: .42em; letter-spacing: .3em; opacity: .85; font-weight: 500; }
.tag { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 12px; padding: 10px 14px 10px 10px;
  box-shadow: 0 10px 30px rgba(29, 23, 22, .14); max-width: 230px; animation: bob 6s ease-in-out infinite; }
.tag .ph { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.tag .ph svg { width: 22px; height: 22px; }
.tag b { display: block; font-size: 13px; line-height: 1.25; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tag span { font-size: 13px; color: var(--red); font-weight: 700; }
.tag:nth-of-type(1) { top: 6%; left: -4%; }
.tag:nth-of-type(2) { top: 64%; right: 0; animation-delay: -2s; }
.tag:nth-of-type(3) { bottom: 0; left: 0; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .hero::before { background-position: 70% center; }
  .hero::after { background: linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, .78) 50%, rgba(255, 255, 255, .15) 100%); }
  .hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px; }
  .hero-facts span { font-size: 13px; line-height: 1.3; }
  .hero .wrap { grid-template-columns: 1fr; }
  .sun-stage { max-width: 340px; margin: 8px auto 0; }
  .tag { max-width: 190px; padding: 8px 10px 8px 8px; }
  .tag .ph { width: 34px; height: 34px; }
}

/* ---------- категории ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.cat:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.cat-ic svg { width: 24px; height: 24px; }
.cat b { font-weight: 600; line-height: 1.3; }
.cat span { font-size: 13px; color: var(--muted); margin-top: -10px; }
@media (max-width: 520px) { .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .cat { padding: 14px; } }

/* ---------- карточки товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); overflow: hidden; min-width: 0;
  transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow); border-color: #e2d6d2; }
.ph { display: grid; place-items: center; background: var(--wash); color: var(--red); }
.ph svg { width: 40%; height: 40%; max-width: 64px; opacity: .9; }
.card .ph, .card .pic { aspect-ratio: 4 / 3; width: 100%; }
.card .pic { object-fit: cover; background: var(--wash); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.card-cat { font-size: 12px; color: var(--muted); }
.card-name { font-weight: 500; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-weight: 500; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--red); color: #fff; }
.badge.out { background: var(--wash); color: var(--muted); }
.add { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; transition: background .15s; }
.add:hover { background: var(--red-dark); }
.add svg { width: 20px; height: 20px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--red); border-radius: 999px; height: 42px; flex: none; }
.stepper button { width: 38px; height: 100%; border: 0; background: none; color: var(--red); display: grid; place-items: center; }
.stepper button svg { width: 16px; height: 16px; }
.stepper input { width: 40px; border: 0; text-align: center; font-weight: 700; background: none; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px; }
  .card-name { font-size: 14px; }
  .price { font-size: 16px; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card-foot .buy { display: flex; }
  .card .add { width: 100%; border-radius: 999px; height: 40px; }
  .card .stepper { width: 100%; height: 40px; justify-content: space-between; }
}

/* ---------- преимущества / шаги ---------- */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.why > div { padding: 24px; border-right: 1px solid var(--line); background: var(--paper); }
.why > div:last-child { border-right: 0; }
.why svg { width: 28px; height: 28px; color: var(--red); margin-bottom: 14px; }
.why b { display: block; font-weight: 600; margin-bottom: 6px; }
.why p { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .why { grid-template-columns: 1fr 1fr; } .why > div:nth-child(2) { border-right: 0; } .why > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } .why > div { border-right: 0; border-bottom: 1px solid var(--line); } .why > div:last-child { border-bottom: 0; } }

/* фото склада рядом с преимуществами: слева снимок, справа 2×2 карточки */
.why-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.why-wrap .why { grid-template-columns: 1fr 1fr; }
.why-wrap .why > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why-wrap .why > div:nth-child(2n) { border-right: 0; }
.why-wrap .why > div:nth-last-child(-n+2) { border-bottom: 0; }
.photo { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; min-height: 280px; background: var(--wash); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.photo:hover img { transform: scale(1.04); }
.photo figcaption { position: absolute; left: 14px; bottom: 14px; background: var(--red); color: #fff; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
@media (max-width: 960px) { .why-wrap { grid-template-columns: 1fr; } .photo { aspect-ratio: 1024 / 545; min-height: 0; } }
@media (max-width: 520px) {
  .why-wrap .why { grid-template-columns: 1fr; }
  .why-wrap .why > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .why-wrap .why > div:last-child { border-bottom: 0; }
}

/* полоса «Не нашли товар?» поверх фото соусов */
.band.band-photo { min-height: 300px; background:
  linear-gradient(90deg, rgba(29, 23, 22, .92) 0%, rgba(29, 23, 22, .72) 45%, rgba(29, 23, 22, .1) 100%),
  url(/assets/photo-sauces.webp) center / cover no-repeat; }
.band.band-photo::after { display: none; }
.band.band-photo .btn { background: var(--wa); color: #fff; }
.band.band-photo .btn:hover { background: var(--wa); filter: brightness(.95); }
@media (max-width: 640px) { .band.band-photo { background:
  linear-gradient(180deg, rgba(29, 23, 22, .9) 0%, rgba(29, 23, 22, .75) 60%, rgba(29, 23, 22, .45) 100%),
  url(/assets/photo-sauces.webp) 70% center / cover no-repeat; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.step { padding: 24px; border-radius: var(--r); background: var(--wash); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--f-display); font-weight: 600; margin-bottom: 16px; }
.step b { display: block; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.band { background: var(--red); color: #fff; border-radius: calc(var(--r) * 1.4); padding: clamp(28px, 5vw, 48px); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.band::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08); }
.band h2 { max-width: 20ch; }
.band p { opacity: .85; margin-top: 8px; }
.band .btn { background: #fff; color: var(--red); position: relative; z-index: 1; }
.band .btn:hover { background: var(--red-tint); }

/* ---------- отзывы ---------- */
.stars { display: inline-block; font-size: 18px; line-height: 1; letter-spacing: 2px; }
.stars::before { content: '★★★★★'; background: linear-gradient(90deg, #f5a524 calc(var(--v) / 5 * 100%), #e2d8d5 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rev { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.rev-score { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 12px; position: sticky; top: 90px; }
.rev-gis { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #1e7bf2; }
.rev-gis svg { width: 28px; height: 28px; }
.rev-big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rev-big b { font-family: var(--f-display); font-size: 56px; font-weight: 600; line-height: 1; }
.rev-big .stars { font-size: 24px; }
.rev-score p { color: var(--muted); font-size: 15px; }
.rev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rev-side h3 { font-family: var(--f-body); font-weight: 600; font-size: 17px; margin-bottom: 12px; }
.rev-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rev-tags span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.rev-tags svg { width: 16px; height: 16px; color: var(--ok); }
.rev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 20px; }
.rev-card { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rev-card figcaption { display: flex; align-items: center; gap: 10px; }
.rev-card figcaption > span:nth-child(2) { min-width: 0; flex: 1; }
.rev-card b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-card small { font-size: 12px; color: var(--muted); margin-left: 8px; }
.rev-card .stars { font-size: 13px; letter-spacing: 1px; }
.rev-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--red-tint); color: var(--red); display: grid; place-items: center; font-weight: 700; flex: none; text-transform: uppercase; }
.rev-card blockquote { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.rev-src { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rev-src svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .rev { grid-template-columns: 1fr; } .rev-score { position: static; } }
.socials a.gis { background: #fff; border-color: #fff; }
.socials a.gis:hover { background: #fff; transform: scale(1.08); }
.socials a { transition: background .15s, border-color .15s, transform .15s; }
.info-card svg.gis-ic, .info-card .gis-ic svg { width: 30px; height: 30px; }

/* ---------- каталог ---------- */
.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding-block: 20px 72px; }
.catalog > * { min-width: 0; }
.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.side a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 15px; color: var(--ink); }
.side a span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.side a:hover { background: var(--wash); }
.side a[aria-current="true"] { background: var(--red-tint); color: var(--red); font-weight: 600; }
.chips { display: none; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; display: inline-flex; gap: 6px; align-items: baseline; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chips a span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips a[aria-current="true"] span { color: #bfb3af; }
.tools { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search { flex: 1 1 280px; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 16px 0 44px; background: var(--paper); }
.search input:focus { border-color: var(--ink); outline: none; }
.select { height: 48px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; background: var(--paper); }
.result-info { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.more { display: flex; justify-content: center; margin-top: 24px; }
.empty { text-align: center; padding: 56px 16px; border: 1.5px dashed var(--line); border-radius: var(--r); color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
@media (max-width: 860px) {
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { display: none; }
  .chips { display: flex; }
}

/* ---------- корзина ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; padding-block: 20px 72px; }
.lines { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto 40px; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .ph, .line .pic { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; }
.line-name { font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.line-unit { font-size: 13px; color: var(--muted); }
.line-sum { font-weight: 700; min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.line .stepper { height: 38px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: var(--wash); color: var(--red); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .line { grid-template-columns: 56px minmax(0, 1fr) 36px; grid-template-areas: "ph name del" "ph step sum"; row-gap: 8px; padding: 12px; }
  .line .ph, .line .pic { grid-area: ph; width: 56px; height: 56px; align-self: start; }
  .line-info { grid-area: name; } .line .stepper { grid-area: step; justify-self: start; } .line-sum { grid-area: sum; min-width: 0; } .line .icon-btn { grid-area: del; }
}
.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--paper); position: sticky; top: 84px; }
.panel h2 { font-size: 20px; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-variant-numeric: tabular-nums; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 20px; }
.note { font-size: 13px; color: var(--muted); }
.form { display: grid; gap: 14px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field label, .legend { font-size: 14px; font-weight: 600; }
.field label small { font-weight: 400; color: var(--muted); }
.input { width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; background: var(--paper); }
.input:focus { outline: none; border-color: var(--ink); }
textarea.input { min-height: 84px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--red); }
.err { font-size: 13px; color: var(--red); }
.seg { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; text-align: center; min-height: 46px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 14px; font-weight: 500; cursor: pointer; line-height: 1.25; }
.seg input:checked + span { border-color: var(--red); background: var(--red-tint); color: var(--red); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.alert { padding: 12px 14px; border-radius: var(--r-sm); background: var(--red-tint); color: var(--red-dark); font-size: 14px; }
@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } .panel { position: static; } }

.done { max-width: 620px; margin: 40px auto 80px; text-align: center; }
.done-mark { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; }
.done-mark svg { width: 40px; height: 40px; }
.done p { color: var(--muted); margin: 12px auto 24px; max-width: 46ch; }
.done .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.done-list { text-align: left; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 0 0 24px; font-size: 14px; }
.done-list div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }

/* ---------- текстовые страницы ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; padding-block: 20px 72px; }
.info-card { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.info-card svg { width: 26px; height: 26px; color: var(--red); }
.info-card h3 { font-family: var(--f-body); font-weight: 600; font-size: 17px; }
.info-card p { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.info-card .big { font-family: var(--f-display); font-size: 22px; color: var(--ink); font-weight: 600; }
.info-card .btn { align-self: flex-start; margin-top: auto; }
.copy { border: 0; background: none; color: var(--red); font-weight: 600; font-size: 14px; padding: 0; }

/* ---------- подвал ---------- */
.footer { background: var(--ink); color: #d9cfcc; margin-top: 40px; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding-block: 52px 28px; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; display: grid; gap: 8px; font-size: 15px; }
.footer .logo-name { color: #fff; }
.footer .logo-sub { color: #a99c98; }
.footer p { font-size: 14px; margin-top: 14px; max-width: 34ch; color: #a99c98; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #3b3230; display: grid; place-items: center; color: #fff; transition: background .15s, border-color .15s; }
.socials a:hover { background: var(--red); border-color: var(--red); }
.socials svg { width: 20px; height: 20px; }
.copyright { border-top: 1px solid #332a28; grid-column: 1 / -1; padding-top: 20px; font-size: 13px; color: #8d807c; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .wrap > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer .wrap { grid-template-columns: 1fr; } }

.wa-float { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 50; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(31, 174, 91, .45); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { background: linear-gradient(90deg, var(--wash), #f1ebe9, var(--wash)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- анимации ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.05); } }
@keyframes sun-in { from { opacity: 0; transform: scale(.35); } }
@keyframes fade { from { opacity: 0; } }
@keyframes bump { 35% { transform: scale(1.35); } }
@keyframes draw { from { stroke-dashoffset: 30; } }

main { animation: fade .35s ease both; }
.hero .wrap > div:first-child > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero .wrap > div:first-child > :nth-child(2) { animation-delay: .08s; }
.hero .wrap > div:first-child > :nth-child(3) { animation-delay: .16s; }
.hero .wrap > div:first-child > :nth-child(4) { animation-delay: .24s; }
.hero .wrap > div:first-child > :nth-child(5) { animation-delay: .32s; }
.sun { animation: sun-in 1.1s cubic-bezier(.2, .8, .2, 1) .15s both; }
.sun-word { animation: fade .8s ease .7s both; }
.tag { animation: pop .6s cubic-bezier(.2, .8, .3, 1.2) both, bob 6s ease-in-out infinite; }
.tag:nth-of-type(1) { animation-delay: .8s, 1.4s; }
.tag:nth-of-type(2) { animation-delay: .95s, -.6s; }
.tag:nth-of-type(3) { animation-delay: 1.1s, -2.6s; }

/* Появление при прокрутке. Класс .anim ставит скрипт — без JS всё видно сразу. */
html.anim .reveal { opacity: 0; transform: translateY(24px); }
html.anim .reveal.in { opacity: 1; transform: none; transition: opacity .6s ease var(--d, 0s), transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }

.header { transition: box-shadow .25s; }
.header.scrolled { box-shadow: 0 6px 24px rgba(29, 23, 22, .08); }
.nav.open { animation: rise .25s ease both; }

.card { transition: box-shadow .2s, border-color .2s, transform .2s; }
.card:hover { transform: translateY(-3px); }
.card .pic, .card .ph svg { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.card:hover .pic { transform: scale(1.05); }
.card:hover .ph svg { transform: scale(1.12) rotate(-6deg); }
.card .stepper { animation: pop .3s ease both; }
.add { transition: background .15s, transform .15s; }
.add:hover { transform: rotate(90deg); }
.add:active { transform: scale(.88); }
.cat-ic { transition: background .25s, color .25s, transform .35s cubic-bezier(.2, .8, .3, 1.3); }
.cat:hover .cat-ic { background: var(--red); color: #fff; transform: rotate(-10deg) scale(1.08); }
.btn svg { transition: transform .2s; }
.btn-red:hover svg { transform: translateX(3px); }
.wa-float { animation: pop .6s cubic-bezier(.2, .8, .3, 1.2) 1.2s both; }
.wa-float::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: ring 2.4s ease-out 2s infinite; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.cart-count.bump { animation: bump .45s ease; }
.fly { position: fixed; z-index: 80; width: 18px; height: 18px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(211, 32, 47, .45); pointer-events: none; }
.done-mark { animation: pop .6s cubic-bezier(.2, .8, .3, 1.3) both; }
.done-mark svg path { stroke-dasharray: 30; animation: draw .5s ease .35s both; }
.band::after { animation: spin 40s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
