/* =====================================================================
   NANOCOMB — дизайн-система нового сайта
   Оконный сервис под ключ в Алматы: нанофильтры, ролл-шторы, ремонт окон
   Чистый CSS, без сборки. Все цвета — через переменные.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Бренд: фирменный зелёный с логотипа Nanocomb (#188c44) + тёплый акцент CTA */
  --brand:        #188c44;
  --brand-600:    #147438;
  --brand-700:    #0f5b2c;
  --brand-050:    #edf7f1;
  --brand-100:    #cfe8da;

  --accent:       #ff6b35;   /* оранжевый — кнопки действия */
  --accent-600:   #ec5a26;

  --ink:          #0f1f19;   /* основной текст / тёмный фон */
  --ink-700:      #2a3f36;
  --muted:        #5f6f67;
  --line:         #e4eae6;

  --bg:           #ffffff;
  --bg-soft:      #f5f8f6;
  --bg-tint:      #eef5f0;

  --ok:           #16a34a;
  --warn:         #f59e0b;

  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    24px;
  --shadow-sm:    0 1px 2px rgba(15,31,25,.06), 0 2px 8px rgba(15,31,25,.05);
  --shadow:       0 8px 24px rgba(15,31,25,.10);
  --shadow-lg:    0 24px 60px rgba(15,31,25,.16);

  --container:    1180px;
  --gap:          clamp(16px, 3vw, 32px);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; }
ul { list-style: none; padding: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section--ink { background: var(--ink); color: #e7efe9; }

.section-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head.left { text-align: left; margin-inline: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-050);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.section--ink .eyebrow { color: #6fdc9b; background: rgba(24,140,68,.20); }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }
.section--ink .lead { color: #a9bdb1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; cursor: pointer; line-height: 1;
}
.btn svg { width: 20px; height: 20px; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255,107,53,.32); }
.btn-accent:hover { background: var(--accent-600); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255,107,53,.4); }
.btn-brand { background: var(--brand-600); color: #fff; box-shadow: 0 8px 20px rgba(24,140,68,.3); }
.btn-brand:hover { background: var(--brand-700); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-600); transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-lg { padding: 17px 34px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* Полупрозрачная, чтобы при прокрутке не выделялась плашкой (просьба клиента).
     Прозрачнее нельзя: текст меню перестаёт читаться поверх фотографий. */
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; color: var(--ink); }
.logo .logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  display: grid; place-items: center; color: #fff; flex: none;
}
.logo b { color: var(--brand-600); }
/* фирменный логотип-картинка (значок над надписью — нужна высота, чтобы читалось) */
.logo { flex: none; }
.logo-img { display: block; height: 54px; width: auto; flex: none; object-fit: contain; }
@media (max-width: 560px) { .logo-img { height: 42px; } }

.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
/* CTA внутри выпадающего меню — только на мобильном */
.nav-cta { display: none; }
.main-nav > ul > li > a,
.main-nav > ul > li > button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: .98rem; color: var(--ink-700);
  transition: background .15s, color .15s;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > button:hover { background: var(--bg-soft); color: var(--brand-600); }
.main-nav .caret { width: 16px; height: 16px; transition: transform .2s; }

.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .18s ease; z-index: 60;
}
.submenu.wide { min-width: 460px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.has-sub:hover .caret { transform: rotate(180deg); }
.submenu a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  font-weight: 600; font-size: .95rem; color: var(--ink-700); transition: background .12s, color .12s;
}
.submenu a:hover { background: var(--brand-050); color: var(--brand-700); }
.submenu a small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
.submenu .ic { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--brand-050); color: var(--brand-600); display: grid; place-items: center; }
.submenu .ic svg { width: 18px; height: 18px; }

