/* ==========================================================================
   ЭлектроВсем — витрина электротоваров
   ========================================================================== */

:root {
  --navy: #0b1f3a;
  --navy-600: #14305a;
  --navy-400: #24507f;
  --ink: #131a26;
  --muted: #667085;
  --muted-2: #8a94a6;
  --line: #e5e9f0;
  --line-2: #eef1f6;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --brand: #1b4fd8;
  --brand-700: #1439a3;
  --accent: #f7b32b;
  --accent-700: #d99a08;
  --ok: #12805c;
  --danger: #b42318;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow: 0 8px 26px rgba(16, 24, 40, .09);
  --shadow-lg: 0 20px 48px rgba(11, 31, 58, .18);
  --header-h: 66px;
}

* { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любые display-правила (модалка, корзина, кнопки) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 118px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.015em; }
p { margin: 0 0 10px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font: inherit; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 960px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: .95em; letter-spacing: -.02em; }
.ta-r { text-align: right; }

/* ------------------------------------------------------------------ кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px; cursor: pointer;
  font: 600 15px/1 inherit; padding: 0 18px; height: 44px; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #2b1d00; }
.btn-accent:hover { background: var(--accent-700); }
.btn-accent[disabled] { background: #e3e7ee; color: var(--muted-2); cursor: default; transform: none; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-700); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #c9d2e0; background: #fbfcfe; }
.btn.wide { width: 100%; }

.icon-btn {
  border: 0; background: #f1f4f9; color: var(--ink); border-radius: 10px;
  width: 38px; height: 38px; font-size: 20px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: #e6ebf3; }

/* --------------------------------------------------------------- верхняя полоса */
.topline { background: var(--navy); color: #c7d4e6; font-size: 12.5px; }
.topline-in { display: flex; gap: 26px; align-items: center; height: 34px; overflow: hidden; }
.topline-item { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ------------------------------------------------------------------- шапка */
.top { position: sticky; top: 0; z-index: 60; background: #fff; box-shadow: var(--shadow-sm); }
.top-in { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: var(--navy);
  display: grid; place-items: center;
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); }
.brand-text { display: flex; flex-direction: column; }
.brand-text b { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.brand-text i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.search { position: relative; flex: 1 1 auto; min-width: 0; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 40px 0 40px; border: 1px solid var(--line);
  border-radius: 11px; background: #f7f9fc; font-size: 14.5px; color: var(--ink);
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(27, 79, 216, .12); }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: #eef1f6; color: var(--muted); width: 26px; height: 26px;
  border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1;
}

.top-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.top-phone { display: none; flex-direction: column; text-align: right; color: var(--ink); line-height: 1.25; }
.top-phone:hover { text-decoration: none; }
.top-phone-label { font-size: 11px; color: var(--muted); }
.top-phone b { font-size: 14.5px; white-space: nowrap; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 15px;
  border: 0; border-radius: 11px; background: var(--navy); color: #fff; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.cart-btn:hover { background: var(--navy-600); }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--accent); color: #2b1d00; font-size: 12.5px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; padding: 12px 11px; }
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin-bottom: 4px; }
.burger span:last-child { margin-bottom: 0; }

.mainnav { border-top: 1px solid var(--line-2); }
.mainnav-in { display: flex; align-items: center; gap: 24px; height: 46px; overflow-x: auto; }
.mainnav a { color: var(--ink); font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.mainnav a:hover { color: var(--brand); text-decoration: none; }
.mainnav a.is-active { color: var(--brand); font-weight: 700; }
.mainnav-note { margin-left: auto; font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }

/* --------------------------------------------------------------- хлебные крошки */
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; padding: 16px 0 0; }
.crumbs b { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------------- герой */
.hero {
  position: relative; margin: 20px 0 0; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, #0b1f3a 0%, #14305a 55%, #1b4fd8 130%);
  min-height: 380px; display: flex; align-items: flex-end;
}
.hero-media {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: .32; mix-blend-mode: luminosity;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 31, 58, .94) 0%, rgba(11, 31, 58, .78) 45%, rgba(11, 31, 58, .35) 100%);
}
.hero-body { position: relative; z-index: 2; padding: 44px 46px; color: #fff; max-width: 720px; }
.hero-badge {
  display: inline-block; background: rgba(247, 179, 43, .16); border: 1px solid rgba(247, 179, 43, .45);
  color: #ffd77a; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; margin-bottom: 16px;
}
.hero h1 { font-size: 38px; color: #fff; margin-bottom: 12px; }
.hero-body > p { color: #cbd8ea; font-size: 16px; max-width: 560px; margin-bottom: 20px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hero-list li { color: #b9c9e0; font-size: 13.5px; padding-left: 22px; position: relative; }
.hero-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ трастовый блок */
.trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-top: 14px; box-shadow: var(--shadow-sm);
}
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-ico {
  flex: 0 0 auto; min-width: 46px; height: 34px; padding: 0 8px; border-radius: 9px;
  background: #eef3fd; color: var(--brand); font-weight: 800; font-size: 12.5px;
  display: grid; place-items: center;
}
.trust-item b { display: block; font-size: 14px; }
.trust-item i { font-style: normal; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------- секции */
.block { margin-top: 34px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.block-head h2 { font-size: 23px; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.cat {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cat:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-img { height: 118px; background-size: cover; background-position: center; background-color: #e8eef7; display: block; }
.cat-body { padding: 12px 14px 14px; }
.cat-body b { display: block; font-size: 15px; }
.cat-body i { font-style: normal; font-size: 12.5px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.step-n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.step b { display: block; margin-bottom: 5px; font-size: 15px; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* --------------------------------------------------------------- каталог */
.sort { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); }
.sort select {
  height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: thin; }
.chip {
  white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; color: var(--ink); font-size: 13.5px; box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.section { margin: 0 0 30px; }
.section-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.section-ico {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: #eef3fd;
  color: var(--brand); display: grid; place-items: center;
}
.section-head h3 { font-size: 19px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(246px, 1fr)); gap: 13px; }

.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px; min-height: 158px; box-shadow: var(--shadow-sm);
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: #d5dcea; transform: translateY(-2px); }
.card[hidden] { display: none; }
.card-name { font-weight: 600; font-size: 14.5px; margin-bottom: 7px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; font-size: 11.5px; color: var(--muted-2); }
.tag {
  background: #eef7f1; color: var(--ok); border-radius: 6px; padding: 2px 7px; font-weight: 600;
  font-size: 11px; letter-spacing: .01em;
}
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.price { font-size: 19px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.price .unit { font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.add {
  border: 1px solid var(--brand); background: #fff; color: var(--brand); font-weight: 700;
  font-size: 13.5px; padding: 9px 13px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: background .14s ease, color .14s ease;
}
.add:hover { background: var(--brand); color: #fff; }
.add.in-cart { background: #eef7f1; border-color: #bfe3cd; color: var(--ok); }
.more {
  display: block; margin: 14px auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 20px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink);
}
.more:hover { border-color: var(--brand); color: var(--brand); }
.no-results { text-align: center; color: var(--muted); padding: 40px 0; margin: 0; }

/* ------------------------------------------------------------------- FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 18px; box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-weight: 600; font-size: 15px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--brand); font-size: 20px; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------- CTA */
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  margin: 34px 0 10px; padding: 28px 30px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #0b1f3a, #14305a 70%, #24507f);
  color: #fff;
}
.cta h2 { font-size: 22px; color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; color: #b9c9e0; font-size: 14.5px; max-width: 560px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ------------------------------------------------------------- корзина */
.drawer {
  position: fixed; top: 0; right: 0; z-index: 90; height: 100%; width: 400px; max-width: 94vw;
  background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 16px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 20px; display: grid; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.line-name { font-weight: 600; font-size: 14px; }
.line-price { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.qty { display: flex; align-items: center; gap: 6px; height: 32px; }
.qty button {
  width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink);
}
.qty button:hover { border-color: var(--brand); color: var(--brand); }
.qty span { min-width: 26px; text-align: center; font-weight: 600; font-size: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.row.total { font-size: 17px; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--line-2); }
.row.total b { font-size: 22px; letter-spacing: -.03em; }
.drawer-hint { background: #fff8e6; border: 1px solid #ffe1a3; color: #7a5300; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* ------------------------------------------------------------------- модал */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(11, 31, 58, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: #fff; border-radius: var(--radius-lg); padding: 22px; width: 620px; max-width: 100%;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { font-size: 20px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.modal-grid label.wide { grid-column: 1 / -1; }
.modal-grid input, .modal-grid textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit;
  font-size: 15px; color: var(--ink); background: #fbfcfe;
}
.modal-grid input:focus, .modal-grid textarea:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(27, 79, 216, .12);
}
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 14px; font-size: 13.5px; }
.check input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--brand); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.error { background: #fef3f2; border: 1px solid #fecdca; color: var(--danger); border-radius: 10px; padding: 12px; font-size: 14px; margin-top: 12px; }

/* ------------------------------------------------------------------ страницы */
.page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; padding: 20px 0 30px; align-items: start; }
.page-side { position: sticky; top: 130px; display: grid; gap: 12px; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 3px; box-shadow: var(--shadow-sm); }
.toc b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.toc a { font-size: 14px; color: var(--ink); padding: 5px 0; border-left: 2px solid transparent; padding-left: 10px; margin-left: -10px; }
.toc a:hover { color: var(--brand); border-left-color: var(--brand); text-decoration: none; }
.page-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 40px 40px; box-shadow: var(--shadow-sm); }
.page-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.page-head h1 { font-size: 29px; margin-bottom: 8px; }
.page-body section { margin-bottom: 30px; scroll-margin-top: 130px; }
.page-body section:last-of-type { margin-bottom: 12px; }
.page-body h2 { font-size: 20px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.page-body p { color: #2c3648; }
.page-body ul, .page-body ol { margin: 0 0 14px; }
.bullets { list-style: none; padding: 0; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 22px; color: #2c3648; }
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px;
  border-radius: 3px; background: var(--accent);
}
.num { padding-left: 4px; display: grid; gap: 9px; counter-reset: n; list-style: none; }
.num li { position: relative; padding-left: 34px; color: #2c3648; counter-increment: n; }
.num li::before {
  content: counter(n); position: absolute; left: 0; top: 1px; width: 23px; height: 23px;
  border-radius: 7px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center;
}
.note { background: #f4f7fd; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; padding: 12px 15px; font-size: 14px; color: #2c3648; }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 18px; }
.kv dt, .kv dd { padding: 11px 15px; margin: 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.kv dt { background: #f8fafd; color: var(--muted); font-weight: 500; }
.kv dd { background: #fff; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.page-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 13px; margin: 0 0 16px; }
.mini { background: #f8fafd; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; }
.mini b { display: block; margin-bottom: 6px; font-size: 14.5px; }
.mini p { margin: 0; font-size: 13.5px; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 13px; margin-bottom: 16px; }
.contact-card {
  background: #f8fafd; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: grid; gap: 5px; color: var(--ink);
}
.contact-card:hover { text-decoration: none; border-color: var(--brand); }
.contact-ico {
  width: 38px; height: 38px; border-radius: 11px; background: var(--navy); color: var(--accent);
  display: grid; place-items: center; font-size: 18px; font-weight: 700; margin-bottom: 4px;
}
.contact-card b { font-size: 15px; }
.contact-card span { font-size: 15px; font-weight: 600; color: var(--brand); word-break: break-word; }
.contact-card i { font-style: normal; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------- оплата */
.pay { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 30px; margin: 16px 0 30px; box-shadow: var(--shadow-sm); }
.pay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pay-head h1 { font-size: 24px; margin-bottom: 6px; }
.pay-sum { text-align: right; }
.amount { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.pay-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 30px; margin: 24px 0; align-items: start; }
.qr-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; padding: 16px; aspect-ratio: 1; box-shadow: var(--shadow-sm);
}
.qr-box img { width: 100%; max-width: 280px; image-rendering: pixelated; }
.qr-loader { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qr-caption { text-align: center; margin-top: 10px; }
.pay-info { display: grid; gap: 16px; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #2c3648; font-size: 14.5px; }
.pay-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f8fafd; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; font-size: 14px; }
.pay-status b { color: var(--brand); }
.demo { border: 1px dashed var(--muted-2); background: #fff; color: var(--muted); padding: 11px; border-radius: 11px; cursor: pointer; font-size: 13.5px; }
.pay-items { border-top: 1px solid var(--line); padding-top: 20px; }
.pay-items-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); text-align: left; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.tbl tfoot td { border-bottom: 0; border-top: 2px solid var(--line); font-size: 16px; }
.pay-terms { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; }
.pay-terms p { margin: 0; }

/* ------------------------------------------------------------------- спасибо */
.done { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 30px; margin: 16px 0 30px; text-align: center; box-shadow: var(--shadow-sm); }
.ok { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: #e7f5ee; color: var(--ok); display: grid; place-items: center; }
.done h1 { font-size: 24px; margin-bottom: 8px; }
.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; text-align: left; margin: 26px 0; }
.blocks .block { margin: 0; background: #f8fafd; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 7px; align-content: start; }
.block-title { font-weight: 700; font-size: 14.5px; }
.doc-list { display: grid; gap: 7px; }
.doc-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  color: var(--ink); font-size: 14px;
}
.doc-list a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.doc-ext { font-size: 10.5px; font-weight: 700; color: var(--muted-2); letter-spacing: .04em; }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------- футер */
.foot { background: var(--navy); color: #c7d4e6; margin-top: 44px; padding: 40px 0 22px; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-col h4 { color: #fff; font-size: 14px; margin-bottom: 12px; letter-spacing: .01em; }
.foot-col a { display: block; color: #c7d4e6; font-size: 13.5px; padding: 4px 0; }
.foot-col a:hover { color: var(--accent); text-decoration: none; }
.foot-col p { margin: 0 0 6px; font-size: 13px; }
.foot-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.foot .muted { color: #93a5c0; }
.foot-more { color: var(--accent) !important; font-weight: 600; }
.foot-legal {
  display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 30px; padding-top: 20px;
}
.foot-legal-main { max-width: 720px; }
.foot-legal-main p { font-size: 12.5px; margin: 0 0 5px; }
.foot-legal-main a { color: var(--accent); }
.foot-legal-side { text-align: right; }
.foot-legal-side h4 { color: #fff; font-size: 14px; margin: 0 0 10px; letter-spacing: .01em; }
.pay-icons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-bottom: 8px; }
.pay-icons img { display: block; height: 28px; width: auto; border-radius: 6px; }
.foot-legal-side .pay-chip {
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; padding: 7px 11px;
  font-size: 12px; color: #dbe5f3;
}
.pay-bank { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin: 0 0 10px; }
.pay-bank a { display: inline-block; line-height: 0; }
.pay-bank a:hover { opacity: .85; }
.pay-bank img { display: block; height: 28px; width: auto; border-radius: 6px; }

/* логотипы платёжных систем на светлом фоне (страницы документации) */
.page-body .pay-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.page-body .pay-row img { display: block; height: 32px; width: auto; border: 1px solid var(--line); border-radius: 8px; }
.page-body .pay-chip {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; color: var(--muted);
}
.page-body .pay-bank { justify-content: flex-start; }
.page-body .pay-bank img { height: 32px; border: 1px solid var(--line); border-radius: 8px; }

/* ------------------------------------------------------------ наверх + тост */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 46px; height: 46px;
  border: 0; border-radius: 50%; background: var(--navy); color: #fff; font-size: 20px;
  cursor: pointer; box-shadow: var(--shadow);
}
.to-top:hover { background: var(--navy-600); }
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 120;
  background: var(--navy); color: #fff; padding: 13px 20px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: 14px; max-width: 90vw;
}
.toast.is-error { background: #7a1d13; }

/* =============================================================== адаптив */
@media (max-width: 1080px) {
  .foot-in { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 32px; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .page { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .page-body { padding: 28px 26px 32px; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }
  .topline-item:nth-child(n + 2) { display: none; }
  .top-phone { display: none; }
  .burger { display: block; }
  .search { order: 3; flex-basis: 100%; }
  .top-in { flex-wrap: wrap; height: auto; padding: 12px 0; row-gap: 12px; }
  .mainnav {
    display: none; border-top: 1px solid var(--line-2);
  }
  .mainnav.is-open { display: block; }
  .mainnav-in { height: auto; flex-direction: column; align-items: stretch; gap: 0; overflow: visible; padding: 6px 0 14px; }
  .mainnav-in a { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
  .mainnav-note { display: none; }
  .page { grid-template-columns: 1fr; }
  .page-side { position: static; }
  .toc { display: none; }
  .pay-grid { grid-template-columns: 1fr; }
  .qr-box { max-width: 340px; margin: 0 auto; }
  .qr-caption { margin-bottom: 10px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 14px; }
  .brand-text i { display: none; }
  .cart-label { display: none; }
  .cart-btn { padding: 0 12px; }
  .hero { min-height: 0; }
  .hero-body { padding: 30px 22px; }
  .hero h1 { font-size: 25px; }
  .hero-body > p { font-size: 14.5px; }
  .hero-media { opacity: .22; }
  .block-head h2 { font-size: 20px; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-img { height: 92px; }
  .cat-body { padding: 10px 11px 12px; }
  .cat-body b { font-size: 13.5px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { min-height: 0; padding: 12px; gap: 12px; }
  .card-name { font-size: 13.5px; }
  .price { font-size: 17px; }
  .add { padding: 9px 11px; font-size: 13px; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .trust { grid-template-columns: 1fr; padding: 14px; }
  .steps { grid-template-columns: 1fr; }
  .cta { padding: 22px; }
  .drawer { width: 100%; max-width: 100%; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 20px 20px 0 0; max-height: 94vh; padding: 20px 16px 26px; }
  .modal-grid { grid-template-columns: 1fr; }
  .page-body { padding: 22px 16px 26px; }
  .page-head h1 { font-size: 23px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { padding-bottom: 2px; border-bottom: 0; background: #fff; font-size: 12.5px; }
  .kv dd { padding-top: 0; font-size: 14px; }
  .pay { padding: 20px 16px; }
  .pay-head { flex-direction: column; gap: 12px; }
  .pay-sum { text-align: left; }
  .amount { font-size: 28px; }
  .tbl, .tbl thead, .tbl tbody, .tbl tfoot, .tbl th, .tbl td, .tbl tr { display: block; }
  .tbl thead { display: none; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .tbl td { border: 0; padding: 2px 0; }
  .tbl td.ta-r { text-align: left; }
  .tbl tfoot tr { border-top: 1px solid var(--line); }
  .foot-in { grid-template-columns: 1fr; gap: 22px; }
  .foot-legal-side { text-align: left; }
  .pay-icons { justify-content: flex-start; }
  .to-top { right: 14px; bottom: 78px; }
}

@media (max-width: 420px) {
  .cats, .grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media print {
  .topline, .top, .foot, .to-top, .toast, .crumbs, .page-side, .drawer, .modal { display: none !important; }
  body { background: #fff; }
  .page-body { border: 0; box-shadow: none; padding: 0; }
}
