/* ============================================================
   RIGMED — design system
   Warm, human, trustworthy. Built for лаборатории Волгограда.
   Theming via [data-accent] and [data-type] on <html>.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300..800&family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=Manrope:wght@400..800&family=Golos+Text:wght@400..700&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* offset anchored sections below the sticky header */
:where(section, [id]) { scroll-margin-top: 92px; }
body { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Tokens ---------- */
:root {
  /* warm neutrals (shared across themes) */
  --paper:      #FAF7F1;
  --paper-2:    #F3EDE3;
  --surface:    #FFFFFF;
  --surface-2:  #F6F1E9;
  --ink:        #1B2A30;
  --ink-soft:   #46565E;
  --ink-mute:   #7B8A90;
  --line:       #E9E0D2;
  --line-soft:  #F0E9DD;
  --line-strong:#D8CDBA;

  /* default accent — Тёплая бирюза */
  --brand:      #0F7C8B;
  --brand-deep: #0A5A66;
  --brand-ink:  #0A4751;
  --brand-soft: #E2F0F1;
  --brand-tint: #F1F8F8;
  --warm:       #E4694B;
  --warm-deep:  #C8543A;
  --warm-soft:  #FCEAE3;

  /* status */
  --ok:         #2E9E6B;
  --ok-soft:    #E4F3EB;

  /* type */
  --font-head: 'Onest', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, sans-serif;
  --head-weight: 700;
  --head-spacing: -0.02em;

  /* shape & depth */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(27,42,48,.05), 0 2px 6px rgba(27,42,48,.05);
  --shadow-md: 0 4px 14px rgba(27,42,48,.07), 0 12px 30px rgba(27,42,48,.06);
  --shadow-lg: 0 10px 30px rgba(27,42,48,.09), 0 30px 60px rgba(27,42,48,.10);
  --shadow-brand: 0 10px 28px rgba(15,124,139,.28);

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

/* ---- Accent: Клинический синий ---- */
[data-accent="blue"] {
  --brand:      #1C6CB6;
  --brand-deep: #134F88;
  --brand-ink:  #103F6D;
  --brand-soft: #E5EFF9;
  --brand-tint: #F2F7FC;
  --warm:       #E08A3C;
  --warm-deep:  #C5712A;
  --warm-soft:  #FBEEDB;
  --shadow-brand: 0 10px 28px rgba(28,108,182,.28);
}

/* ---- Accent: Тёплый зелёный ---- */
[data-accent="green"] {
  --brand:      #2E7D63;
  --brand-deep: #205A47;
  --brand-ink:  #1B4A3B;
  --brand-soft: #E4F0EA;
  --brand-tint: #F1F8F4;
  --warm:       #E08A3C;
  --warm-deep:  #C5712A;
  --warm-soft:  #FBEEDB;
  --shadow-brand: 0 10px 28px rgba(46,125,99,.28);
}

/* ---- Type pairing: Редакционная (serif headings) ---- */
[data-type="editorial"] {
  --font-head: 'Spectral', Georgia, serif;
  --head-weight: 600;
  --head-spacing: -0.01em;
}
/* ---- Type pairing: Геометрическая ---- */
[data-type="geometric"] {
  --font-head: 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --head-weight: 800;
  --head-spacing: -0.03em;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-spacing);
  line-height: 1.08;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
p { text-wrap: pretty; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap-wide { max-width: 1340px; margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(56px, 8vw, 120px); }
.section-sm { padding-block: clamp(40px, 5vw, 72px); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--brand);
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-soft); line-height: 1.65; }
.muted { color: var(--ink-mute); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-warm { background: var(--warm); color: #fff; box-shadow: 0 10px 24px rgba(228,105,75,.28); }
.btn-warm:hover { background: var(--warm-deep); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { background: var(--brand); color: #fff; }
.btn-lg { padding: 18px 32px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn svg { width: 19px; height: 19px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

/* ---------- Badges / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-ink);
}
.chip-warm { background: var(--warm-soft); color: var(--warm-deep); }
.chip-line { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-soft); }
.chip svg { width: 15px; height: 15px; }

.tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand-logo { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 800; font-size: 1.32rem; letter-spacing: -.03em; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-brand);
}
.logo-mark svg { width: 23px; height: 23px; }
.brand-logo b { color: var(--brand); }
.brand-logo .sub { display:block; font-family: var(--font-body); font-weight: 500; font-size: .64rem; letter-spacing: .14em; color: var(--ink-mute); text-transform: uppercase; margin-top: 1px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.nav a { padding: 9px 14px; border-radius: var(--r-pill); font-weight: 500; font-size: .96rem; color: var(--ink-soft); transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.phone-link { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.phone-link .num { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; white-space: nowrap; }
.phone-link .lbl { font-size: .72rem; color: var(--ink-mute); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); transition: .18s; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 21px; height: 21px; }
.burger { display: none; }

/* ---------- Floating messengers ---------- */
.msg-dock { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; gap: 12px; }
.msg-fab {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow-md); transition: transform .18s; position: relative;
}
.msg-fab:hover { transform: scale(1.08); }
.msg-fab svg { width: 28px; height: 28px; }
.msg-fab.wa { background: #25D366; }
.msg-fab.tg { background: #2AABEE; }
.msg-fab.call { background: var(--brand); }
.msg-fab .pulse { position: absolute; inset: 0; border-radius: 50%; animation: pulse 2.4s infinite; }
.msg-fab.wa .pulse { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0);} }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 6vw, 88px); }
.hero h1 span.hl { color: var(--brand); }
.hero .lead { margin-top: 22px; max-width: 33ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 30px; }
.hero-media { position: relative; }
.hero-media .ph { width: 100%; aspect-ratio: 4/4.4; }
.hero-blob { position: absolute; inset: -8% -6% auto auto; width: 70%; aspect-ratio: 1; background: radial-gradient(circle at 30% 30%, var(--brand-soft), transparent 70%); filter: blur(10px); z-index: -1; }
.hero-float {
  position: absolute; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.hero-float .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.hero-float .ic svg { width: 22px; height: 22px; }
.hero-float .ttl { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; line-height: 1.1; }
.hero-float .cap { display: block; font-size: .78rem; color: var(--ink-mute); margin-top: 2px; }
.hero-float.f1 { left: -28px; top: 16%; }
.hero-float.f2 { right: -22px; bottom: 14%; }

/* ---------- Trust strip / stats ---------- */
.stat-band { background: var(--brand-ink); color: #fff; border-radius: var(--r-xl); padding: clamp(28px,4vw,46px) clamp(24px,4vw,52px); box-shadow: var(--shadow-lg); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat .n { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.03em; }
.stat .n b { color: #fff; }
.stat .l { color: rgba(255,255,255,.72); font-size: .96rem; margin-top: 8px; }
.stat-divide { border-left: 1px solid rgba(255,255,255,.16); }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { padding: 26px; display: flex; flex-direction: column; gap: 16px; min-height: 280px; position: relative; overflow: hidden; }
.cat-icon { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); }
.cat-icon svg { width: 30px; height: 30px; }
.cat-card h3 { margin-top: 4px; }
.cat-card .desc { color: var(--ink-soft); font-size: .96rem; flex: 1; }
.cat-card .more { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--brand-deep); font-size: .95rem; }
.cat-card .more svg { width: 17px; height: 17px; transition: transform .2s; }
.cat-card:hover .more svg { transform: translateX(4px); }
.cat-count { position: absolute; top: 22px; right: 22px; font-size: .8rem; font-weight: 600; color: var(--ink-mute); }

/* ---------- Section headings ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head p { margin-top: 14px; }

/* ---------- Quiz ---------- */
.quiz-shell { background: linear-gradient(155deg, var(--brand-ink), var(--brand-deep)); border-radius: var(--r-xl); overflow: hidden; color: #fff; box-shadow: var(--shadow-lg); }
.quiz-grid { display: grid; grid-template-columns: .82fr 1.18fr; }
.quiz-aside { padding: clamp(32px,4vw,52px); position: relative; }
.quiz-aside h2 { color: #fff; }
.quiz-aside .lead { color: rgba(255,255,255,.8); margin-top: 16px; }
.quiz-aside .pts { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.quiz-aside .pts li { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; color: rgba(255,255,255,.88); }
.quiz-aside .pts svg { width: 22px; height: 22px; flex: none; color: #fff; margin-top: 1px; }
.quiz-main { background: var(--surface); color: var(--ink); padding: clamp(28px,3.5vw,44px); position: relative; }
.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.quiz-progress .bar { flex: 1; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.quiz-progress .bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s ease; }
.quiz-progress .step-n { font-size: .85rem; font-weight: 600; color: var(--ink-mute); }
.quiz-q { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.5rem; letter-spacing: var(--head-spacing); margin-bottom: 20px; }
.quiz-opts { display: grid; gap: 12px; }
.quiz-opts.cols2 { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); transition: .15s; text-align: left;
}
.opt:hover { border-color: var(--brand); background: var(--brand-tint); }
.opt.sel { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.opt .o-ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); flex: none; }
.opt .o-ic svg { width: 24px; height: 24px; }
.opt .o-t { font-weight: 600; }
.opt .o-c { font-size: .85rem; color: var(--ink-mute); }
.opt .o-check { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.opt.sel .o-check { border-color: var(--brand); background: var(--brand); color: #fff; }
.opt.sel .o-check svg { width: 14px; height: 14px; }
.opt:not(.sel) .o-check svg { display: none; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.quiz-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.quiz-field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.quiz-field input {
  padding: 14px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong);
  background: var(--surface); font: inherit; color: var(--ink); transition: border-color .15s;
}
.quiz-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.quiz-result { text-align: center; padding: 12px 0; }
.quiz-result .rico { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 18px; }
.quiz-result .rico svg { width: 38px; height: 38px; }
.match-card { text-align: left; border: 1.5px solid var(--brand); background: var(--brand-tint); border-radius: var(--r-md); padding: 18px; display: flex; gap: 16px; align-items: center; margin: 18px 0; }
.match-card .ph { width: 92px; height: 92px; flex: none; }

/* ---------- Reasons (why us) ---------- */
.reasons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reason { padding: 28px; }
.reason .r-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--warm-soft); color: var(--warm-deep); margin-bottom: 18px; }
.reason .r-ic svg { width: 27px; height: 27px; }
.reason h3 { font-size: 1.22rem; margin-bottom: 9px; }
.reason p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Cases ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case-card { overflow: hidden; display: flex; flex-direction: column; }
.case-card .ph { width: 100%; aspect-ratio: 16/10; border-radius: 0; }
.case-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.case-lab { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; }
.case-quote { color: var(--ink-soft); font-size: .97rem; line-height: 1.55; flex: 1; }
.case-meta { display: flex; align-items: center; gap: 11px; padding-top: 12px; border-top: 1px solid var(--line); }
.case-meta .ph { width: 42px; height: 42px; flex: none; }
.case-meta .nm { font-weight: 600; font-size: .92rem; }
.case-meta .ps { font-size: .8rem; color: var(--ink-mute); }
.case-model { font-size: .82rem; font-weight: 600; color: var(--brand); }

/* ---------- Certificates ---------- */
.cert-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert { padding: 18px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.cert .ph { width: 100%; aspect-ratio: 3/4; }
.cert .c-t { font-weight: 600; font-size: .92rem; }
.cert .c-s { font-size: .8rem; color: var(--ink-mute); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.faq-item summary { display: flex; align-items: center; gap: 16px; padding: 22px 24px; cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q-ic { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; flex: none; transition: .25s; }
.faq-item[open] summary .q-ic { background: var(--brand); color: #fff; transform: rotate(45deg); }
.faq-item .a { padding: 0 24px 24px 24px; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Lead form ---------- */
.lead-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.lead-info { background: var(--brand-ink); color: #fff; padding: clamp(36px,5vw,60px); position: relative; }
.lead-info h2 { color: #fff; }
.lead-info .lead { color: rgba(255,255,255,.82); margin-top: 16px; }
.lead-contacts { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.lead-contacts a, .lead-contacts div.lc { display: flex; align-items: center; gap: 14px; }
.lc .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; flex: none; }
.lc .ic svg { width: 22px; height: 22px; }
.lc .k, .lc .v { display: block; }
.lc .v { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; }
.lc .k { font-size: .8rem; color: rgba(255,255,255,.6); }
.lead-form { background: var(--surface); padding: clamp(32px,4vw,52px); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  padding: 15px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong);
  background: var(--surface); font: inherit; color: var(--ink); transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent { font-size: .8rem; color: var(--ink-mute); margin-top: 4px; }
.consent a { color: var(--brand-deep); text-decoration: underline; }
.form-ok { text-align: center; padding: 30px 10px; }
.form-ok .rico { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.form-ok .rico svg { width: 38px; height: 38px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.66); padding-block: 56px 30px; margin-top: clamp(40px,6vw,90px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-grid a { display: block; padding: 5px 0; color: rgba(255,255,255,.64); font-size: .95rem; transition: color .15s; }
.footer-grid a:hover { color: #fff; }
.foot-brand .brand-logo { color: #fff; }
.foot-brand p { margin-top: 14px; font-size: .92rem; line-height: 1.6; max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; font-size: .84rem; flex-wrap: wrap; }

/* ---------- Misc bits ---------- */
.divider { height: 1px; background: var(--line); border: 0; }
.check-li { display: flex; gap: 12px; align-items: flex-start; }
.check-li .ck { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; flex: none; margin-top: 1px; }
.check-li .ck svg { width: 14px; height: 14px; }

/* ============================================================
   PRODUCT PAGE
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--ink-mute); padding-block: 22px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb svg { width: 15px; height: 15px; opacity: .6; }

.pdp-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px,4vw,60px); align-items: flex-start; }
.gallery { position: sticky; top: 96px; }
.gallery-main { width: 100%; aspect-ratio: 4/3.4; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; position: relative; }
.gallery-main .ph { width: 100%; height: 100%; border-radius: 0; }
.gallery-badge { position: absolute; top: 18px; left: 18px; z-index: 2; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 14px; }
.gallery-thumbs .ph { width: 100%; aspect-ratio: 1; border: 1px solid var(--line); }

.pdp-head h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.pdp-sub { color: var(--ink-soft); margin-top: 14px; font-size: 1.08rem; }
.pdp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pdp-key { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.keyspec { background: var(--surface-2); border-radius: var(--r-md); padding: 16px 18px; }
.keyspec .k { font-size: .8rem; color: var(--ink-mute); }
.keyspec .v { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; margin-top: 4px; letter-spacing: -.02em; }
.keyspec .v small { font-size: .82rem; font-weight: 500; color: var(--ink-soft); }

.buy-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-top: 28px; box-shadow: var(--shadow-md); }
.buy-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.buy-price .p { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; letter-spacing: -.02em; }
.buy-price .note { font-size: .9rem; color: var(--ink-mute); }
.buy-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.buy-msg { display: flex; gap: 10px; }
.buy-msg a { flex: 1; }
.buy-assure { display: flex; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.buy-assure .ba { display: flex; gap: 9px; align-items: center; font-size: .85rem; color: var(--ink-soft); }
.buy-assure .ba svg { width: 18px; height: 18px; color: var(--brand); flex: none; }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 34px; overflow-x: auto; }
.tab { padding: 14px 20px; font-weight: 600; color: var(--ink-mute); border-bottom: 2.5px solid transparent; white-space: nowrap; transition: .15s; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-deep); border-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }

/* spec table */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table caption { text-align: left; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; padding-bottom: 14px; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table th { text-align: left; padding: 15px 0; font-weight: 500; color: var(--ink-soft); width: 46%; vertical-align: top; }
.spec-table td { padding: 15px 0; font-weight: 600; }

/* compare table */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.compare { width: 100%; border-collapse: collapse; min-width: 680px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--surface-2); font-family: var(--font-head); font-weight: 700; vertical-align: bottom; }
.compare thead th.featured { background: var(--brand); color: #fff; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.compare tbody th { font-weight: 500; color: var(--ink-soft); }
.compare td.featured { background: var(--brand-tint); font-weight: 600; }
.compare td svg.yes { width: 20px; height: 20px; color: var(--ok); }
.compare td svg.no { width: 18px; height: 18px; color: var(--ink-mute); opacity: .5; }
.compare .model-h { display: flex; flex-direction: column; gap: 3px; }
.compare .model-h small { font-weight: 500; color: var(--ink-mute); font-size: .8rem; }

/* TCO calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.calc-controls { padding: clamp(26px,3vw,40px); background: var(--surface); }
.calc-out { padding: clamp(26px,3vw,40px); background: linear-gradient(160deg, var(--brand-ink), var(--brand-deep)); color: #fff; }
.calc-field { margin-bottom: 24px; }
.calc-field .cf-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.calc-field label { font-weight: 600; }
.calc-field .cf-val { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--brand-deep); }
.calc-field input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; background: var(--surface-2); }
.calc-field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); border: 4px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.seg { display: flex; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: var(--r-pill); }
.seg button { flex: 1; padding: 10px; border-radius: var(--r-pill); font-weight: 600; font-size: .9rem; color: var(--ink-soft); background: transparent; transition: .15s; }
.seg button.on { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.calc-out .co-big { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem,5vw,3.4rem); letter-spacing: -.03em; line-height: 1; }
.calc-out .co-lbl { color: rgba(255,255,255,.72); margin-top: 8px; }
.calc-out .co-break { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.calc-out .co-line { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.14); }
.calc-out .co-line .cn { color: rgba(255,255,255,.8); display: flex; align-items: center; gap: 10px; }
.calc-out .co-line .cn i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.calc-out .co-line .cv { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.calc-note { font-size: .82rem; color: rgba(255,255,255,.6); margin-top: 22px; }

/* related */
.rel-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.rel-card { overflow: hidden; }
.rel-card .ph { width: 100%; aspect-ratio: 4/3; border-radius: 0; }
.rel-body { padding: 18px 20px 22px; }
.rel-body .rc-cat { font-size: .78rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.rel-body h3 { font-size: 1.18rem; margin: 6px 0 8px; }
.rel-body .rc-p { color: var(--ink-soft); font-size: .9rem; }
.rel-body .rc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.rel-body .rc-price { font-family: var(--font-head); font-weight: 700; }

/* ---------- .ph sizing (let aspect-ratio drive height) ---------- */
.hero-media .ph,
.case-card .ph,
.cert .ph,
.gallery-thumbs .ph,
.rel-card .ph { height: auto; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .reasons-grid, .cases-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2,1fr); gap: 22px 28px; }
  .stat-divide { border-left: 0; }
  .cert-row { grid-template-columns: repeat(2,1fr); }
  .rel-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: grid; }
  .hero-grid, .quiz-grid, .lead-shell, .pdp-grid, .calc { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .hero-float.f1 { left: 8px; }
  .hero-float.f2 { right: 8px; }
  .phone-link { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cat-grid, .reasons-grid, .cases-grid, .cert-row, .rel-grid, .quiz-opts.cols2, .field-row, .pdp-key { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-cta .btn span.lbl { display: none; }
}


/* ============================================================
   Placeholder images (replace design-tool <image-slot>)
   In WP these are <img class="ph"> — swap via Media Library.
   ============================================================ */
.ph { display: block; width: 100%; object-fit: cover; background: var(--surface-2); border-radius: var(--r-md); }
.ph.circle { border-radius: 50%; }
.ph.rounded { border-radius: 26px; }
.gallery-main .ph { height: 100%; }

/* ============================================================
   Mobile menu + small responsive bits
   (were inline <style> in the original HTML)
   ============================================================ */
.mobile-menu { position: fixed; inset: 76px 0 auto 0; z-index: 55; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px var(--pad); display: none; flex-direction: column; gap: 2px; box-shadow: var(--shadow-md); }
.mobile-menu[data-open] { display: flex; }
.mobile-menu a { padding: 13px 12px; border-radius: var(--r-md); font-weight: 500; color: var(--ink-soft); }
.mobile-menu a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 820px) { .desc-grid { grid-template-columns: 1fr !important; gap: 28px !important; } }
@media (max-width: 600px) { .tools-row { grid-template-columns: 1fr !important; } }

/* WordPress core helpers */
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content { line-height: 1.7; }
.entry-content p { margin-bottom: 1em; }

/* ============================================================
   WooCommerce — каталог, фильтр, цены, пагинация
   ============================================================ */

/* Цена в карточке и блоке покупки */
.bilk-price-val { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.bilk-price-ask { color: var(--ink-soft); font-weight: 600; }
.rc-foot .bilk-price-val { color: var(--ink); }
.rc-foot .bilk-price-ask { font-weight: 600; }
.buy-price .bilk-price-val { font-size: inherit; }

/* Фильтр категорий каталога */
.catalog-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 34px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .92rem; color: var(--ink-soft); transition: .15s; }
.filter-chip:hover { border-color: var(--brand); color: var(--brand-deep); }
.filter-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-chip .fc-count { font-size: .78rem; opacity: .7; font-weight: 700; }
.filter-chip.on .fc-count { opacity: .85; }

/* Сетка каталога: 3 в ряд, авто-перенос для 30+ моделей */
.catalog-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1080px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .catalog-grid { grid-template-columns: 1fr; } }

/* Богатый текст описания товара (редактор WordPress) */
.rte { line-height: 1.7; color: var(--ink-soft); }
.rte h2 { font-size: 1.6rem; margin: 24px 0 12px; color: var(--ink); }
.rte h3 { font-size: 1.25rem; margin: 20px 0 10px; color: var(--ink); }
.rte p { margin-bottom: 1em; }
.rte ul, .rte ol { margin: 0 0 1em 1.2em; display: flex; flex-direction: column; gap: 8px; }
.rte a { color: var(--brand-deep); text-decoration: underline; }

/* Пагинация */
.pagination, .woocommerce-pagination { margin-top: 36px; }
.pagination .nav-links, .woocommerce-pagination ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; padding: 0; }
.pagination .page-numbers, .woocommerce-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-weight: 600; color: var(--ink-soft); }
.pagination .page-numbers.current, .woocommerce-pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination a.page-numbers:hover, .woocommerce-pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand-deep); }

/* WooCommerce gallery: вписываем под класс .gallery-main */
.gallery-main .woocommerce-product-gallery__image img { width: 100%; height: 100%; object-fit: cover; }
.woocommerce-product-gallery .flex-viewport { border-radius: var(--r-lg); }
