/* Токены — та же нейтральная система, что у NOBRES: белый, холодные серые,
   почти чёрный акцент, прямые углы. Цвета меняются только здесь. */
:root {
  --surface-base: #ffffff;
  --surface-subtle: #f8f9fa;
  --surface-muted: #f1f3f5;
  --surface-tile: #f4f5f7;
  --surface-inverse: #0d0e11;

  --text-primary: #0d0e11;
  --text-secondary: #3d4248;
  --text-muted: #5c636a;
  --text-subtle: #6f767d;
  --text-placeholder: #aeb3ba;
  --text-inverse: #ffffff;

  --border-subtle: #ecedef;
  --border-default: #e4e6e9;
  --border-strong: #d3d6da;

  --accent: #101216;
  --accent-hover: #23272d;
  --danger: #b0362e;
  --success: #248250;

  --scrim: rgb(13 14 17 / 0.44);
  --shadow-lg: 0 12px 32px -8px rgb(13 14 17 / 0.12), 0 6px 12px -6px rgb(13 14 17 / 0.06);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: var(--font-sans);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 16px;
  --header-h: 64px;
  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 102px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 48px; }
}

/* База */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
}
body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font: 400 16px/1.7 var(--font-sans);
}
body.locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 900;
  height: 44px; display: inline-flex; align-items: center; padding: 0 20px;
  background: var(--surface-base); border: 1px solid var(--border-strong);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
}
.skip:focus { top: 8px; }

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.label {
  font-size: 11px; line-height: 16px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted);
}
.section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 28px; line-height: 1.15;
}
@media (min-width: 768px) { .section-title { font-size: 40px; } }

/* Кнопки — прямые углы */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--accent); color: var(--text-inverse); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline { border: 1px solid var(--border-strong); }
.btn--outline:hover { background: var(--surface-muted); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-muted); }
.icon-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgb(255 255 255 / .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.utility { display: none; background: var(--surface-inverse); color: var(--text-inverse); }
.utility__row {
  height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-size: 11px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.utility__claims { display: flex; align-items: center; gap: 20px; }
.utility__claims i { width: 1px; height: 12px; background: currentColor; opacity: .3; }
.utility__phone { letter-spacing: .08em; transition: opacity .2s; }
.utility__phone:hover { opacity: .7; }
@media (min-width: 768px) { .utility { display: block; } }

.header__row {
  position: relative;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
@media (min-width: 768px) { .header__row { height: 72px; } }

.header__burger { margin-left: -10px; }
.request-btn { margin-right: -10px; }
.request-btn__count {
  position: absolute; top: 6px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--text-inverse);
  font-size: 11px; font-weight: 600; line-height: 1; border-radius: 9px;
  font-variant-numeric: tabular-nums;
}

/* Логотип: на телефоне — по центру, на широком — слева */
.logo {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center;
  height: 44px;
  color: var(--text-primary);
  transition: opacity .2s;
}
.logo:hover { opacity: .7; }
.logo svg { display: block; width: auto; fill: currentColor; }
.logo__wide { display: none !important; }
.logo__compact { height: 22px; }
@media (min-width: 768px) {
  .logo__compact { display: none !important; }
  .logo__wide { display: block !important; height: 28px; }
}
.logo__stack { height: 64px; }
@media (min-width: 768px) { .logo__stack { height: 76px; } }

.nav { display: none; }
@media (min-width: 1100px) {
  .header__burger { display: none; }
  .logo { position: static; transform: none; }
  .nav {
    display: flex; flex: 1; justify-content: center; gap: 32px;
  }
  .nav a {
    position: relative; font-size: 14px; color: var(--text-secondary);
    padding: 10px 0; transition: color .2s;
  }
  .nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left;
    transition: transform .3s var(--ease);
  }
  .nav a:hover { color: var(--text-primary); }
  .nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
}

/* Каталог */
.catalog { padding: 48px 0 64px; }
@media (min-width: 768px) { .catalog { padding: 80px 0 96px; } }
.catalog__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.catalog__count { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.toolbar {
  display: flex; flex-direction: column; gap: 12px;
  margin: 24px 0 24px;
}
@media (min-width: 768px) {
  .toolbar {
    flex-direction: row; align-items: center; justify-content: space-between; gap: 24px;
    margin: 32px 0 40px; border-bottom: 1px solid var(--border-subtle);
  }
}

/* Вкладки категорий: на телефоне листаются пальцем до края экрана */
.tabs {
  display: flex; gap: 24px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border-subtle);
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
}
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .tabs { margin: 0; padding: 0; border: 0; gap: 32px; }
}
.tab {
  position: relative; flex: none;
  height: 44px; font-size: 14px; color: var(--text-muted);
  scroll-snap-align: start; transition: color .2s;
}
.tab:hover { color: var(--text-primary); }
.tab[aria-selected="true"] { color: var(--text-primary); font-weight: 500; }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--text-primary);
}
.tab sup { font-size: 10px; margin-left: 3px; color: var(--text-subtle); font-weight: 400; }

