/* Meiva.kz — белый и глубокий зелёный. Один шрифт, плотные заголовки, минимум декора. */

:root {
  --green-50: #f0fbf0;
  --green-100: #dcf5de;
  --green-200: #b6ebbd;
  --green-500: #3cc15c;
  --green-600: #1fa84a;
  --green-700: #168a3c;
  --green-900: #0d4a24;
  --ink: #10231a;
  --muted: #5a6b61;
  --line: #e0eae3;
  --bg: #ffffff;
  --danger: #b3261e;
  --lime: #8fd63c;
  --orange: #ff8a00;
  --red: #e5322d;
  --sky: #1d9bf0;
  --warn-bg: #fff6e0;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  /* Светлый зелёный фон с тонким рисунком из овощей и фруктов — товары на нём читаются без напряжения. */
  background: #f1fbf1 url("../img/pattern.svg") center top / 360px 360px repeat;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0 0 12px; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green-900); color: #fff;
  padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- Типографика ---------- */
.h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; text-wrap: balance; }
.h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.link { font-weight: 700; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer; text-align: center; text-decoration: none !important;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-700); }
.btn--ghost { background: #fff; color: var(--green-700); border-color: var(--green-200); }
.btn--ghost:hover { border-color: var(--green-600); }
.btn--light { background: #fff; color: var(--green-900); }
.btn--light:hover { background: var(--green-100); }
.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--outline-light:hover { border-color: #fff; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }
.btn.is-disabled, .btn[aria-disabled="true"] { background: var(--line); color: var(--muted); border-color: var(--line); pointer-events: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--green-100); color: var(--green-700); }

/* ---------- Шапка ---------- */
.announce { background: var(--green-900); color: #fff; font-size: 14px; text-align: center; padding: 8px 0; }
.header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header__row {
  display: grid; grid-template-columns: auto auto minmax(180px, 1fr) auto; align-items: center; gap: 16px;
  min-height: var(--header-h);
}
.logo img { height: 36px; width: auto; }
.search { position: relative; max-width: 560px; width: 100%; }
.search input {
  width: 100%; height: 46px; padding: 0 52px 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--green-50);
}
.search input:focus { outline: none; border-color: var(--green-600); background: #fff; }
.search button {
  position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--green-600); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.header__tools { display: flex; align-items: center; gap: 6px; }
.lang { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; margin-right: 6px; }
.lang a { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--muted); }
.lang a:hover { text-decoration: none; color: var(--ink); }
.lang a.is-active { background: var(--green-900); color: #fff; }
.tool { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; color: var(--ink); font-weight: 700; }
.tool:hover { background: var(--green-50); text-decoration: none; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px;
  border-radius: 999px; background: var(--green-600); color: #fff; font-weight: 800;
}
.cart-btn:hover { background: var(--green-700); text-decoration: none; }
.cart-btn__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--green-700);
  font-size: 13px; display: grid; place-items: center;
}

.nav { border-top: 1px solid var(--line); background: #fff; }
.nav__row { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav__row::-webkit-scrollbar { display: none; }
.nav__link {
  flex: none; padding: 12px 14px; font-weight: 700; color: var(--ink); border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.nav__link:hover { text-decoration: none; color: var(--green-700); }
.nav__link.is-active { border-bottom-color: var(--green-600); color: var(--green-700); }
.nav__link--b2b { color: var(--green-700); }
.nav__spacer { flex: 1; }

/* ---------- Сообщения ---------- */
.flashes { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--green-100); color: var(--green-900); font-weight: 600; }
.flash--error { background: #fdecea; color: var(--danger); }
.flash--warning { background: var(--warn-bg); color: #7a5200; }
.flash ul { list-style: none; }
.notice { padding: 12px 16px; border: 1px solid var(--green-200); background: var(--green-50); border-radius: var(--radius-sm); }

/* ---------- Страницы ---------- */
.page { padding-top: 28px; padding-bottom: 36px; }
.page--narrow { max-width: 820px; }
.page--auth { max-width: 520px; }
.page__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.crumbs { display: flex; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); }

.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort select, .field select {
  height: 44px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; background: #fff;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 26px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 700; color: var(--ink);
}
.chip:hover { border-color: var(--green-600); text-decoration: none; }
.chip.is-active { background: var(--green-900); border-color: var(--green-900); color: #fff; }

.group { margin-top: 34px; }
.group:first-of-type { margin-top: 8px; }
.group .h2 { margin-bottom: 16px; }
.group .h2 a { color: inherit; }
.count { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 6px; }

.empty { text-align: center; padding: 56px 16px; border: 1.5px dashed var(--green-200); border-radius: var(--radius); background: var(--green-50); }
.empty__title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }

/* ---------- Карточки товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: border-color .15s;
}
.card:hover { border-color: var(--green-200); }
.card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--green-50); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card--out .card__media img, .card--out .ph, .detail__media.is-out img { opacity: .45; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 16px; flex: 1; }
.card__title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.card__title a { color: var(--ink); }
.card__desc {
  font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.badge {
  position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--green-900); color: #fff; font-size: 13px; font-weight: 800;
}
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: auto 0 4px; padding-top: 6px; }
.price__now { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.price__unit { color: var(--muted); font-size: 14px; font-weight: 600; }
.price__old { color: var(--muted); font-size: 14px; }
.price--lg .price__now { font-size: 34px; }
.price--lg .price__unit { font-size: 17px; }

.ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--green-100); color: var(--green-600); }
.ph svg { width: 48%; height: auto; }

.buy { min-height: 44px; }
.buy__out { display: grid; place-items: center; min-height: 44px; border-radius: 999px; background: var(--line); color: var(--muted); font-weight: 700; font-size: 14px; }
.stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 44px; padding: 4px;
  border-radius: 999px; background: var(--green-100); border: 1.5px solid var(--green-200);
}
.stepper form { display: contents; }
.stepper__btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--green-600); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px;
}
.stepper__btn:hover { background: var(--green-700); }
.stepper__qty { font-size: 15px; text-align: center; flex: 1; white-space: nowrap; }
.stepper__qty b { font-weight: 800; }

/* ---------- Страница товара ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.detail__media { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--green-50); border: 1px solid var(--line); }
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__info { display: grid; gap: 14px; }
.detail__buy { max-width: 340px; }
.facts { display: grid; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.facts li { position: relative; padding-left: 22px; }
.facts li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--green-500);
}

/* ---------- Главная ---------- */
/* Зелёный блок на главной: яркий зелёный и нарисованные мультяшные фрукты.
   Слева зелёная подложка плотнее — там текст; справа фрукты видны полностью. */
.hero {
  color: #fff;
  background-color: #22a94a;
  background-image:
    linear-gradient(90deg, rgba(18, 128, 56, .93) 0%, rgba(24, 150, 62, .82) 42%, rgba(34, 169, 74, .12) 78%, rgba(34, 169, 74, 0) 100%),
    url("../img/cartoon-hero.svg");
  background-size: 100% 100%, 520px 520px;
  background-position: center, center top;
  background-repeat: no-repeat, repeat;
}.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
.hero__title { text-wrap: balance; font-size: clamp(32px, 5vw, 58px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.hero__lead { margin: 20px 0 28px; font-size: 18px; max-width: 52ch; color: #cfe7d8; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__facts { display: grid; grid-auto-flow: column; justify-content: start; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .18); }
.hero__facts > div { padding-right: 28px; margin-right: 28px; border-right: 1px solid rgba(255, 255, 255, .18); }
.hero__facts > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero__facts dt { font-size: 13px; color: #9fcdb1; }
.hero__facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; }
.hero__tiles { display: grid; gap: 14px; }
.tile {
  display: grid; grid-template-columns: 88px 1fr; grid-template-rows: auto auto; column-gap: 20px; align-items: center;
  padding: 14px; border-radius: 20px; color: var(--ink); transition: transform .15s;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.tile:hover { text-decoration: none; transform: translateX(4px); }
.tile .ph { grid-row: 1 / 3; width: 88px; height: 88px; border-radius: 14px; }
.tile__name { align-self: end; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.tile__count { align-self: start; color: var(--muted); font-size: 14px; }
.hero__tiles li:nth-child(2) { margin-left: 28px; }
.hero__tiles li:nth-child(3) { margin-left: 56px; }

.b2b-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px; border-radius: 24px; background: var(--green-100);
}
.b2b-band p { margin: 8px 0 0; max-width: 60ch; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { display: grid; gap: 4px; padding-top: 16px; border-top: 3px solid var(--green-600); }
.steps b { font-size: 18px; font-weight: 800; }
.steps span { color: var(--muted); }

/* ---------- Корзина и оформление ---------- */
.cart, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; margin-top: 20px; }
.lines { border-top: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 150px 110px 40px; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.line__media { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--green-50); }
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__info { display: grid; gap: 2px; min-width: 0; }
.line__name { font-weight: 700; color: var(--ink); }
.line__price { font-size: 14px; color: var(--muted); }
.line__warn { font-size: 13px; font-weight: 700; color: var(--danger); }
.line__total { text-align: right; font-size: 17px; }
.line--out .line__name { color: var(--muted); }

.summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--green-50); }
.summary--sticky { position: sticky; top: calc(var(--header-h) + 60px); }
.summary__note { margin: 12px 0 0; font-size: 14px; text-align: center; }
.progress { margin-bottom: 18px; }
.progress__text { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.progress__bar { height: 8px; border-radius: 4px; background: var(--green-200); overflow: hidden; }
.progress__bar span { display: block; height: 100%; background: var(--green-600); border-radius: 4px; transition: width .25s; }
.progress[data-ok] .progress__text { color: var(--green-700); }
.promo { display: flex; gap: 8px; margin-bottom: 8px; }
.promo input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px;
  text-transform: uppercase; background: #fff;
}
.promo input::placeholder { text-transform: none; }
.promo__msg { font-size: 14px; color: var(--danger); margin: 0 0 8px; }
.promo__msg.is-ok { color: var(--green-700); }
.totals { margin: 16px 0; display: grid; gap: 8px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 700; text-align: right; }
.totals__total { padding-top: 12px; border-top: 1px solid var(--green-200); font-size: 20px; }
.totals__total dt { color: var(--ink); font-weight: 800; }
.totals__total dd { font-weight: 800; }
.mini { display: grid; gap: 8px; margin-bottom: 14px; }
.mini li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.mini small { color: var(--muted); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; background: #fff; min-width: 0; }
.panel__title { font-size: 19px; font-weight: 800; margin-bottom: 16px; padding: 0; }
fieldset.panel { margin-inline: 0; }
fieldset.panel > legend { float: left; width: 100%; }
fieldset.panel > legend + * { clear: both; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; align-items: start; }
.form--narrow { max-width: 520px; }

/* ---------- Формы ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.field .opt { font-weight: 500; color: var(--muted); }
.field input[type="text"], .field input[type="password"], .field input[type="tel"], .field input[type="email"],
.field textarea, .field select, .field input:not([type]) {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.field input:disabled { background: var(--green-50); color: var(--muted); }
.field--error input, .field--error textarea, .field--error select { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 14px; margin: 6px 0 0; }
.field__hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.radios { display: grid; gap: 8px; }
.radio, .check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.radio { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; }
.radio:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.radio input, .check input { width: 20px; height: 20px; accent-color: var(--green-600); margin: 0; }
.check { margin-top: 14px; font-size: 15px; }

/* ---------- Кабинет ---------- */
.account-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin: 18px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.is-active { color: var(--green-700); border-bottom-color: var(--green-600); }
.orders { display: grid; gap: 12px; }
.order-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 20px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
}
.order-row__main { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.order-row__num { font-weight: 800; font-size: 17px; }
.order-row__sum { font-weight: 800; font-size: 18px; }
.order-row__items { grid-column: 1 / 2; font-size: 14px; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--green-100); color: var(--green-700); vertical-align: middle; }
.status--new, .status--assembling, .status--confirmed { background: #fff3d6; color: #7a5200; }
.status--cancelled { background: #eee; color: #666; }
.addr-list { display: grid; gap: 10px; }
.addr-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.addr-list li > div { display: grid; min-width: 0; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.done { text-align: center; padding: 24px 0 8px; }
.done__mark { width: 60px; height: 60px; border-radius: 50%; background: var(--green-600); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; }
.done .lead { margin: 12px auto 0; }
.done__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.prose h2 { font-size: 21px; font-weight: 800; margin: 28px 0 8px; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.zones { display: flex; flex-wrap: wrap; gap: 8px; list-style: none !important; padding: 0 !important; margin: 4px 0 14px; }
.zones li { padding: 7px 14px; border-radius: 999px; background: var(--green-100); font-weight: 700; }
.zones li span { font-weight: 500; color: var(--muted); }

/* ---------- Для заведений ---------- */
.b2b-head { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; margin-bottom: 36px; }
.contact-card { padding: 24px; border-radius: var(--radius); background: var(--green-900); color: #fff; display: grid; gap: 12px; }
.contact-card__title { font-size: 15px; font-weight: 700; color: #9fcdb1; }
.contact-card__phone { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.contact-card .muted { color: #9fcdb1; margin: 0; }
.contact-card .btn--primary { background: #fff; color: var(--green-900); }
.b2b-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 40px; align-items: start; }
.b2b-grid .panel { position: sticky; top: calc(var(--header-h) + 60px); }
.assort { margin-top: 22px; }
.assort__title { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.assort__list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; cursor: pointer;
}
.pill small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.pill:hover { border-color: var(--green-600); }
.pill[aria-pressed="true"] { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.pill[aria-pressed="true"] small { color: #d6efdf; }

/* ---------- Подвал ---------- */
.footer { margin-top: 48px; background: var(--green-50); border-top: 1px solid var(--line); padding-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__logo { height: 33px; width: auto; margin-bottom: 12px; }
.footer__text { color: var(--muted); max-width: 44ch; }
.footer__h { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.footer__list { display: grid; gap: 8px; }
.footer__list a { color: var(--ink); font-weight: 600; }
.footer__bottom { margin-top: 32px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- Ленточки на карточках: Хит / Новинка / Акция / Скидка ---------- */
.ribbon {
  position: absolute; left: 0; top: 14px; z-index: 2;
  padding: 5px 16px 5px 12px; font-size: 13px; font-weight: 800; letter-spacing: .01em; color: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%);
  box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .5);
}
.ribbon--hit { background: var(--orange); }
.ribbon--new { background: var(--sky); }
.ribbon--sale { background: var(--red); }
.ribbon--discount { background: #c2185b; }
.detail__media { position: relative; }
.card__media .badge { left: auto; right: 10px; background: var(--red); }
.price__step { margin: -2px 0 6px; font-size: 13px; font-weight: 700; color: var(--green-700); }
.price__step--lg { font-size: 15px; margin: 0; }

/* ---------- Кнопка «Каталог» и выпадающая панель ---------- */
.catalog-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--green-600); color: #fff; font-weight: 800; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.catalog-btn:hover { background: var(--green-700); box-shadow: 0 8px 18px -10px rgba(22, 138, 60, .8); }
.catalog-btn:active { transform: scale(.96); }
.catalog-btn[aria-expanded="true"] svg { transform: rotate(90deg); }
.catalog-btn svg { transition: transform .3s var(--ease); }
.header { position: sticky; }
.catalog-menu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(13, 74, 36, .45);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.catalog-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.catalog-menu__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding-top: 16px; padding-bottom: 18px; }
.catalog-menu__item {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px;
  border-radius: 14px; color: var(--ink); font-weight: 700;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.catalog-menu__item:hover { background: var(--green-100); text-decoration: none; transform: translateX(3px); }
.catalog-menu__item .ph { width: 48px; height: 48px; border-radius: 12px; }
.catalog-menu__item { min-width: 0; }
.catalog-menu__name { min-width: 0; overflow-wrap: anywhere; }
.catalog-menu { overflow-x: clip; max-width: 100vw; }
.catalog-menu__count { font-size: 13px; color: var(--muted); font-weight: 700; }
.catalog-menu__item--all { grid-template-columns: 1fr; background: var(--green-600); color: #fff; text-align: center; padding: 14px; }
.catalog-menu__item--all:hover { background: var(--green-700); }
.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(13, 40, 22, .25); z-index: 30; animation: fade-in .25s ease both; }
.header { z-index: 50; }

/* ---------- Иконки-ссылки (звонок, WhatsApp, Instagram, 2ГИС) ---------- */
.social { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.social__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 46px; height: 46px; padding: 0 14px;
  border-radius: 999px; font-weight: 800; color: #fff; text-decoration: none !important;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), filter .2s;
}
.social__link:hover { transform: translateY(-2px); box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .55); filter: brightness(1.05); }
.social__link:active { transform: scale(.96); }
.social:not(.social--labels) .social__link { width: 46px; padding: 0; }
.social__link--call { background: var(--green-600); }
.social__link--wa { background: #25d366; }
.social__link--ig { background: linear-gradient(45deg, #feda75 0%, #fa7e1e 28%, #d62976 60%, #962fbf 82%, #4f5bd5 100%); }
.social__link--map { background: #2bb24c; }
.footer .social { margin-top: 16px; }

/* ---------- Прозрачные карточки поверх фона ---------- */
.card {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.panel, .summary { background: rgba(255, 255, 255, .92); }
.summary { background: rgba(243, 249, 245, .94); }
.empty { background: rgba(255, 255, 255, .7); }
.group .h2, .page__head .h1, .page > .h1 { text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }

/* ---------- Анимации и отклик на нажатия ---------- */
:root {
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* Плавный переход между страницами (Chrome, Edge, Safari 18+); шапка остаётся на месте. */
@view-transition { navigation: auto; }
.header { view-transition-name: site-header; }
::view-transition-old(root) { animation: .16s ease both vt-out; }
::view-transition-new(root) { animation: .32s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
/* Запасной вариант для браузеров без View Transitions. */
@supports not selector(::view-transition) {
  main { animation: page-in .4s var(--ease) both; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

/* Кнопки, ссылки и плитки: мягкая реакция на наведение и нажатие */
.btn, .chip, .pill, .tool, .nav__link, .cart-btn, .stepper__btn, .icon-btn, .search button, .tile, .card, .lang a, .tabs a {
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease),
              transform .2s var(--ease), box-shadow .25s var(--ease), opacity .2s var(--ease);
}
.btn:active, .chip:active, .pill:active, .cart-btn:active, .stepper__btn:active, .search button:active {
  transform: scale(.96);
}
.btn--primary:hover, .cart-btn:hover { box-shadow: 0 8px 18px -10px rgba(22, 138, 60, .7); }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(13, 74, 36, .45); }
.card__media img { transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.tile:hover { transform: translateX(6px); }

/* «В корзину» ↔ степпер: плавное появление */
.buy__add:not([hidden]), .stepper:not([hidden]) { animation: pop-in .26s var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(.9); } }

/* Счётчик корзины подпрыгивает при изменении */
.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 35% { transform: scale(1.3); } 70% { transform: scale(.95); } }

/* Нижняя плашка корзины выезжает снизу */
.cart-bar:not([hidden]) { animation: slide-up .35s var(--ease) both; }
@keyframes slide-up { from { opacity: 0; transform: translateY(24px); } }

/* Сообщения, пустые состояния, итоги */
.flash { animation: slide-down .4s var(--ease) both; }
@keyframes slide-down { from { opacity: 0; transform: translateY(-10px); } }
.empty:not([hidden]), .cart:not([hidden]) { animation: page-in .35s var(--ease) both; }
.is-tick { animation: tick .5s var(--ease); }
@keyframes tick { 30% { opacity: .35; transform: translateY(-2px); } }
.progress__bar span { transition: width .45s var(--ease); }

/* Удаление строки в корзине: сворачивается и растворяется */
.line { transition: opacity .25s var(--ease), height .3s var(--ease), padding .3s var(--ease), border-color .3s; overflow: hidden; }
.line.is-removing { opacity: 0; height: 0 !important; padding-top: 0; padding-bottom: 0; border-color: transparent; }

/* Карта 2ГИС плавно проявляется после клика */
.contacts__map iframe { animation: fade-in .5s ease both; }
@keyframes fade-in { from { opacity: 0; } }

/* Раскрытие поиска и фокус полей */
.search input, .field input, .field select, .field textarea, .promo input {
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease);
}
.search input:focus { box-shadow: 0 0 0 4px rgba(31, 168, 74, .14); }

/* ---------- Экран загрузки: грузовик доставки по центру ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(243, 249, 245, .88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.loader.is-on, .is-loading .loader { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.loader__box { display: grid; justify-items: center; gap: 6px; }
.loader__text { margin: 0; font-weight: 800; color: var(--green-900); letter-spacing: -0.01em; }
.truck { overflow: visible; }
.truck__body { animation: truck-bounce 1s ease-in-out infinite alternate; }
.truck__wheel { transform-box: fill-box; transform-origin: center; animation: wheel-spin 1.5s linear infinite; }
.truck__road { animation: road-run 1.4s linear infinite; }
.truck__speed { animation: speed-lines 1.4s ease-in-out infinite; }
@keyframes truck-bounce { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
@keyframes wheel-spin { to { transform: rotate(360deg); } }
@keyframes road-run { to { stroke-dashoffset: -44; } }
@keyframes speed-lines { 0%, 100% { transform: translateX(0); opacity: .15; } 50% { transform: translateX(-10px); opacity: .45; } }

/* Сенсорные экраны (планшеты и телефоны): крупные зоны нажатия */
@media (pointer: coarse) {
  .lang a { padding: 9px 12px; font-size: 14px; }
  .stepper { height: 48px; }
  .stepper__btn { width: 40px; height: 40px; font-size: 22px; }
  .crumbs a, .link, .line__name { display: inline-block; padding: 8px 0; }
  .nav__link { padding: 14px 14px; }
  .chip { padding: 11px 16px; }
  .icon-btn { width: 44px; height: 44px; }
  .footer__list a { display: inline-block; padding: 6px 0; }
  .buy, .buy .btn, .buy__out { min-height: 48px; }
  .btn { min-height: 46px; }
  .field input, .field select { height: 50px; }
}
/* Очень узкие телефоны (до 380 px) */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .logo img { height: 28px; width: auto; }
  .header__row { gap: 8px 8px; }
  .header__tools { gap: 4px; min-width: 0; }
  .lang a { padding: 8px 9px; font-size: 13px; }
  .cart-btn { padding: 0 12px; gap: 6px; }
  .cart-btn__sum { display: none; }
  .catalog-btn { padding: 0 12px; }
  .search input { padding-left: 14px; min-width: 0; }
  .btn { padding: 0 10px; font-size: 14px; }
  .buy .btn { white-space: nowrap; }
  .grid { gap: 10px; }
  .price__now { font-size: 17px; }
  .catalog-menu__grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-menu__item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .catalog-menu__item .ph { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .truck__body, .truck__wheel, .truck__road, .truck__speed { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .card:hover, .tile:hover { transform: none; }
}

/* ---------- Контакты и карта ---------- */
.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; margin: 36px 0 12px; align-items: stretch; }
.contacts .kv { margin: 14px 0 18px; }
.contacts__map { min-height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--green-50); }
.contacts__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
.contacts__placeholder {
  height: 100%; min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 8px;
  color: var(--green-700); font-weight: 800; font-size: 18px; text-align: center; padding: 20px;
}
.contacts__load { width: 100%; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.contacts__placeholder:hover { text-decoration: none; background: var(--green-100); }
.contacts__placeholder small { font-weight: 600; color: var(--muted); }

/* ---------- Адаптив ---------- */
@media (max-width: 1020px) {
  .cart, .checkout, .b2b-head, .b2b-grid, .two-col, .contacts { grid-template-columns: minmax(0, 1fr); }
  .summary--sticky, .b2b-grid .panel { position: static; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 40px; padding-bottom: 40px; }
  .hero__tiles { grid-template-columns: repeat(3, 1fr); }
  .hero__tiles li:nth-child(n) { margin-left: 0; }
  .tile { grid-template-columns: 1fr; justify-items: start; row-gap: 8px; }
  .tile .ph { grid-row: auto; width: 64px; height: 64px; }
  .tile__name { font-size: 18px; }
  .detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  /* Крупные зоны нажатия для пальца */
  .lang a { padding: 9px 12px; font-size: 14px; }
  .stepper { height: 48px; }
  .stepper__btn { width: 40px; height: 40px; font-size: 22px; }
  .crumbs a, .link, .line__name { display: inline-block; padding: 8px 0; }
  .nav__link { padding: 14px 14px; }
  .chip { padding: 11px 16px; }
  .icon-btn { width: 44px; height: 44px; }
  .footer__list a { display: inline-block; padding: 6px 0; }
  .buy { min-height: 48px; }
  .buy .btn, .buy__out { min-height: 48px; }
  .container { padding: 0 16px; }
  .header { position: relative; }
  .header__row { grid-template-columns: auto 1fr; grid-template-areas: "logo tools" "cat search"; gap: 10px 12px; padding-block: 8px; }
  .logo { grid-area: logo; }
  .header__tools { grid-area: tools; }
  .catalog-btn { grid-area: cat; height: 46px; padding: 0 14px; }
  .catalog-btn span { display: inline; }
  .search { grid-area: search; }
  .catalog-menu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header__tools { justify-content: flex-end; }
  .search { max-width: none; }
  .tool__text { display: none; }
  .cart-btn { padding: 0 12px; height: 42px; }
  .cart-btn__sum { font-size: 14px; }
  .lang { margin-right: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card__body { padding: 10px 10px 12px; }
  .card__title { font-size: 15px; }
  .price__now { font-size: 18px; }
  .btn--lg { min-height: 50px; }
  .hero__facts { grid-auto-flow: row; gap: 14px; }
  .hero__facts > div { border-right: 0; margin-right: 0; padding-right: 0; }
  .hero__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px; }
  .tile__name { font-size: 16px; }
  .tile .ph { width: 52px; height: 52px; }
  .steps { grid-template-columns: 1fr; }
  .b2b-band { padding: 22px; }
  .line { grid-template-columns: 64px minmax(0, 1fr) 40px; grid-template-areas: "media info remove" "media qty total"; gap: 10px 12px; }
  .line__media { grid-area: media; width: 64px; height: 64px; }
  .line__info { grid-area: info; }
  .line__qty { grid-area: qty; }
  .line__total { grid-area: total; align-self: center; }
  .line__remove { grid-area: remove; }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row form { grid-column: 1 / -1; }
  .order-row__items { grid-column: 1 / -1; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .panel { padding: 16px; }
  .summary { padding: 16px; }
  body { padding-bottom: 76px; }
  .cart-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
    display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: 54px;
    border-radius: 999px; background: var(--green-600); color: #fff; font-weight: 700;
    box-shadow: 0 10px 28px -10px rgba(13, 74, 36, .6);
  }
  .cart-bar:hover { text-decoration: none; background: var(--green-700); }
  .cart-bar__sum { font-weight: 800; font-size: 17px; }
  .detail__buy { max-width: none; }
}

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

/* Узкие телефоны: правила ниже идут в конце файла, чтобы перекрывать общие мобильные */
@media (max-width: 380px) {
  .catalog-menu__grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-menu__item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .catalog-menu__item--all { grid-template-columns: minmax(0, 1fr); }
  .catalog-menu__item--all .catalog-menu__name { white-space: nowrap; }
}
.cart-btn svg, .catalog-btn svg, .tool svg { flex: none; }

/* Планшет и телефон: текст сверху, плитки снизу — подложка идёт сверху вниз */
@media (max-width: 1020px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(18, 128, 56, .92) 0%, rgba(24, 150, 62, .72) 48%, rgba(34, 169, 74, .3) 100%),
      url("../img/cartoon-hero.svg");
  }
}

/* Совсем узкие экраны: уместить логотип, язык и корзину в одну строку */
@media (max-width: 360px) {
  .header__row { grid-template-columns: minmax(0, 1fr) auto; }
  .logo img { max-width: 100%; }
  .tool { display: none; }
}

/* ---------- Боковая шторка с разделами (≈40% экрана) ---------- */
.menu-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--green-200); background: #fff; color: var(--green-700); cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.menu-btn:hover { background: var(--green-100); border-color: var(--green-600); }
.menu-btn:active { transform: scale(.94); }

.drawer__backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 40, 20, .45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.drawer__backdrop.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: clamp(340px, 40vw, 560px); max-width: 100vw;
  display: flex; flex-direction: column; background: #fff;
  box-shadow: -24px 0 48px -24px rgba(8, 40, 20, .55);
  transform: translateX(105%); visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s linear .4s;
  outline: none;
}
.drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
body.drawer-open { overflow: hidden; }

.drawer__head {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 22px;
  background: var(--green-600); color: #fff;
}
.drawer__title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.drawer__close {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer;
  display: grid; place-items: center; transition: background-color .2s, transform .3s var(--ease);
}
.drawer__close:hover { background: rgba(255, 255, 255, .3); transform: rotate(90deg); }

.drawer__body { flex: 1; overflow-y: auto; padding: 14px; display: grid; align-content: start; gap: 6px; }
.drawer__link {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: 16px; color: var(--ink); text-decoration: none !important;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
  opacity: 0; transform: translateX(24px);
}
.drawer.is-open .drawer__link { opacity: 1; transform: none; transition: background-color .2s var(--ease), opacity .4s var(--ease), transform .4s var(--ease); }
.drawer.is-open .drawer__link:nth-child(1) { transition-delay: .06s; }
.drawer.is-open .drawer__link:nth-child(2) { transition-delay: .1s; }
.drawer.is-open .drawer__link:nth-child(3) { transition-delay: .14s; }
.drawer.is-open .drawer__link:nth-child(4) { transition-delay: .18s; }
.drawer.is-open .drawer__link:nth-child(5) { transition-delay: .22s; }
.drawer__link:hover { background: var(--green-100); }
.drawer__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--green-100); color: var(--green-700);
}
.drawer__text { display: grid; gap: 1px; min-width: 0; }
.drawer__text b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.drawer__text small { color: var(--muted); font-size: 13.5px; }

.drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: var(--green-50); }
.drawer__h { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 6px; text-transform: none; }
.drawer__phone { display: inline-block; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.drawer__line { margin: 4px 0 0; font-size: 15px; }
.lang--drawer { display: inline-flex; margin: 16px 0 0; }
.lang--drawer a { padding: 8px 14px; font-size: 14px; }

@media (max-width: 720px) {
  .drawer { width: min(88vw, 400px); }
  .menu-btn { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer__backdrop, .drawer__link { transition: none !important; }
  .drawer__link { opacity: 1; transform: none; }
}

/* Телефон: кабинет и язык доступны в шторке, в шапке оставляем главное */
@media (max-width: 480px) {
  .header__tools > .tool { display: none; }
  .header__tools .lang { margin-right: 0; }
}

/* ---------- Логотип ---------- */
.logo img { height: 32px; width: auto; display: block; }
.footer__logo { height: 120px; width: 120px; border-radius: 22px; margin-bottom: 14px; box-shadow: 0 10px 24px -14px rgba(13, 74, 36, .6); }
@media (max-width: 720px) { .logo img { height: 30px; } }
@media (max-width: 380px) { .logo img { height: 26px; } }

/* ---------- Цветные нарисованные значки вместо контуров ---------- */
.ph { color: inherit; }
.ph svg { width: 66%; height: auto; max-height: 88%; overflow: visible; filter: drop-shadow(0 6px 8px rgba(13, 74, 36, .18)); }
.card .ph svg { width: 58%; }
.tile .ph svg, .catalog-menu__item .ph svg, .line__media .ph svg { width: 82%; filter: none; }
.tile .ph { background: #fff; }
.catalog-menu__item .ph { background: var(--green-50); }

/* Фургончик на экране загрузки — крупнее, чтобы логотип на кузове читался */
.truck { width: min(320px, 84vw); height: auto; }
.loader__text { font-size: 17px; }
.truck { width: min(440px, 90vw); }
.loader__text { font-size: 18px; }

/* Совместимость со старыми браузерами (Safari < 16, Firefox ESR, старые Android WebView) */
.menu-open::after, .loader, .drawer-backdrop { top: 0; right: 0; bottom: 0; left: 0; }
.catalog-menu { overflow-x: hidden; overflow-x: clip; }
.radio.is-checked { border-color: var(--green-600); background: var(--green-50); }
/* Предупреждение перед покупкой: вес может быть неточным */
.weight-note { display: flex; gap: 12px; font-weight: 600; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: #fff7e0; border: 1px solid #f3d98a; color: #6b4e00; font-size: 14px; line-height: 1.4; }
.weight-note svg { flex: none; width: 26px; height: 26px; padding: 4px; box-sizing: content-box; border-radius: 50%; background: #ffd34d; color: #6b4e00; }
/* ---------- Правки по отзыву клиента ---------- */
/* Логотип в шапке — просто зелёный жирный текст */
.logo__text { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; color: var(--green-600); line-height: 1; display: inline-block; }
@media (max-width: 720px) { .logo__text { font-size: 26px; } }
@media (max-width: 380px) { .logo__text { font-size: 23px; } }

/* Переключатель языка с флагами */
.lang a { display: inline-flex; align-items: center; gap: 6px; }
.lang .flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(16, 35, 26, .18); }
.lang a:not(.is-active) .flag { opacity: .8; }
@media (max-width: 420px) { .lang a { padding: 7px 8px; gap: 5px; } .lang .flag { width: 19px; height: 13px; } }

/* Экран загрузки: надпись на кузове */
.truck text { font-family: "Manrope", system-ui, sans-serif; }

/* Крупнее то, что ведёт к товарам: разделы, фильтры, сортировка, заголовки групп */
.nav__link { font-size: 17px; padding: 15px 16px; }
.chip { font-size: 17px; padding: 12px 20px; }
.sort { font-size: 16px; }
.sort select { height: 50px; font-size: 16px; font-weight: 600; padding: 0 14px; }
.group .h2 { font-size: clamp(30px, 4.4vw, 40px); letter-spacing: -0.02em; }
.group .h2 .count { font-size: 18px; }

/* Меньше зелёного: тёплые жёлтые акценты на кнопках навигации */
:root { --sun-400: #ffc928; --sun-500: #f5b50a; --sun-900: #3b2a00; }
.catalog-btn { background: var(--sun-400); color: var(--sun-900); }
.catalog-btn:hover { background: var(--sun-500); box-shadow: 0 8px 18px -10px rgba(190, 130, 0, .8); }
.chip:hover { border-color: var(--sun-500); }
.chip.is-active { background: var(--sun-400); border-color: var(--sun-500); color: var(--sun-900); }
.nav__link:hover { color: var(--sun-900); }
.nav__link.is-active { border-bottom-color: var(--sun-500); color: var(--ink); }
.nav__link--b2b { color: #b97a00; }
/* На телефонах в шапке только флаги (подпись остаётся для скринридеров) */
@media (max-width: 560px) {
  .header .lang a { padding: 7px 10px; }
  .header .lang a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header .lang .flag { width: 26px; height: 18px; }
}
/* Шапка на телефоне: колонка под логотип и «Каталог» не сжимается */
@media (max-width: 720px) {
  .header__row { grid-template-columns: max-content minmax(0, 1fr); }
  .logo, .catalog-btn { min-width: max-content; }
  .header .lang a { padding: 6px 8px; }
  .header .lang .flag { width: 24px; height: 16px; }
  .cart-btn { padding: 0 10px; }
}
@media (max-width: 400px) { .header .cart-btn__sum { display: none; } .menu-btn { flex: none; } }

/* Кнопка меню («три полоски») всегда на месте: на телефонах сумма видна в нижней панели */
@media (max-width: 520px) { .header .cart-btn__sum { display: none; } .header .menu-btn, .header .cart-btn, .header .lang { flex: none; } .header__tools { gap: 6px; } }

/* Планшеты: шапка не должна выходить за экран (флаги без подписи, сумма корзины в нижней панели) */
@media (min-width: 721px) and (max-width: 1100px) {
  .header__row { grid-template-columns: auto auto minmax(100px, 1fr) auto; gap: 12px; }
  .header .lang a { padding: 6px 10px; }
  .header .lang a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header .menu-btn, .header .cart-btn, .header .lang { flex: none; }
}
@media (min-width: 721px) and (max-width: 900px) { .header .cart-btn__sum { display: none; } }

/* Очень узкие телефоны (до 340 px): один столбец товаров, сортировка не шире экрана */
.sort { flex-wrap: wrap; max-width: 100%; }
.sort select { min-width: 0; max-width: 100%; }
.stepper__btn { flex: none; }
@media (max-width: 340px) { .grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 721px) and (max-width: 820px) { .header .tool { display: none; } .header__row { gap: 8px; } .header .catalog-btn { padding: 0 14px; } }
