/* =========================================================
   Райский холод — основные стили
   Палитра A «Бирюзовый холод», шрифты Unbounded + Onest (локально)
   ========================================================= */

@font-face {
  font-family: "Unbounded"; font-weight: 200 900; font-display: swap;
  src: url("../fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-weight: 200 900; font-display: swap;
  src: url("../fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest"; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary-900: #0b3d3a;  /* глубина */
  --primary-700: #0f766e;  /* бирюза */
  --primary-600: #0d9488;  /* волна */
  --primary-100: #ccfbf1;  /* изморозь */
  --bg: #f4fafa;           /* лёд */
  --surface: #ffffff;
  --ink: #0f2a2a;
  --muted: #4b6464;
  --line: #d5e6e4;
  --accent: #f59e0b;       /* янтарь — только действия и итог */
  --accent-hover: #d97706;
  --on-accent: #1f1300;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --step-3: clamp(2rem, 1.4rem + 3vw, 3.4rem);

  --radius-s: 8px;
  --radius-m: 14px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-body);
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-700); text-underline-offset: .18em; }
a:hover { color: var(--primary-600); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; overflow-wrap: break-word; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-lead { max-width: 62ch; color: var(--muted); font-size: var(--step-1); line-height: 1.5; margin-bottom: 2.2em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius-m); border: 0; cursor: pointer;
  font: 600 var(--step-0)/1.2 var(--font-body); text-decoration: none; text-align: center;
  transition: transform .15s, background-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-wide { width: 100%; }
.btn-outline { background: transparent; color: var(--primary-700); box-shadow: inset 0 0 0 2px var(--primary-700); }
.btn-outline:hover { background: var(--primary-100); color: var(--primary-900); }

/* ---------- Текстовые страницы: политика, согласие, 404 ---------- */
.doc { max-width: 72ch; }
.doc h1 { font-size: var(--step-2); }
.doc h2 { font-size: 1.15rem; margin-top: 2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.doc-date { color: var(--muted); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary-900); }
.logo svg { width: 30px; height: 30px; color: var(--primary-600); }
.logo span { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
/* 6 пунктов меню + телефон: на ноутбуках поуже сжимаем отступы и шрифт, чтобы пункты не переносились */
@media (max-width: 1180px) { .header-row { gap: 18px; } .nav { gap: 14px; font-size: .94rem; } }
.nav a:hover { color: var(--primary-700); }
.header-phone { font-weight: 700; text-decoration: none; color: var(--primary-900); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--primary-900); border-radius: 50%; }
.cart-link svg { width: 24px; height: 24px; }
.cart-link .cart-count { position: absolute; top: 2px; right: 0; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font: 700 12px/20px var(--font-body); text-align: center;
}
.cart-count.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 12px 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s; }
.burger span + span { margin-top: 8px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; overflow: hidden; color: #fff; background: var(--primary-900); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--primary-900) 92%, transparent) 0%, transparent 55%),
    linear-gradient(95deg, color-mix(in srgb, var(--primary-900) 88%, transparent) 25%, transparent 75%);
}
.hero-inner { position: relative; z-index: 2; padding-block: 120px 64px; }
.hero h1 { font-size: var(--step-3); font-weight: 700; max-width: 13em; margin-bottom: .4em; }
.hero .lead { font-size: var(--step-1); line-height: 1.5; max-width: 34em; color: rgba(255,255,255,.88); }
.badge {
  display: inline-block; margin-bottom: 20px; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-100); color: var(--primary-900); font-weight: 600; font-size: var(--step--1);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.airflow { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: .3; }
.airflow path { fill: none; stroke: var(--primary-100); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 60 240; animation: flow 7s linear infinite; }
.airflow path:nth-child(2) { animation-duration: 9s; animation-delay: -2s; }
.airflow path:nth-child(3) { animation-duration: 11s; animation-delay: -5s; }
.airflow path:nth-child(4) { animation-duration: 8s; animation-delay: -3s; }
@keyframes flow { to { stroke-dashoffset: -600; } }