.select { position: relative; display: block; }
.select select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 44px; padding: 0 40px 0 14px;
  background: var(--surface-base); border: 1px solid var(--border-default); border-radius: 0;
  font-size: 14px; cursor: pointer;
}
.select svg {
  position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: currentColor; stroke-width: 1.5; pointer-events: none;
}
@media (min-width: 768px) {
  .select { flex: none; width: 200px; margin-bottom: 8px; }
}

.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 12px;
}
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; } }

.card { display: flex; flex-direction: column; height: 100%; }
.card__open { display: flex; flex-direction: column; flex: 1; text-align: left; }
.card__media {
  position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-tile);
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card__open:hover .card__media img { transform: scale(1.04); }
.card__brand { margin-top: 14px; }
.card__name { margin-top: 2px; font-size: 14px; line-height: 22px; font-weight: 500; }
.card__short {
  margin-top: 2px; font-size: 14px; line-height: 22px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta {
  margin-top: auto; padding-top: 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.badge {
  font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--border-strong); padding: 2px 6px;
}
.card__add {
  margin-top: 12px; height: 40px; width: 100%;
  border: 1px solid var(--border-strong); font-size: 13px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s, border-color .2s;
}
.card__add:hover { background: var(--surface-muted); }
.card__add.is-added { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }

/* Раскупленный товар: метка на фото, сам кадр приглушён */
.sold-tag {
  position: absolute; left: 0; top: 0; z-index: 1;
  padding: 5px 8px; background: var(--surface-inverse); color: var(--text-inverse);
  font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
@media (min-width: 768px) { .sold-tag { padding: 6px 10px; font-size: 11px; } }
.is-sold .card__media > :not(.sold-tag) { opacity: .45; }
.is-sold .card__name, .is-sold .card__meta { color: var(--text-muted); }
.card__add[disabled] { color: var(--text-subtle); border-color: var(--border-default); cursor: default; background: none; }
.product__stock.is-sold { color: var(--text-primary); font-weight: 500; }
.product .btn[disabled] { opacity: 1; background: var(--surface-muted); color: var(--text-muted); }

/* Заглушка фото: название бренда серым, как знак в заглушке NOBRES */
.ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; padding: 12%;
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .14em; color: var(--text-placeholder);
  font-size: clamp(12px, 4.2vw, 20px); text-align: center;
}
@media (min-width: 768px) { .ph { font-size: clamp(14px, 1.6vw, 22px); } }

.empty { padding: 48px 0; color: var(--text-muted); text-align: center; }

/* Заказ и оплата */
.order { padding: 56px 0; background: var(--surface-subtle); border-top: 1px solid var(--border-subtle); }
@media (min-width: 768px) { .order { padding: 96px 0; } }
.steps {
  display: grid; gap: 0; margin-top: 24px;
  border-top: 1px solid var(--border-default);
}
.steps li { padding: 24px 0; border-bottom: 1px solid var(--border-default); }
.steps__n { font-size: 12px; color: var(--text-subtle); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.steps h3 { margin-top: 8px; font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.3; }
.steps p { margin-top: 6px; color: var(--text-secondary); max-width: 38ch; }
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); margin-top: 40px; border-top: 0; gap: 32px; }
  .steps li { border-bottom: 0; border-top: 1px solid var(--text-primary); padding: 20px 0 0; }
}
.order__pay { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }

