/* ИП Сазонов — каталог. Mobile-first, без зависимостей. */
:root {
  --ink: #1B1F24;        /* графит */
  --ink-2: #2A3038;
  --text: #20252B;
  --muted: #5F6873;
  --zinc: #C9D0D7;       /* оцинковка */
  --zinc-2: #E4E8EC;
  --paper: #F4F6F8;
  --white: #fff;
  --accent: #D9480F;     /* единственный акцент */
  --accent-2: #BF3D0A;
  --r: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 400 17px/1.5 var(--font);
  color: var(--text);
  background: var(--white);
  padding-bottom: 76px; /* место под нижнюю панель */
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .contacts :focus-visible, .bar :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
[id] { scroll-margin-top: 16px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 8px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 22px;
  font: 700 17px/1 var(--font); text-decoration: none; white-space: nowrap;
  border-radius: 12px; border: 2px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.ico { width: 22px; height: 22px; flex: none; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-2); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; }
.btn--wa {
  min-height: 46px; padding: 0 14px; font-size: 15px; gap: 7px;
  color: var(--accent); border-color: var(--accent); background: var(--white);
}
.btn--wa .ico { width: 19px; height: 19px; }
.btn--wa:hover { background: var(--accent); color: #fff; }

/* ---------- Шапка ---------- */
.top { background: var(--ink); color: #fff; }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 26px; height: 20px; flex: none;
  border: 4px solid var(--accent); border-bottom: 0; border-radius: 2px 2px 0 0; /* П-профиль */
}
.brand__name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand__sub { display: none; color: #A9B1BA; font-size: 14px; }
.nav { display: none; gap: 24px; font-size: 15px; }
.nav a { text-decoration: none; color: #C8CED5; padding: 8px 0; }
.nav a:hover { color: #fff; }
.top__tel { font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; padding: 8px 0; }
.top__tel:hover { color: #FFB38F; }

/* ---------- Hero ---------- */
.hero {
  color: #fff;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hero__in { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 36px; }
.eyebrow {
  font: 600 12.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #FF9B6B;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(30px, 8.4vw, 54px); font-weight: 800; }
.lead { margin-top: 16px; font-size: clamp(17px, 2.2vw, 20px); color: #D3D8DE; max-width: 34em; }
.cta { display: grid; gap: 10px; margin-top: 24px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 28px; border-top: 1px solid rgba(255,255,255,.14); }
.facts li { padding: 14px 10px 0 0; }
.facts li + li { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.14); }
.facts b { display: block; font-size: clamp(18px, 5vw, 26px); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.facts span { display: block; font-size: 13px; line-height: 1.3; color: #A9B1BA; margin-top: 2px; }

/* ---------- Секции ---------- */
.section { padding: 44px 0; }
.section--alt { background: var(--paper); }
.section__head { margin-bottom: 22px; }
.section__head h2, .contacts h2 { font-size: clamp(26px, 6vw, 38px); font-weight: 800; }
.section__head p { margin-top: 10px; color: var(--muted); max-width: 40em; }

/* ---------- Карточка позиции ---------- */
.item {
  display: grid; gap: 0;
  border: 1px solid var(--zinc-2); border-radius: var(--r); overflow: hidden; background: var(--white);
}
.item + .item { margin-top: 18px; }
.item__media { display: grid; background: var(--paper); }
.item__media picture img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.item__media .scheme { width: 100%; aspect-ratio: 604 / 336; background: var(--white); border-top: 1px solid var(--zinc-2); }
.item__body { padding: 18px 16px 8px; }
.item__tag { font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.item h3 { font-size: clamp(22px, 5.4vw, 27px); font-weight: 800; margin-top: 6px; }

.specs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.specs div { background: var(--paper); border-radius: 8px; padding: 8px 11px; }
.specs dt { font-size: 12px; line-height: 1.2; color: var(--muted); }
.specs dd { font: 600 14.5px/1.3 var(--mono); margin-top: 2px; }

.prices { margin-top: 12px; }
.prices li {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--zinc-2);
}
.sku b { display: block; font-size: 17px; font-weight: 700; white-space: nowrap; }
.sku small { display: block; font-size: 13px; line-height: 1.25; color: var(--muted); }
.price { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; text-align: right; }
.price small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 1px; }

.prices--one li { grid-template-columns: 1fr auto; }
.prices--one .btn { grid-column: 1 / -1; min-height: 52px; font-size: 16px; }
.prices--one .price { font-size: 28px; }

.note { margin-top: 22px; color: var(--muted); font-size: 16px; }

/* ---------- Доставка и оплата ---------- */
.terms { display: grid; gap: 12px; }
.terms li { background: var(--white); border: 1px solid var(--zinc-2); border-radius: var(--r); padding: 18px; }
.terms__num { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.terms h3 { font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
.terms p { margin-top: 6px; color: var(--muted); font-size: 16px; }

/* ---------- Контакты ---------- */
.contacts { background: var(--ink); color: #fff; padding: 44px 0; }
.contacts__in { display: grid; gap: 32px; }
.bigtel {
  display: inline-block; margin-top: 14px;
  font-size: clamp(32px, 9.6vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
}
.bigtel:hover { color: #FFB38F; }
.info { display: grid; gap: 0; align-content: start; }
.info div { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); }
.info dt { font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #A9B1BA; }
.info dd { font-size: 19px; font-weight: 600; margin-top: 6px; }
.info .todo { color: #A9B1BA; font-weight: 500; }
.maplink { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 0; font-size: 16px; font-weight: 500; color: #FF9B6B; }
.maplink .ico { width: 18px; height: 18px; }

/* ---------- Футер ---------- */
.foot { background: var(--ink); color: #A9B1BA; font-size: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 18px; padding-bottom: 18px; }

/* ---------- Нижняя панель (мобильные) ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(27,31,36,.96); border-top: 1px solid rgba(255,255,255,.12);
}
.bar .btn { min-height: 52px; padding: 0 10px; }

/* ---------- ≥ 560 ---------- */
@media (min-width: 560px) {
  .wrap { padding: 0 24px; }
  .cta { display: flex; flex-wrap: wrap; }
  .brand__sub { display: inline; }
  .item__media { grid-template-columns: 1fr 1fr; }
  .item__media .scheme { aspect-ratio: auto; height: 100%; object-fit: contain; border-top: 0; border-left: 1px solid var(--zinc-2); }
  .item__body { padding: 22px 24px 10px; }
  .terms { grid-template-columns: repeat(3, 1fr); }
  .prices--one li { grid-template-columns: 1fr auto auto; }
  .prices--one .btn { grid-column: auto; min-height: 46px; font-size: 15px; }
  .prices--one .only-wide { display: none; }
}

/* ---------- ≥ 900: панель не нужна, hero в две колонки ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; font-size: 18px; }
  .bar { display: none; }
  .nav { display: flex; }
  .top__in { min-height: 68px; }
  .hero__in { grid-template-columns: 1fr 440px; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
  .section, .contacts { padding: 72px 0; }
  .section__head { margin-bottom: 32px; }
  .contacts__in { grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: start; }
  .terms li { padding: 24px; }
}

/* ---------- ≥ 1000: карточка в одну строку — фото | схема | цены ---------- */
@media (min-width: 1000px) {
  .item { grid-template-columns: 58% 1fr; }
  .item__media { border-right: 1px solid var(--zinc-2); }
  .item__body { padding: 26px 28px 12px; align-self: center; }
  .item + .item { margin-top: 24px; }
}

/* =====================================================================
   v2: слайдер, калькулятор, увеличение схем, мелкие детали
   ===================================================================== */
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[id] { scroll-margin-top: 76px; }
.price, .row__sum, .sum__total, .facts b { font-variant-numeric: tabular-nums; }

/* Шапка — липкая, полупрозрачная */
.top { position: sticky; top: 0; z-index: 40; background: rgba(27,31,36,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* Метка раздела — как номер листа на чертеже */
.idx { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.idx::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.contacts .idx { color: #A9B1BA; }

/* ---------- Слайдер ---------- */
.slider { min-width: 0; }
.slider__track {
  display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.slider__track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 86%; scroll-snap-align: start; }
.slide a { display: block; position: relative; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; background: var(--ink-2); }
.slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.slide__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  padding: 44px 14px 13px; background: linear-gradient(transparent, rgba(15,18,22,.88));
}
.slide__cap b { font-size: 17px; font-weight: 700; line-height: 1.2; }
.slide__cap span { font-size: 17px; font-weight: 800; white-space: nowrap; color: #FFB38F; }
.slider__ui { display: none; align-items: center; justify-content: space-between; margin-top: 12px; }
.js .slider__ui { display: flex; }
.slider__btn {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3);
  background: none; color: #fff; font: 600 18px/1 var(--font); cursor: pointer; transition: border-color .15s, opacity .15s;
}
.slider__btn:hover { border-color: #fff; }
.slider__btn:disabled { opacity: .3; cursor: default; border-color: rgba(255,255,255,.3); }
.dots { display: flex; gap: 7px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.3); transition: width .2s, background-color .2s; }
.dots i.is-on { width: 26px; background: var(--accent); }

/* ---------- Карточки: наведение и увеличение схемы ---------- */
.item { transition: border-color .15s, box-shadow .15s; }
.item:hover { border-color: var(--zinc); box-shadow: 0 10px 30px -18px rgba(27,31,36,.45); }
.zoom { display: block; position: relative; min-width: 0; padding: 0; border: 0; background: var(--white); font: inherit; cursor: zoom-in; }
.zoom::after {
  content: "⤢ Увеличить"; position: absolute; right: 8px; bottom: 8px;
  font: 600 11px/1 var(--mono); color: var(--muted); background: var(--paper); padding: 6px 8px; border-radius: 6px;
}
.zoom:hover::after { color: var(--accent); }
.note a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

.lb { width: min(96vw, 1000px); max-width: none; padding: 0; border: 0; border-radius: var(--r); background: var(--white); }
.lb::backdrop { background: rgba(15,18,22,.82); }
.lb img { width: 100%; }
.lb__x {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--ink); color: #fff; font: 400 26px/1 var(--font); cursor: pointer;
}

/* ---------- Калькулятор ---------- */
.how { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 16px; color: var(--text); }
.how li { display: flex; align-items: center; gap: 10px; }
.how b { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; font: 700 13px/1 var(--mono); }

.calc { display: grid; gap: 16px; }
.calc__list { background: var(--white); border: 1px solid var(--zinc-2); border-radius: var(--r); padding: 6px 16px 4px; }
.calc__group { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.calc__group span { color: var(--muted); letter-spacing: .04em; }
.row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name step" "name sum"; align-items: center; column-gap: 12px; padding: 12px 0; border-top: 1px solid var(--zinc-2); }
.calc__group + ul .row:first-child { border-top: 0; }
.row__name { grid-area: name; }
.row__name b { display: block; font-size: 18px; font-weight: 700; }
.row__name small { display: block; font-size: 14px; color: var(--muted); }
.step { grid-area: step; display: inline-flex; border: 2px solid var(--zinc); border-radius: 12px; overflow: hidden; background: var(--white); }
.row.is-on .step { border-color: var(--ink); }
.step__b { width: 46px; height: 46px; border: 0; background: var(--paper); color: var(--ink); font: 500 24px/1 var(--font); cursor: pointer; touch-action: manipulation; }
.step__b:hover { background: var(--zinc-2); }
.step__i { width: 64px; height: 46px; border: 0; padding: 0; text-align: center; font: 700 18px/1 var(--font); color: var(--ink); background: none; -moz-appearance: textfield; appearance: textfield; }
.step__i::-webkit-outer-spin-button, .step__i::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step__i::placeholder { color: #A9B1BA; font-weight: 500; }
.step__i:focus-visible { outline-offset: -3px; }
.row__sum { grid-area: sum; justify-self: end; margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.row.is-on .row__sum { color: var(--ink); }

.sum { background: var(--ink); color: #fff; border-radius: var(--r); padding: 20px 18px; }
.sum__label { font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #A9B1BA; }
.sum__total { margin-top: 8px; font-size: clamp(40px, 11vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.sum__lines { margin-top: 10px; font-size: 15px; color: #C8CED5; }
.ship { margin: 18px 0; }
.ship__bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.ship__bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .25s; }
.ship.is-free .ship__bar i { background: #37B24D; }
.ship p { margin-top: 8px; font-size: 14.5px; color: #C8CED5; }
.ship.is-free p { color: #8CE99A; font-weight: 600; }
.sum .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.2; }
.sum__reset { display: block; margin: 10px auto 0; padding: 10px 14px; border: 0; background: none; color: #A9B1BA; font: 500 15px/1 var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sum__reset:hover { color: #fff; }
.sum__hint { margin-top: 12px; font-size: 13.5px; line-height: 1.4; color: #8B949E; }
.sum :focus-visible { outline-color: #fff; }

@media (min-width: 560px) {
  .slider__track { margin: 0 -24px; padding: 0 24px; scroll-padding: 0 24px; }
  .slide { flex-basis: 62%; }
  .how { display: flex; flex-wrap: wrap; gap: 8px 28px; }
  .calc__list { padding: 8px 24px 6px; }
  .row { grid-template-columns: 1fr auto 110px; grid-template-areas: "name step sum"; }
  .row__sum { margin-top: 0; font-size: 17px; }
}
@media (min-width: 900px) {
  .slider__track { margin: 0; padding: 0; scroll-padding: 0; border-radius: var(--r); }
  .slide { flex-basis: 100%; }
  .calc { grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
  .sum { position: sticky; top: 92px; padding: 26px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