/* ---------- Факты: строка под первым экраном, без карточек ---------- */
.facts { background: var(--surface); border-bottom: 1px solid var(--line); }
.facts-list { list-style: none; margin: 0 auto; padding-block: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.facts-list li { border-top: 3px solid var(--primary-600); padding-top: 14px; }
.facts-list b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 4px; }
.facts-list span { color: var(--muted); font-size: var(--step--1); line-height: 1.45; display: block; }

/* ---------- Товары ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 1.4em; }
.section-head h2 { margin: 0; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 20px; }
.product { display: flex; flex-direction: column; }
/* В каталоге 100+ карточек: те, что далеко за экраном, браузер не раскладывает и не рисует, пока до них не докрутят */
#products .product { content-visibility: auto; contain-intrinsic-size: auto 440px; }
.product[hidden] { display: none; }
.product-img {
  display: grid; place-items: center; aspect-ratio: 5 / 3; border-radius: var(--radius-m);
  background: linear-gradient(170deg, var(--primary-100), var(--surface) 80%); padding: 0 12%;
}
.unit { width: 100%; height: auto; transition: transform .3s; }
.product-img:hover .unit, .product-img:hover img { transform: translateY(-3px); }
/* С настоящим фото — белая подложка, как в магазинах техники: белые блоки и белые фоны фото сливаются */
.product-img.has-photo, .pdp-img.has-photo { background: #fff; border: 1px solid var(--line); padding: 0 4%; }
.product-img img, .pdp-img img { width: 100%; height: auto; transition: transform .3s; }
.unit-body { fill: #fff; stroke: color-mix(in srgb, var(--primary-900) 22%, transparent); stroke-width: 2; }
.unit-vent { fill: color-mix(in srgb, var(--primary-900) 14%, transparent); }
.unit-led { fill: var(--primary-600); }
.unit-brand { font: 600 15px var(--font-display); fill: var(--primary-900); }
.product-body { display: flex; flex-direction: column; flex: 1; padding-top: 14px; }
.product-brand { margin: 0; color: var(--primary-700); font-weight: 600; font-size: var(--step--1); }
.product h3 { font-size: 1.05rem; margin: 2px 0 2px; }
.product h3 a { color: var(--ink); text-decoration: none; }
.product h3 a:hover { color: var(--primary-700); }
.product-model { margin: 0 0 10px; color: var(--muted); font-size: 13px; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips span { font-size: 13px; padding: 2px 9px; border-radius: 6px; background: var(--primary-100); color: var(--primary-900); }
.product-price { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin: auto 0 12px; font-variant-numeric: tabular-nums; }
.btn-add { min-height: 46px; }
.btn-primary { background: var(--primary-700); color: #fff; }
.btn-primary:hover { background: var(--primary-600); color: #fff; }

/* ---------- Каталог ---------- */
.catalog-page h1 { font-size: var(--step-3); }
.catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 22px; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend { font-weight: 600; margin-bottom: 8px; }
.filters select { width: 100%; font: inherit; padding: 11px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.seg-small span { padding: 7px 12px; font-size: var(--step--1); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: var(--step--1); }
.chip-check input:checked + span { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }
.chip-check input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.found { color: var(--muted); margin-bottom: 16px; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius-m); color: var(--muted); }

/* ---------- Страница товара ---------- */
.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); }
/* Слева галерея и условия под ней, справа описание. На телефоне: галерея → описание → условия */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "media info" "perks info"; gap: 24px 48px; align-items: start; }
.pdp > .pg, .pdp > .pdp-img { grid-area: media; }
.pdp-info { grid-area: info; }
.perks { grid-area: perks; }
.pdp-img { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 0 12%; border-radius: var(--radius-m); background: linear-gradient(170deg, var(--primary-100), var(--surface) 80%); }
.pdp-info h1 { font-size: var(--step-2); margin-bottom: .2em; }
.pdp-price { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); margin: 18px 0 6px; }
.pdp-note { color: var(--muted); }
.pdp-about { max-width: 38em; margin-bottom: 28px; }

/* Галерея: лента со scroll-snap листается свайпом сама, кнопки — для мыши */
.pg-stage { position: relative; display: block; padding: 0; overflow: hidden; }
.pg-track { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pg-track::-webkit-scrollbar { display: none; }
.pg-track > li { flex: 0 0 100%; scroll-snap-align: start; }
.pg-track:focus-visible { outline: 3px solid var(--primary-600); outline-offset: -3px; }
.pg-slide { display: grid; place-items: center; width: 100%; height: 100%; padding: 0 4%; border: 0; background: none; cursor: zoom-in; }
.pg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(11, 61, 58, .12); }
.pg-nav:hover { border-color: var(--primary-600); color: var(--primary-700); }
.pg-prev { left: 10px; }
.pg-next { right: 10px; }
.pg-count { position: absolute; right: 12px; bottom: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(11, 61, 58, .72); color: #fff; font-size: var(--step--1); }
.pg-thumbs { display: flex; gap: 8px; margin: 10px 0 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.pg-thumb { display: block; width: 84px; padding: 2px; border: 2px solid var(--line); border-radius: var(--radius-s); background: #fff; cursor: pointer; }
.pg-thumb img { display: block; width: 100%; height: auto; }
.pg-thumb[aria-current] { border-color: var(--primary-600); }
/* на сенсорных экранах листают пальцем — стрелки только мешают */
@media (hover: none) and (pointer: coarse) { .pg-nav { display: none; } }

/* Другие мощности серии */
.sizes-title { margin: 18px 0 8px; font-weight: 600; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.size { display: block; min-width: 92px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.3; }
.size b { display: block; }
.size span { color: var(--muted); font-size: var(--step--1); }
a.size:hover { border-color: var(--primary-600); }
.size.is-current { border: 2px solid var(--primary-600); background: var(--primary-100); padding: 7px 11px; }

/* Условия под галереей */
.perks { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.perks-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.perks-list li { position: relative; padding-left: 32px; }
.perks-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230f766e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.perks-list b { display: block; }
.perks-list span { color: var(--muted); font-size: var(--step--1); }
.perks-contact { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.perks-contact p { margin: 0; color: var(--muted); }
.perks-phone { display: inline-block; margin: 2px 0 12px; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--ink); text-decoration: none; }
.perks-msg { display: flex; flex-wrap: wrap; gap: 8px; }
.perks-msg .msg { background: var(--primary-100); color: var(--primary-900); }
.perks-msg .msg:hover { background: color-mix(in srgb, var(--primary-600) 22%, var(--primary-100)); }
.pdp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 36px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 0 24px; margin: 0; }
.specs dt, .specs dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.specs dt { color: var(--muted); }

/* ---------- Корзина ---------- */
.page-title { font-size: var(--step-3); }
.cart { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 40px; align-items: start; }
.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { border-top: 1px solid var(--line); }
.cart-item-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.cart-sum { font-family: var(--font-display); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines-light { margin: 10px 0 0; color: var(--muted); }
.lines-light li { border-bottom-color: var(--line); }
.cart-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cart-ctrl button { min-width: 40px; height: 40px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.cart-ctrl button:hover { border-color: var(--primary-600); }
.cart-ctrl .cart-remove { margin-left: auto; font-size: var(--step--1); padding: 0 14px; color: var(--muted); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 6px; font-size: var(--step-1); }
.cart-total b { font-family: var(--font-display); font-size: var(--step-2); color: var(--primary-900); font-variant-numeric: tabular-nums; }
.order { position: sticky; top: calc(var(--header-h) + 16px); border: 1px solid var(--line); }
.order h2 { font-size: var(--step-1); }
.order textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); color: var(--ink); width: 100%; resize: vertical; }
.contact-way { border: 0; padding: 0; margin: 10px 0 0; }
.contact-way legend { font-weight: 500; margin-bottom: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cart-empty, .cart-done { max-width: 60ch; }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.calc-form { display: grid; gap: 16px; }
.calc-block { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px 22px; background: var(--surface); }
.calc-block legend { font-family: var(--font-display); font-weight: 600; font-size: 1rem; padding: 0 8px; margin-left: -8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 500; transition: background-color .2s, color .2s; }
.seg input:checked + span { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.range { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 14px 0 18px; }
.range label { font-weight: 500; }
.range output { font-weight: 700; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.range input { grid-column: 1 / -1; width: 100%; accent-color: var(--primary-600); height: 28px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary-600); }
.power { margin: 12px 0 0; padding: 12px 14px; background: var(--primary-100); border-radius: var(--radius-s); color: var(--primary-900); }
.hint { margin: 10px 0 0; font-size: var(--step--1); color: var(--muted); }

.calc-result {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--primary-900); color: #fff; border-radius: var(--radius-m); padding: 26px 24px 24px;
}
.result-label { margin: 0; color: var(--primary-100); }
.total {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
  color: var(--accent); line-height: 1.1; margin: 4px 0 18px; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.lines { list-style: none; padding: 0; margin: 0 0 22px; font-size: var(--step--1); }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-note { margin: 14px 0 0; font-size: var(--step--1); color: rgba(255,255,255,.75); }
/* Прилипшая сумма для телефона: видна, пока листаешь параметры калькулятора */
.calc-peek { display: none; }
.result-note a { color: var(--primary-100); }

/* ---------- Смета (цены на работы) ---------- */
/* Одна колонка шириной с документ — как смета в КП */
.smeta { max-width: 820px; }
.smeta-group + .smeta-group { margin-top: 28px; }
.smeta-group h3 { font-size: 1rem; color: var(--primary-700); padding-bottom: 10px; border-bottom: 2px solid var(--primary-700); margin-bottom: 4px; }
.smeta ul { list-style: none; padding: 0; margin: 0 0 24px; }
.smeta li { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; }
.smeta .name { flex: 0 1 auto; }
.smeta .leader { flex: 1 1 24px; min-width: 24px; border-bottom: 2px dotted color-mix(in srgb, var(--muted) 45%, transparent); transform: translateY(-4px); }
.smeta .sum { flex: none; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.smeta .unit { font-weight: 400; color: var(--muted); margin-left: 4px; }

/* ---------- Наши работы ---------- */
.works-section { background: var(--surface); }
/* Промышленное оборудование */
/* «кондиционирование» — одно длинное слово: на телефоне шрифт уменьшается с шириной экрана, чтобы не вылезать */
.prom-page h1 { font-size: clamp(1.45rem, 6.4vw, 3rem); }
.prom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; margin: 32px 0 56px; }
.prom-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.prom-card h2 { font-size: var(--step-1); margin-bottom: .4em; }
.prom-card > p { color: var(--muted); }
.prom-kw { font-family: var(--font-display); font-weight: 700; color: var(--ink) !important; margin: 4px 0 10px; }
.prom-kw span { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.prom-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.prom-types li { padding: 4px 10px; border-radius: 999px; background: var(--primary-100); color: var(--primary-900); font-size: var(--step--1); }
.prom-card .btn { margin-top: auto; align-self: flex-start; }
.prom-request { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: start; padding: 32px; border-radius: var(--radius-m); background: var(--primary-900); color: #fff; }
.prom-request a { color: #fff; }
.prom-request .callback { color: var(--ink); }
.prom-request .callback a { color: var(--primary-700); }
.callback textarea { width: 100%; }

/* Монтаж на высоте: текст с ценами и четыре вертикальных фото */
.heights-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: center; }
.heights-text p { max-width: 34em; }
.heights-prices { list-style: none; padding: 0; margin: 20px 0 12px; }
.heights-prices li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.heights-prices b { font-family: var(--font-display); white-space: nowrap; }
.heights-photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.heights-photos li:nth-child(even) { margin-top: 32px; }
.height-shot { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; cursor: zoom-in; background: var(--line); aspect-ratio: 3 / 4; }
.height-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.height-shot:hover img { transform: scale(1.04); }
.works { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
/* Фото с альпинистом — самое характерное, делаем его крупным */
.works li:nth-child(3) { grid-column: span 2; grid-row: span 2; }
.work { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; cursor: zoom-in; background: var(--line); aspect-ratio: 1; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.work:hover img { transform: scale(1.04); }

.viewer { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.viewer::backdrop { background: rgba(4, 25, 24, .92); }
.viewer img { width: auto; height: auto; max-width: min(92vw, 1280px); max-height: 88vh; margin: 6vh auto 0; border-radius: var(--radius-s); }
.viewer button { position: fixed; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.viewer button:hover { background: rgba(255,255,255,.24); }
.viewer-close { top: 16px; right: 16px; }
.viewer-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Как всё проходит: настоящая последовательность, поэтому номера ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--font-display); font-weight: 700; font-size: 3rem; line-height: 1;
  color: var(--primary-600); margin-bottom: 14px;
}
.steps b { display: block; font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; }
.steps span { color: var(--muted); }

/* ---------- Контакты ---------- */
.contacts-section { background: var(--primary-900); color: #fff; }
.contacts-section a { color: var(--primary-100); }
.contacts { display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: 48px; align-items: start; }
.contact-phone { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); margin-bottom: .4em; }
.contact-phone a { color: #fff; text-decoration: none; }
.contact-msg, .footer-msg { display: flex; flex-wrap: wrap; gap: 10px; }
.msg { display: inline-block; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; background: rgba(255,255,255,.1); }
.callback { background: var(--surface); color: var(--ink); border-radius: var(--radius-m); padding: 26px; display: grid; gap: 6px; }
.callback h3 { margin-bottom: .5em; }
.callback label:not(.check) { font-weight: 500; margin-top: 8px; }
.callback input:not([type=checkbox]) {
  font: inherit; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); color: var(--ink); width: 100%;
}
.callback input:focus-visible { outline-offset: 0; }
.callback .consent { font-size: var(--step--1); margin: 12px 0 10px; }
.callback .consent a { color: var(--primary-700); }
.form-msg { margin: 8px 0 0; font-size: var(--step--1); min-height: 1.4em; }

/* ---------- Подвал ---------- */
.site-footer { background: #072b29; color: rgba(255,255,255,.78); padding: 48px 0 40px; font-size: var(--step--1); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #fff; }
.footer-legal p { margin-bottom: .6em; }

/* ---------- Мобильная панель ---------- */
.mobile-bar { display: none; }

/* Текст только для программ чтения с экрана (например, заголовок для порядка h1 → h2 → h3) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Появление при прокрутке ---------- */
/* Прячем только когда JS загрузился (класс .js на <html>), иначе контент без JS остался бы невидимым */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

.flyer { position: fixed; z-index: 100; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); pointer-events: none; }

/* ---------- Планшеты и телефоны ---------- */
@media (max-width: 1000px) {
  .nav, .header-phone { display: none; }
  .burger { display: block; }
  .cart-link { margin-left: auto; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0; position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; margin: 0;
  }
  .nav.open a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .calc { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .calc-peek {
    display: flex; justify-content: space-between; align-items: baseline; position: sticky; bottom: 12px; z-index: 5;
    background: var(--primary-900); color: #fff; text-decoration: none; padding: 14px 18px; border-radius: var(--radius-m);
    box-shadow: 0 8px 24px rgba(11, 61, 58, .3);
  }
  .calc-peek b { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); font-variant-numeric: tabular-nums; }
  .facts-list, .steps { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(3, 1fr); }
  .heights-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .prom-request { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; gap: 20px; }
  .contacts { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .cart { grid-template-columns: 1fr; }
  .order { position: static; }
  .filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .filters fieldset:nth-of-type(3), .filters button { grid-column: 1 / -1; }
  .pdp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "info" "perks"; gap: 24px; }
  /* На главной популярные модели листаются вбок, чтобы не растягивать страницу */
  .products-row { grid-auto-flow: column; grid-auto-columns: minmax(230px, 70%); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .products-row .product { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  body { padding-bottom: 68px; }
  .calc-peek { bottom: 80px; }
  .hero-inner { padding-block: 96px 40px; }
  .hero-actions .btn { width: 100%; }
  .facts-list { grid-template-columns: 1fr; gap: 18px; }
  .steps { grid-template-columns: 1fr; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .heights-photos { grid-template-columns: repeat(2, 1fr); }
  .heights-photos li:nth-child(even) { margin-top: 0; }
  .smeta li { flex-wrap: wrap; }
  .smeta .leader { display: none; }
  .smeta .sum { margin-left: auto; }
  .mobile-bar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-bar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 500; }
  .mobile-bar svg { width: 24px; height: 24px; fill: none; stroke: var(--primary-700); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bar .cart-count { position: absolute; top: 0; left: calc(50% + 6px); }
}

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