/* Логотипы оплаты. Файлы обрезаны по контуру, поэтому высота подобрана
   каждому отдельно — так они выглядят одного размера. */
.pay { --u: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.pay img { width: auto; height: calc(var(--h) * var(--u)); }
.pay img[data-pay-id="mir"] { --h: 16px; }
.pay img[data-pay-id="visa"] { --h: 16px; }
.pay img[data-pay-id="sbp"] { --h: 26px; }
.pay img[data-pay-id="mastercard"] { --h: 24px; }
.pay img[data-pay-id="paykeeper"] { --h: 28px; }
@media (min-width: 768px) { .pay { --u: 1.15; gap: 16px 32px; } }
.pay--small { --u: .75 !important; gap: 10px 16px; justify-content: center; }

/* Подвал */
.footer { padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-subtle); }
.footer .logo { position: static; transform: none; height: auto; }
.footer__top { display: flex; flex-direction: column; gap: 24px; }
.footer__contacts { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-secondary); }
.footer__contacts a { padding: 6px 0; transition: color .2s; }
.footer__contacts a:hover { color: var(--text-primary); }
.pay--footer { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border-subtle); }
.footer__legal {
  margin-top: 32px; display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; line-height: 1.6; color: var(--text-muted);
}
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer__note { max-width: 70ch; }
@media (min-width: 768px) {
  .footer { padding-top: 64px; }
  .footer__top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .footer__contacts { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px 28px; max-width: 70%; }
}

/* Выезжающие панели */
.sheet { position: fixed; inset: 0; z-index: 500; }
.sheet__scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .25s var(--ease); }
.sheet__panel {
  position: absolute; background: var(--surface-base);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
}
.sheet__head {
  position: sticky; top: 0; z-index: 2; background: var(--surface-base);
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; padding: 0 10px 0 var(--gutter);
  border-bottom: 1px solid var(--border-subtle);
}
.sheet--left .sheet__panel {
  top: 0; bottom: 0; left: 0; width: min(88vw, 380px);
  animation: from-left .35s var(--ease);
}
.sheet--right .sheet__panel {
  top: 0; bottom: 0; right: 0; width: 100%;
  animation: from-right .35s var(--ease);
}
@media (min-width: 560px) { .sheet--right .sheet__panel { width: 460px; } }