.header-cta { display: flex; align-items: center; gap: 14px; }
/* Переключатель языка Ru / Kz */
.lang-switch { display: inline-flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex: none; }
.lang-switch > * { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 9px; border-radius: 999px; font-weight: 700; font-size: .85rem; line-height: 1; transition: background .15s, color .15s; }
.lang-switch .lang-cur { background: var(--brand); color: #fff; }
.lang-switch a { color: var(--muted); }
.lang-switch a:hover { color: var(--brand-700); background: var(--brand-050); }
.header-cta .phone { font-weight: 800; color: var(--ink); white-space: nowrap; font-size: 1.02rem; }
.header-cta .phone:hover { color: var(--brand-600); }

.burger { display: none; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); position: relative; transition: .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--ink); transition: .2s; }
.burger span::before { top: -7px; } .burger span::after { top: 7px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(8,22,15,.94) 0%, rgba(8,22,15,.86) 38%, rgba(8,24,17,.62) 62%, rgba(8,24,17,.42) 100%),
    radial-gradient(900px 520px at 78% -10%, rgba(24,140,68,.4), transparent 62%);
}
.hero-inner { z-index: 2; }
/* padding-block, а не шорткат: padding: X 0 обнулял боковые отступы .container,
   и на телефоне текст хиро прижимался к краю экрана («края обрезаются»). */
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px,5vw,64px); align-items: center; padding-block: clamp(56px,8vw,104px); }
.hero h1 { color: #fff; }
.hero .lead { color: #c4d5c9; margin-top: 20px; max-width: 560px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: #dcebe0; }
.hero-badge svg { width: 16px; height: 16px; color: #6fdc9b; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); padding: clamp(22px,3vw,32px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}
.hero-card h3 { color: #fff; font-size: 1.25rem; }
.hero-card .form-note { color: #a3b5a8; font-size: .85rem; margin-top: 4px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.stat { background: #fff; padding: 28px 22px; text-align: center; }
.stat .num { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; color: var(--brand-600); letter-spacing: -.03em; }
.stat .lbl { color: var(--muted); font-weight: 600; font-size: .95rem; margin-top: 4px; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.card .ic-badge { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-050); color: var(--brand-600); display: grid; place-items: center; margin-bottom: 18px; }
.card .ic-badge svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }

/* Product card */
.product-card { padding: 0; overflow: hidden; }
.product-card .pc-media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--brand-050), var(--bg-tint)); position: relative; display: grid; place-items: center; overflow: hidden; }
.product-card .pc-media svg { width: 64px; height: 64px; color: var(--brand); opacity: .85; }
/* Изображение позиционируем абсолютно: иначе картинка «распирает» контейнер
   с aspect-ratio (цикл: высота контейнера ← контент ← height:100%). */
.product-card .pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .pc-media img { transform: scale(1.05); }

/* Карточка услуги с фотографией */
.photo-card { padding: 0; overflow: hidden; }
.photo-card .pc-media { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-tint); position: relative; }
.photo-card .pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.photo-card:hover .pc-media img { transform: scale(1.05); }
.photo-card .pc-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.photo-card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.photo-card p { color: var(--muted); font-size: .94rem; flex: 1; }
.photo-card .more { margin-top: 16px; font-weight: 700; color: var(--brand-600); font-size: .95rem; }
.product-card .pc-tag { position: absolute; top: 14px; left: 14px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; letter-spacing: .03em; }
.product-card .pc-tag.hot { background: var(--accent); }
.product-card .pc-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 1.15rem; }
.product-card .pc-desc { color: var(--muted); font-size: .93rem; margin: 6px 0 16px; flex: 1; }
.product-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.price { font-weight: 800; color: var(--ink); font-size: 1.15rem; white-space: nowrap; }
.price small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.price .from { color: var(--muted); font-weight: 600; font-size: .82rem; }

/* Feature list */
.feature-list { display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list .check { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-050); color: var(--brand-600); display: grid; place-items: center; margin-top: 2px; }
.feature-list .check svg { width: 14px; height: 14px; }
.feature-list b { display: block; }
.feature-list span.muted { color: var(--muted); font-size: .95rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: var(--gap); grid-template-columns: repeat(4,1fr); }
.step { position: relative; padding-top: 8px; }
.step .step-num { counter-increment: step; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg,var(--brand),var(--brand-700)); color:#fff; font-weight:800; font-size:1.3rem; display:grid; place-items:center; margin-bottom: 16px; }
/* иконка шага с оригинального сайта */
.step .step-ic { width: 88px; height: 88px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 16px; box-shadow: var(--shadow-sm); position: relative; }
.step .step-ic img { width: 46px; height: 46px; object-fit: contain; }
.step .step-ic .step-badge { position: absolute; top: -10px; left: -10px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .96rem; }

