/* привіт — стиль магазину. Джерело: ../../design/privet-design.html; правила бренду: ../../brand/README.md */
:root {
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --ink: #14213D;
  --muted: #5A6479;
  --line: #DCE1EA;
  --lamp: #FFB703;
  --lamp-soft: #FFF1C7;
  --on-lamp: #2B1F00;
  --ok: #17845A;
  --wait: #9A6400;
  --warn: #B4471A;
  --night: #14213D;
  --on-night: #F3F5F9;
  --photo-bg: #FFFFFF;
  --photo-ink: #14213D;
  --f-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1322; --surface: #151D31; --ink: #EDF0F6; --muted: #9AA3B6; --line: #26304A;
    --lamp: #FFC233; --lamp-soft: #3A3014; --on-lamp: #241A00; --ok: #3CC48A; --wait: #F0B35A; --warn: #FF8A5C;
    --night: #070B16; --on-night: #EDF0F6; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
img, svg { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Логотип «Вогник» */
.wm1 { font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.wm1 .i { position: relative; display: inline-block; }
.wm1 .i::after { content: ""; position: absolute; left: 50%; top: -0.06em; width: 0.24em; height: 0.24em; border-radius: 50%; transform: translateX(-50%); background: var(--lamp); box-shadow: 0 0 0 0.07em color-mix(in srgb, var(--lamp) 28%, transparent), 0 0 0.45em color-mix(in srgb, var(--lamp) 70%, transparent); }

/* Шапка */
header.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.logo { color: var(--ink); text-decoration: none; display: flex; align-items: center; }
nav.menu { display: flex; gap: 20px; font-weight: 700; font-size: 15px; }
nav.menu a { text-decoration: none; }
nav.menu a:hover { color: var(--muted); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 800; cursor: pointer; text-decoration: none; }
.btn-lamp { background: var(--lamp); color: var(--on-lamp); }
.btn-lamp:hover { filter: brightness(1.05); }
.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

/* Перший екран */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 48px; }
.hero h1 { position: relative; z-index: 0; font-size: clamp(36px, 6vw, 68px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 .lit { position: relative; white-space: nowrap; }
.hero h1 .lit::before { content: ""; position: absolute; inset: 58% -0.06em 4% -0.06em; background: var(--lamp); z-index: -1; border-radius: 4px; }
.hero-copy { display: grid; gap: 20px; }
.hero-copy > p { font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.facts b { display: block; font-family: var(--f-mono); font-size: 20px; color: var(--ink); }

/* Калькулятор */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 16px; box-shadow: 0 18px 40px -28px rgba(20, 33, 61, 0.45); }
.calc-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.calc-head h2, .calc-head h3 { font-size: 18px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: baseline; }
.chip small { font-family: var(--f-mono); font-weight: 500; color: var(--muted); font-size: 12px; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] small { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.calc label { font-size: 13px; font-weight: 700; color: var(--muted); display: grid; gap: 6px; }
.calc select { font-weight: 700; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: end; background: var(--night); color: var(--on-night); border-radius: 14px; padding: 16px 18px; }
.result .big { font-family: var(--f-mono); font-weight: 700; font-size: 40px; line-height: 1; color: var(--lamp); font-variant-numeric: tabular-nums; grid-row: span 2; }
.result .lbl { font-size: 13px; opacity: 0.75; }
.result .sum { font-family: var(--f-mono); font-size: 14px; }
.result .alert { grid-column: 1 / -1; font-size: 13px; color: var(--lamp); }
.result .alert a { color: var(--lamp); font-weight: 700; }
.note { font-size: 12px; color: var(--muted); }

/* Каталог */
.catalog .wrap { padding-block: 56px; display: grid; gap: 22px; }
.cat-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; gap: 10px; position: relative; }
/* Фото: однакова біла плитка 4:3 для всіх, фото вписане й по центру (фото виробників — на білому тлі) */
.pic { position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 100%; overflow: hidden; background: var(--photo-bg); border-radius: 10px; display: grid; place-items: center; color: var(--photo-ink); text-decoration: none; }
.pic svg { width: 56%; height: auto; }
.pic img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; object-position: center; }
.brand { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-family: var(--f-body); font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: 0; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.specs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.runtime { font-size: 13px; color: var(--ink); background: var(--lamp-soft); border-radius: 8px; padding: 6px 10px; align-self: start; }
.runtime b { font-family: var(--f-mono); }
.runtime.none { background: transparent; color: var(--muted); padding: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--f-mono); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock { font-size: 12px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock.wait { color: var(--wait); }
.empty { color: var(--muted); }

.hdr-phone { font-family: var(--f-mono); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.lead .phones { font-size: 15px; }
.lead .phones a { color: var(--lamp); font-family: var(--f-mono); font-weight: 700; text-decoration: none; white-space: nowrap; }
footer.bottom a { color: inherit; }

/* Пошук у шапці */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { position: relative; flex: 1 1 260px; min-width: 0; max-width: 420px; }
.search input { width: 100%; font-size: 14px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 34px 9px 12px; }
.search input:focus { border-color: var(--ink); outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.q-key { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.search input:focus + .q-key { display: none; }
.q-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -20px rgba(20, 33, 61, 0.5); overflow: hidden; max-height: min(70vh, 520px); overflow-y: auto; }
.q-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; text-decoration: none; color: var(--ink); }
.q-item[aria-selected="true"], .q-item:hover { background: var(--bg); }
.q-item .pic { border-radius: 6px; aspect-ratio: 1; }
.q-item .pic img { inset: 4%; width: 92%; height: 92%; }
.q-item > span:nth-child(2) { min-width: 0; }
.q-item .t, .q-item .s { display: block; }
.q-item .t { font-weight: 800; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item .s { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.q-item .p { font-family: var(--f-mono); font-weight: 700; font-size: 14px; white-space: nowrap; }
.q-item mark { background: var(--lamp-soft); color: inherit; border-radius: 3px; }
.q-empty { padding: 14px; font-size: 14px; color: var(--muted); }

/* Фільтри */
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.sort select, .range input { font-weight: 700; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.shop { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.shop .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
.filters summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "▾"; color: var(--muted); }
.filters[open] summary::after { content: "▴"; }
#fCount { font-family: var(--f-mono); font-size: 12px; background: var(--lamp); color: var(--on-lamp); border-radius: 999px; padding: 1px 8px; margin-left: auto; margin-right: 10px; }
#fCount:empty { display: none; }
.f-body { padding: 0 16px 16px; display: grid; gap: 16px; }
.f-body fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.f-body legend { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.range { display: flex; align-items: center; gap: 8px; }
.range input { width: 100%; min-width: 0; font-family: var(--f-mono); }
.tick { display: flex; align-items: baseline; gap: 8px; font-size: 15px; cursor: pointer; flex-wrap: wrap; }
.tick input { accent-color: var(--ink); width: 16px; height: 16px; flex: none; transform: translateY(2px); }
.tick small { color: var(--muted); font-size: 12px; }
.brands { display: grid; gap: 6px; }
.brands .tick small { font-family: var(--f-mono); }
.found { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.kwh { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }

/* Порівняння */
.cmp-toggle { position: absolute; top: 24px; right: 24px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.cmp-toggle::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 2px solid currentColor; }
.cmp-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cmp-toggle[aria-pressed="true"]::before { background: var(--lamp); border-color: var(--lamp); }
.p-buy .cmp-toggle { position: static; padding: 10px 14px; font-size: 14px; }
.cmp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--night); color: var(--on-night); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.cmp-bar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.cmp-items { display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.cmp-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--on-night) 25%, transparent); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; font-weight: 700; }
.cmp-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.cmp-bar .clear { background: transparent; border: 0; color: color-mix(in srgb, var(--on-night) 70%, transparent); cursor: pointer; font-size: 13px; text-decoration: underline; }
body.has-cmp { padding-bottom: 72px; }
.cmp-page .wrap { padding-block: 32px 56px; display: grid; gap: 20px; }
.cmp-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.cmp { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 14px; }
table.cmp th, table.cmp td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 170px; }
table.cmp tr:last-child th, table.cmp tr:last-child td { border-bottom: 0; }
table.cmp th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); color: var(--muted); font-weight: 500; min-width: 120px; width: 140px; }
table.cmp td { font-family: var(--f-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
table.cmp td.best { color: var(--ok); }
table.cmp td.best::after { content: " ★"; color: var(--lamp); }
table.cmp .head td { font-family: var(--f-body); }
table.cmp .head .pic { margin-bottom: 10px; }
table.cmp .head a.name { font-weight: 800; font-size: 15px; text-decoration: none; display: block; }
table.cmp .rm { margin-top: 8px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.cmp-empty { color: var(--muted); }

/* Як працюємо */
.how .wrap { padding-block: 8px 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-item { border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.how-item h3 { font-family: var(--f-body); font-size: 17px; font-weight: 800; letter-spacing: 0; }
.how-item p { color: var(--muted); font-size: 15px; }

/* Сторінка станції */
.crumbs { padding-block: 18px 0; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.product .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-block: 24px 56px; align-items: start; }
.product .pic { border: 1px solid var(--line); }
.p-info { display: grid; gap: 18px; }
.p-info h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.p-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-buy .price { font-size: 30px; }
table.spec { border-collapse: collapse; width: 100%; font-size: 15px; }
table.spec th, table.spec td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { font-weight: 500; color: var(--muted); width: 45%; }
table.spec td { font-family: var(--f-mono); font-weight: 700; }
.p-text { color: var(--ink); max-width: 62ch; }

/* Заявка */
.lead { background: var(--night); color: var(--on-night); }
.lead .wrap { padding-block: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.lead h2 { color: var(--on-night); }
.lead p { opacity: 0.8; margin-top: 10px; max-width: 44ch; }
form.lead-form { display: grid; gap: 10px; }
.lead-form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.lead-form input { flex: 1 1 180px; min-width: 0; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--on-night) 25%, transparent); background: color-mix(in srgb, var(--on-night) 6%, transparent); color: var(--on-night); padding: 12px 14px; }
.lead-form input::placeholder { color: color-mix(in srgb, var(--on-night) 55%, transparent); }
.lead-form .about { font-size: 14px; color: var(--lamp); min-height: 0; }
.lead-form .msg { font-size: 14px; min-height: 1.4em; }
.lead-form .msg.ok { color: var(--lamp); }
.lead-form .msg.err { color: var(--warn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

footer.bottom .wrap { padding-block: 22px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

@media (max-width: 1100px) { .shop .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .shop { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; }
  .hero .wrap, .product .wrap, .lead .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-block: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav.menu { display: none; }
  header.top .wrap { flex-wrap: wrap; gap: 10px 16px; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .q-key { display: none; }
}
@media (max-width: 560px) { .hdr-phone { display: none; } }
@media (max-width: 560px) {
  .grid, .shop .grid, .how .wrap { grid-template-columns: minmax(0, 1fr); }
  body.has-cmp { padding-bottom: 120px; }
  .result .big { font-size: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .wm1 .i::after { animation: glow 3.2s ease-in-out infinite; }
  @keyframes glow { 50% { box-shadow: 0 0 0 0.1em color-mix(in srgb, var(--lamp) 18%, transparent), 0 0 0.7em color-mix(in srgb, var(--lamp) 80%, transparent); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