/* Товар: на телефоне — лист снизу во весь экран, на широком — окно */
.sheet--center .sheet__panel {
  left: 0; right: 0; bottom: 0; top: 0;
  animation: from-bottom .35s var(--ease);
}
@media (min-width: 900px) {
  .sheet--center .sheet__panel {
    top: 50%; left: 50%; right: auto; bottom: auto;
    transform: translate(-50%, -50%);
    width: min(1040px, calc(100vw - 64px)); max-height: calc(100vh - 64px);
    box-shadow: var(--shadow-lg);
    animation: fade .25s var(--ease);
  }
}
@keyframes fade { from { opacity: 0; } }
@keyframes from-left { from { transform: translateX(-100%); } }
@keyframes from-right { from { transform: translateX(100%); } }
@keyframes from-bottom { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.menu { display: flex; flex-direction: column; padding: 8px 0; }
.menu a {
  display: flex; align-items: center; min-height: 52px; padding: 0 var(--gutter);
  font-family: var(--font-display); font-size: 20px; border-bottom: 1px solid var(--border-subtle);
}
.menu__contacts {
  margin-top: auto; display: flex; flex-direction: column;
  padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  font-size: 14px; color: var(--text-secondary);
}
.menu__contacts a { padding: 8px 0; }

.product { display: block; }
@media (min-width: 900px) { .product { display: grid; grid-template-columns: 1.1fr 1fr; } }
.product__close {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  background: rgb(255 255 255 / .8);
}
@media (min-width: 900px) { .product__close { position: absolute; } }
.product__media { background: var(--surface-tile); }
.product__main { position: relative; aspect-ratio: 1; overflow: hidden; }
.product__main img { width: 100%; height: 100%; object-fit: cover; }
.product__main .ph { font-size: clamp(18px, 6vw, 30px); }
.thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; background: var(--surface-base); }
.thumbs button { flex: none; width: 64px; height: 64px; background: var(--surface-tile); border: 1px solid transparent; }
.thumbs button[aria-current="true"] { border-color: var(--text-primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product__info {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { .product__info { padding: 56px 48px 48px; overflow-y: auto; } }
.product__name { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.2; }
@media (min-width: 900px) { .product__name { font-size: 34px; } }
.product__short { color: var(--text-muted); }
.product__price { margin-top: 8px; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.product__stock { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.product__desc { margin-top: 16px; color: var(--text-secondary); white-space: pre-line; }
.product__desc:empty { display: none; }
.specs { margin-top: 16px; border-top: 1px solid var(--border-subtle); }
.specs:empty { display: none; }
.specs div {
  display: grid; grid-template-columns: 40% 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle); font-size: 14px;
}
.specs dt { color: var(--text-muted); }

/* Заявка */
.request__title { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.request__body { padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
.request__empty { padding: 32px 0; color: var(--text-muted); }
.lines li {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: start;
  padding: 16px 0; border-bottom: 1px solid var(--border-subtle);
}
.lines__media { position: relative; width: 72px; aspect-ratio: 1; background: var(--surface-tile); overflow: hidden; }
.lines__media img { width: 100%; height: 100%; object-fit: cover; }
.lines__media .ph { font-size: 8px; padding: 6px; letter-spacing: .1em; }
.lines__name { font-size: 14px; line-height: 20px; font-weight: 500; }
.lines__price { margin-top: 4px; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid var(--border-default); }
.qty button { width: 32px; height: 32px; font-size: 16px; }
.qty button:hover { background: var(--surface-muted); }
.qty span { min-width: 28px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.lines__remove { width: 36px; height: 36px; margin: -6px -8px 0 0; }
.lines__remove svg { width: 18px; height: 18px; }

.request__total {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 0 4px; font-size: 14px; font-variant-numeric: tabular-nums;
}
.request__total b { font-weight: 500; }

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > legend { font-size: 13px; color: var(--text-secondary); margin-bottom: 0; }
.field > legend { margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--border-default); border-radius: 0; background: var(--surface-base);
  padding: 0 14px; height: 48px; font-size: 16px; /* 16px — iOS не увеличивает страницу */
  transition: border-color .2s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text-primary); }
.field input[aria-invalid="true"] { border-color: var(--danger); }

.seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; border: 1px solid var(--border-default); }
.seg label { position: relative; }
.seg label + label { border-left: 1px solid var(--border-default); }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: flex; align-items: center; justify-content: center; height: 44px;
  font-size: 13px; cursor: pointer; transition: background-color .2s, color .2s;
}
.seg input:checked + span { background: var(--accent); color: var(--text-inverse); }
.seg input:focus-visible + span { outline: 2px solid var(--text-primary); outline-offset: -4px; }

.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.check a { text-decoration: underline; text-underline-offset: 2px; }
.form__error { font-size: 13px; color: var(--danger); }
.form__hint { font-size: 12px; line-height: 1.6; color: var(--text-muted); text-align: center; }

.request__done { padding: 40px var(--gutter); display: flex; flex-direction: column; gap: 12px; }
.request__done h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; }
.request__done p { color: var(--text-secondary); margin-bottom: 16px; }

/* Уведомление */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 600;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  max-width: calc(100vw - 32px); padding: 12px 12px 12px 16px;
  background: var(--surface-inverse); color: var(--text-inverse); font-size: 14px;
  box-shadow: var(--shadow-lg); animation: from-bottom .3s var(--ease);
}
.toast button { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 8px; white-space: nowrap; }

/* Отдельная страница: заказ и оплата */
.page { padding: 32px 0 64px; }
@media (min-width: 768px) { .page { padding: 56px 0 112px; } }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.page__title {
  margin-top: 16px; font-family: var(--font-display); font-weight: 500;
  font-size: 34px; line-height: 1.1;
}
@media (min-width: 768px) { .page__title { font-size: 52px; } }
.page__lead { margin-top: 12px; max-width: 56ch; color: var(--text-secondary); text-wrap: pretty; }
@media (min-width: 768px) { .page__lead { font-size: 18px; } }
.page__section { margin-top: 48px; }
@media (min-width: 768px) { .page__section { margin-top: 80px; } }
.page__cta { margin-top: 48px; }
@media (max-width: 479px) { .page__cta .btn { width: 100%; } }

.methods { margin-top: 24px; border-top: 1px solid var(--border-default); }
.methods li {
  display: grid; gap: 14px; padding: 24px 0;
  border-bottom: 1px solid var(--border-default);
}
.methods h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.3; }
.methods p { margin-top: 4px; color: var(--text-secondary); max-width: 60ch; }
.methods__logos { min-height: 30px; }
@media (min-width: 768px) {
  .methods { margin-top: 40px; }
  .methods li { grid-template-columns: 280px 1fr; gap: 32px; align-items: center; padding: 32px 0; }
}