/* ---------- Two-column feature blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,64px); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media {
  border-radius: var(--radius-lg); aspect-ratio: 4/3; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-050), var(--bg-tint));
  display: grid; place-items: center; box-shadow: var(--shadow); position: relative;
}
.split-media svg { width: 96px; height: 96px; color: var(--brand); opacity: .8; }
.split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-media .ph-note { position: absolute; bottom: 14px; left: 14px; right: 14px; text-align: center; color: var(--brand-700); font-weight: 600; font-size: .8rem; opacity: .7; }

/* ---------- Calculator ---------- */
.calc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: clamp(22px,3vw,34px); max-width: 520px;
}
.calc h3 { margin-bottom: 6px; }
.calc .sub { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink-700); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft); transition: border-color .15s, background .15s; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--brand-050); margin: 22px 0; }
.calc-total .calc-total-lbl { font-weight: 700; }
.calc-total .calc-total-val { font-size: 1.8rem; font-weight: 800; color: var(--brand-700); }
.calc-note { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Promo banner ---------- */
.promo {
  background: linear-gradient(120deg, var(--accent), #ff944d);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(28px,4vw,48px);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.promo::after { content: "%"; position: absolute; right: -10px; bottom: -50px; font-size: 16rem; font-weight: 900; opacity: .12; line-height: 1; }
/* вариант акции с фотографией */
.promo.has-photo { grid-template-columns: 1.1fr .9fr; align-items: center; }
.promo.has-photo::after { display: none; }
.promo .promo-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/10; position: relative; }
.promo .promo-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo .promo-badge { position: absolute; top: 14px; right: 14px; background: #fff; color: var(--accent-600); font-weight: 800; font-size: 1.3rem; padding: 8px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.promo .promo-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.promo h2 { color: #fff; margin-bottom: 8px; }
.promo p { color: rgba(255,255,255,.92); max-width: 620px; }
.promo .btn-ghost { background: #fff; }

/* ---------- Trust / advantages ---------- */
.adv { display: flex; gap: 16px; align-items: flex-start; }
.adv .adv-ic { flex: none; width: 56px; height: 56px; border-radius: 16px; background: rgba(24,140,68,.20); color: #6fdc9b; display: grid; place-items: center; }
.section:not(.section--ink) .adv .adv-ic { background: var(--brand-050); color: var(--brand-600); }
.adv .adv-ic svg { width: 28px; height: 28px; }
.adv h3 { font-size: 1.1rem; margin-bottom: 4px; }
.adv p { color: var(--muted); font-size: .95rem; }
.section--ink .adv p { color: #a9bdb1; }

/* ---------- Price table ---------- */
.price-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.price-table th, .price-table td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.price-table th { background: var(--bg-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.price-table tr:last-child td { border-bottom: none; }
.price-table td:last-child { text-align: right; font-weight: 800; color: var(--brand-700); white-space: nowrap; }
.price-table tbody tr:hover { background: var(--brand-050); }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; font-weight: 700; text-align: left; }
.faq-q .pm { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-050); color: var(--brand-600); display: grid; place-items: center; transition: transform .2s; }
.faq-item.open .faq-q .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a-inner { padding: 0 24px 22px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: clamp(36px,5vw,64px); text-align: center; }
.cta-band::before { content:""; position:absolute; inset:0; background: radial-gradient(700px 360px at 50% -20%, rgba(24,140,68,.5), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #a9bdb1; max-width: 560px; margin: 0 auto 28px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1810; color: #a3b5a8; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: 0; }
.site-footer a { color: #a3b5a8; transition: color .15s; }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 10px; font-size: .95rem; }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 300px; }
.footer-contacts { display: grid; gap: 12px; font-size: .95rem; }
.footer-contacts .fc { display: flex; gap: 10px; align-items: flex-start; }
.footer-contacts svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 3px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.07); display: grid; place-items: center; color: #ccdbd1; transition: background .15s, transform .15s; }
.socials a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; color: #74887b; }

/* ---------- Floating contact buttons ---------- */
.float-contacts { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; gap: 12px; }
.float-contacts a { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-lg); transition: transform .15s; }
.float-contacts a:hover { transform: scale(1.08); }
.float-contacts .wa { background: #25d366; }
.float-contacts .ph { background: var(--brand); }
.float-contacts svg { width: 28px; height: 28px; }

/* Нижняя панель действий — только для телефона. Базово скрыта: без этого
   правила на десктопе у неё нет никаких стилей, и она вываливается в конец
   страницы двумя ссылками с растянутой во всю ширину иконкой.
   Показывается в медиазапросе ≤860px. */
.mobile-bar { display: none; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,18,30,.6); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); max-width: 460px; width: 100%; padding: clamp(26px,4vw,40px); box-shadow: var(--shadow-lg); position: relative; animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal h3 { margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }

/* ---------- Breadcrumbs / page hero ---------- */
.page-hero { background: var(--bg-tint); border-bottom: 1px solid var(--line); padding: clamp(28px,4vw,52px) 0; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand-600); }
.crumbs span { color: var(--ink); font-weight: 600; }

/* product hero layout */
.prod-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,56px); align-items: center; }
.prod-hero .ph-media { border-radius: var(--radius-lg); aspect-ratio: 1/1; background: linear-gradient(135deg, var(--brand-050), var(--bg-tint)); display: grid; place-items: center; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.prod-hero .ph-media svg { width: 120px; height: 120px; color: var(--brand); opacity: .82; }
/* фирменный баннер продукта показываем целиком, без обрезки */
.prod-hero .ph-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #16a34a; }
.prod-hero .ph-media.cover img { object-fit: cover; }
.prod-hero .ph-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-050); color: var(--brand-700); font-weight: 700; font-size: .85rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.prod-hero .ph-price { font-size: 1.5rem; font-weight: 800; margin: 18px 0; }
.prod-hero .ph-price .from { color: var(--muted); font-size: .95rem; font-weight: 600; }
.prod-hero .ph-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* tag chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .9rem; color: var(--ink-700); }
.chip.brand { background: var(--brand-050); border-color: var(--brand-100); color: var(--brand-700); }
/* География: строка городов мельче строки стран, ниже — карта клиента (если загружена) */
.geo-cities { margin-top: 12px; }
.geo-cities .chip { font-size: .82rem; padding: 6px 13px; font-weight: 600; color: var(--muted); }
.geo-map { margin-top: 28px; text-align: center; }
.geo-map img { width: 100%; max-width: 620px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { max-width: 460px; }
  .split, .prod-hero { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .header-cta .phone { display: none; }
  .lang-switch { order: -1; }

  /* Нижняя панель действий. На телефоне липкая шапка вела в никуда: телефон и
     кнопка замера из неё скрыты, оставались два безымянных кружка в углу.
     Здесь главное действие сайта всегда на виду и подписано. */
  .float-contacts { display: none; }
  .mobile-bar {
    display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; border-radius: 14px; font-weight: 700; font-size: 1rem;
    color: #fff; line-height: 1;
  }
  .mobile-bar .mb-measure { background: var(--accent); }
  .mobile-bar .mb-wa { background: #25d366; }
  .mobile-bar a:active { transform: scale(.98); }
  .mobile-bar svg { width: 20px; height: 20px; flex: none; }
  /* чтобы панель не закрывала последний блок и подвал */
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .burger { display: flex; }
  .stats { grid-template-columns: repeat(2,1fr); }
  /* Услуги на главной — компактные кнопки-ссылки (просьба клиента 18.08.2026):
     фотокарточки на телефоне растягивали блок на три экрана. */
  .services-grid { grid-template-columns: 1fr; gap: 10px; }
  .services-grid .photo-card .pc-media { display: none; }
  .services-grid .photo-card .pc-body { flex-direction: row; align-items: center; gap: 12px; padding: 16px 18px; }
  .services-grid .photo-card .pc-body p { display: none; }
  .services-grid .photo-card h3 { margin: 0; flex: 1; font-size: 1.02rem; }
  .services-grid .photo-card .more { margin: 0; white-space: nowrap; }
  .promo, .promo.has-photo { grid-template-columns: 1fr; }
  .hero-bg { object-position: 62% center; }
  /* Mobile nav drawer */
  .main-nav.open {
    display: block; position: fixed; inset: 72px 0 0; background: #fff; z-index: 49;
    overflow-y: auto; padding: 20px; border-top: 1px solid var(--line);
  }
  .main-nav.open > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  /* Подменю свёрнуты: раскрытые сразу 8 фильтров и 3 услуги давали 1147 px
     содержимого в окне 812 px, и кнопки действий уезжали за пределы экрана. */
  .main-nav.open .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; padding: 4px 0 8px 14px; min-width: 0;
    display: none;
  }
  .main-nav.open .has-sub.expanded .submenu { display: block; }
  .main-nav.open .submenu.wide { grid-template-columns: 1fr; }
  .main-nav.open .has-sub.expanded > button .caret { transform: rotate(180deg); }
  .main-nav.open > ul > li > a, .main-nav.open > ul > li > button { font-size: 1.1rem; padding: 14px 12px; justify-content: space-between; width: 100%; }
  .main-nav.open > ul { display: flex; flex-direction: column; }
  /* Оба пункта с действиями поднимаем над списком разделов. Порядок между
     собой сохраняется исходный: сначала замер, потом телефон.
     (:nth-of-type здесь не годится — он считает по тегу li, а не по классу.) */
  .main-nav.open .nav-cta { display: block; order: -1; margin-bottom: 10px; }
  .main-nav.open .nav-cta:last-child { margin-bottom: 18px;
    padding-bottom: 18px; border-bottom: 1px solid var(--line); }
  .main-nav.open .nav-cta > a { justify-content: center; font-size: 1rem; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  /* В узкой шапке кнопка не помещается рядом с переключателем языка и бургером.
     CTA остаётся в меню, плавающих кнопках и форме на первом экране. */
  .header-cta .btn { display: none; }
  .header-inner { gap: 12px; }
  .lang-switch > * { min-width: 30px; padding: 0 7px; }
  .grid-2, .grid-3, .grid-4, .field-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
}

/* ---------- Текстовые страницы (политика конфиденциальности) ---------- */
.legal { max-width: 820px; }
.legal h1 { margin-top: 12px; }
.legal .updated { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.legal .lead { margin-top: 18px; }
.legal h2 { font-size: 1.3rem; margin-top: 36px; }
.legal p { margin-top: 12px; color: var(--ink-700); }
.legal ul { margin-top: 12px; list-style: none; padding: 0; }
.legal li { padding: 5px 0; color: var(--ink-700); font-weight: 600; }
/* строка согласия под формами — ссылка на политику, но не кричащая */
.agree-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.agree-link:hover { color: var(--brand-700); }
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: #fff; }

/* utils */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.mb-2 { margin-bottom: 24px; }
.maxw-720 { max-width: 720px; }
.hidden { display: none !important; }

/* ---------- Каталог товаров (фурнитура) ---------- */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: clamp(24px, 4vw, 36px); }
.cat-btn { cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cat-btn:hover { border-color: var(--brand); color: var(--brand-700); }
.cat-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.tovar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.tovar:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.tovar-img { aspect-ratio: 1/1; background: var(--bg-soft); position: relative; }
.tovar-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.tovar-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tovar-body h3 { font-size: .92rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.tovar-ask { align-self: flex-start; margin-top: auto; }
.tovar.hide { display: none; }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .tovar-body h3 { font-size: .85rem; } }

/* ---------- Запасной путь, если WhatsApp не открылся ---------- */
/* Показывается вместо галочки «отправлено»: раньше человек видел успех даже
   тогда, когда сообщение никуда не ушло. Данные формы при этом сохраняются. */
.form-fallback {
  margin-top: 12px; padding: 12px 14px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-sm);
  font-size: .9rem; color: #9a3412; text-align: center;
}
.form-fallback .fb-note { display: block; margin-bottom: 8px; }
.form-fallback a {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; font-weight: 700;
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
}
.form-fallback a:hover { filter: brightness(.95); }
.hero-card .form-fallback, .modal .form-fallback { background: #fff7ed; }

/* ---------- Каталог: поиск и липкий фильтр ---------- */
/* 67 товаров дают страницу в 20 экранов телефона. Полоса категорий раньше
   стояла в середине и уезжала — чтобы сменить категорию, надо было листать
   десяток экранов назад. Теперь она липнет под шапкой и всегда под рукой. */
.cat-tools {
  position: sticky; top: 72px; z-index: 30;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 12px 0; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.cat-search {
  width: 100%; max-width: 420px; margin: 0 auto 12px; display: block;
  padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--bg-soft); font-size: .95rem;
}
.cat-search:focus { outline: none; border-color: var(--brand); background: #fff; }
.cat-count { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 10px; }
.cat-empty { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 860px) {
  /* одна строка с горизонтальной прокруткой вместо шести рядов кнопок:
     возвращает около 200 px первого экрана */
  .cat-tools { top: 64px; padding: 10px 0; }
  .cat-filter {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    margin: 0 -20px; padding: 0 20px 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cat-filter::-webkit-scrollbar { display: none; }
  .cat-btn { flex: none; }
  .cat-search { margin-bottom: 10px; }
  .cat-count { margin-top: 8px; }
}

/* ---------- Быстрые переходы и кнопка «наверх» ---------- */
/* Калькулятор на странице фильтра начинается на третьем экране телефона —
   цену хотят увидеть до звонка, поэтому даём прямые переходы к блокам. */
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.jump-links a {
  font-size: .88rem; font-weight: 600; color: var(--brand-700);
  background: var(--brand-050); border: 1px solid var(--brand-100);
  padding: 7px 14px; border-radius: 999px;
}
.jump-links a:hover { background: var(--brand-100); }

.to-top {
  position: fixed; right: 18px; bottom: 96px; z-index: 44;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink-700);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 22px; height: 22px; }
@media (min-width: 861px) { .to-top { bottom: 150px; } }

/* якорь не должен уезжать под липкую шапку */
[id] { scroll-margin-top: 84px; }

/* ---------- Защита от «распирания» сеток ----------
   У элементов grid минимальная ширина по умолчанию равна min-content: одно
   длинное слово или неразрывный блок растягивает колонку шире контейнера,
   и на телефоне появляется горизонтальная прокрутка. */
.split > *, .grid > *, .prod-hero > *, .steps > *, .cat-grid > * { min-width: 0; }
.lead, .feature-list b, .feature-list span, .card p, .tovar-body h3 { overflow-wrap: anywhere; }

/* ---------- Отзывы из 2ГИС ---------- */
/* Сайт до этого держался только на заявлениях компании о себе. Здесь —
   проверяемое доказательство: рейтинг, подтверждённая карточка и ссылка
   на первоисточник, где отзывов больше сотни. */
.rating-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  justify-content: center; margin-bottom: clamp(24px, 4vw, 36px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 22px;
}
.rating-score { display: flex; align-items: baseline; gap: 10px; }
.rating-score b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.rating-score .stars { color: #f5a623; letter-spacing: 2px; font-size: 1.05rem; }
.rating-score small { color: var(--muted); font-size: .88rem; }
.rating-verified {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-050); color: var(--brand-700);
  font-size: .84rem; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}

.review {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.review-top { display: flex; align-items: center; gap: 11px; }
.review-ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--brand-050); color: var(--brand-700);
  display: grid; place-items: center; font-weight: 800; font-size: 1rem;
}
.review-who { display: flex; flex-direction: column; line-height: 1.25; }
.review-who small { color: var(--muted); font-size: .8rem; }
.review blockquote { margin: 0; font-size: .96rem; color: var(--ink-700); }
.review figcaption {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--brand-700); font-weight: 600;
}
.review-source { text-align: center; margin-top: 22px; font-size: .86rem; color: var(--muted); }
.review-source a { color: var(--brand-600); text-decoration: underline; }

@media (max-width: 560px) {
  .rating-bar { gap: 12px; padding: 14px 16px; }
  .rating-score b { font-size: 1.7rem; }
}