/* Кнопка без заливки: тёмная рамка, при наведении заливается */
.btn--line { border: 1px solid var(--text-primary); color: var(--text-primary); }
.btn--line:hover { background: var(--accent); color: var(--text-inverse); }

/* Заголовки набраны гротеском: крупному кеглю нужна поджатая разрядка */
.section-title, .page__title, .product__name, .request__title, .steps h3, .methods h3,
.request__done h3, .menu a { letter-spacing: -0.02em; font-weight: 500; }
.section-title, .page__title { letter-spacing: -0.03em; }
.ph { font-weight: 500; letter-spacing: .2em; }
.menu a { font-size: 18px; }

/* ——— Карусель на главной ———
   Слайд: фото во весь блок, текст поверх.
   Телефон: блок на 75% высоты экрана, заголовок сверху слева, кнопка внизу.
   Широкий экран: 16:9, но не выше экрана; текст слева в пустой части кадра.
   .slide--light — светлый кадр: тёмный текст, тёмная кнопка и точки. */
.hero { position: relative; overflow: hidden; background: #b8401f; --fg: #fff; }
.hero.is-light { --fg: var(--text-primary); }
.hero__track {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero__track::-webkit-scrollbar { display: none; }
.slide {
  --fg: #fff;
  position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  height: 75vh; height: 75svh; min-height: 480px;
}
.slide--light { --fg: var(--text-primary); background: #e9cfa8; }
.slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  padding-top: 28px; padding-bottom: 52px; color: var(--fg);
}
.slide__title {
  max-width: 11ch; font-size: clamp(30px, 9vw, 40px); line-height: 1; font-weight: 600; letter-spacing: -0.02em;
}
.slide__sub { max-width: 24ch; margin-top: 10px; font-size: 15px; line-height: 1.5; opacity: .92; }
.slide__btn {
  margin-top: auto; width: 100%;
  border: 1px solid var(--fg); color: var(--fg); background: transparent;
}
.slide__btn:hover, .slide__btn:active { background: var(--fg); color: #b8401f; }
.slide--light .slide__btn:hover, .slide--light .slide__btn:active { color: #fff; }

.hero__nav {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center; align-items: center; gap: 8px; pointer-events: none;
}
.hero__arrow { display: none; }
.hero__dots { display: flex; gap: 6px; pointer-events: auto; }
.hero__dots button {
  width: 28px; height: 24px; position: relative;
}
.hero__dots button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px;
  background: var(--fg); opacity: .35; transition: opacity .3s;
}
.hero__dots button[aria-current="true"]::after { opacity: 1; }

@media (min-width: 768px) {
  .slide { height: min(56.25vw, calc(100svh - var(--header-h))); min-height: 440px; }
  .slide__inner { justify-content: flex-end; padding-top: 0; padding-bottom: 64px; }
  .slide--top .slide__inner { justify-content: flex-start; padding-top: clamp(48px, 7vw, 112px); }
  .slide__title { max-width: 30vw; font-size: clamp(36px, 4.4vw, 76px); line-height: .98; letter-spacing: -0.03em; }
  .slide__sub { max-width: 30vw; font-size: clamp(16px, 1.4vw, 20px); margin: 12px 0 28px; }
  .slide__btn { margin-top: 0; width: auto; min-width: 220px; }
  .hero__nav { justify-content: flex-end; bottom: 24px; padding-right: max(var(--gutter), env(safe-area-inset-right)); gap: 4px; }
  .hero__arrow {
    display: inline-flex; align-items: center; justify-content: center; pointer-events: auto;
    width: 40px; height: 40px; color: var(--fg); transition: opacity .2s;
  }
  .hero__arrow:hover { opacity: .6; }
  .hero__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
}
@media (max-width: 767px) {
  .slide--top .slide__inner { padding-top: 28px; }
}
@media (max-width: 767px) {
  .slide__title { font-size: clamp(24px, 7.4vw, 32px); max-width: 12ch; }
}
.slide--light .slide__btn { background: rgb(255 255 255 / .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.slide--light .slide__btn:hover, .slide--light .slide__btn:active { background: var(--fg); }

/* Пока фото грузится, слайд залит цветом своего кадра */
.slide { background: #b8401f; }
.slide--light { background: #e9cfa8; }

/* Светлый кадр с белым текстом: лёгкое затемнение сверху под заголовок
   и совсем слабое снизу под кнопку и точки */
.slide--shade { background: #e9cfa8; }
.slide--shade::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(20 12 6 / .42) 0%, rgb(20 12 6 / .18) 28%, rgb(20 12 6 / 0) 48%),
    linear-gradient(to top, rgb(20 12 6 / .32) 0%, rgb(20 12 6 / 0) 26%);
}
.slide--shade .slide__inner { text-shadow: 0 1px 12px rgb(0 0 0 / .18); }
@media (min-width: 768px) {
  .slide--shade::before {
    background:
      linear-gradient(to bottom, rgb(20 12 6 / .38) 0%, rgb(20 12 6 / .12) 40%, rgb(20 12 6 / 0) 60%),
      linear-gradient(to top, rgb(20 12 6 / .22) 0%, rgb(20 12 6 / 0) 22%);
  }
}
.slide--shade::before { z-index: 1; }
.slide__inner { z-index: 2; }
.hero__nav { z-index: 3; }

.form__hint a, .page__note a { text-decoration: underline; text-underline-offset: 3px; }
.page__note { margin-top: 40px; font-size: 15px; }

/* Слайд 3: модель во весь рост. На телефоне текст внизу на затемнении,
   на широком экране — сверху слева на чистом фоне. */
.slide--mbottom { background: #b06a4c; }
@media (max-width: 767px) {
  .slide--mbottom::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to top, rgb(30 14 8 / .62) 0%, rgb(30 14 8 / .35) 30%, rgb(30 14 8 / 0) 52%);
  }
  .slide--mbottom .slide__inner { justify-content: flex-end; padding-top: 0; }
  .slide--mbottom .slide__btn { margin-top: 20px; }
}

/* Слайд 3: снимок без обрезки модели.
   Широкий экран: весь кадр целиком, вокруг цвет студийного фона.
   Телефон: как остальные слайды — фото во весь блок (вертикальный кадр
   во всю высоту снимка, голова и ступни на месте), текст сверху, кнопка внизу.
   Если телефон шире обычного, кадр вписывается целиком. */
.slide--fit { background: #9a5a3f; }
.slide--fit .slide__img { object-fit: contain; }
@media (max-width: 767px) and (max-aspect-ratio: 9/16) {
  .slide--fit .slide__img { object-fit: cover; object-position: 50% 50%; }
}
@media (max-width: 767px) {
  .slide--fit .slide__sub { max-width: 15ch; }
}

/* Слайд 3 на телефоне: заголовок и подзаголовок опущены к кнопке,
   под ними мягкое затемнение снизу; лицо и вазы свободны */
@media (max-width: 767px) {
  .slide--fit .slide__inner { justify-content: flex-end; padding-top: 0; }
  .slide--fit .slide__sub { max-width: 24ch; }
  .slide--fit .slide__btn { margin-top: 20px; }
  .slide--fit::before {
    display: block;
    background: linear-gradient(to top, rgb(30 14 8 / .6) 0%, rgb(30 14 8 / .35) 28%, rgb(30 14 8 / 0) 50%);
  }
}

/* Слайд 3, широкий кадр: заполняет блок на любом экране без полос.
   Модель по центру, срезается только лишний фон по бокам. */
.slide--fit .slide__img {
  object-fit: cover; object-position: 50% 50%;
  -webkit-mask-image: none; mask-image: none;
}
