/* Гаджет Ярмарка — ярмарковий прилавок: світла вітрина, жовті цінники, синій бренд, назви моделей жирно, як у роликах TikTok */
:root {
  --paper: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #e9edf6;
  --ink: #121a2e;
  --muted: #5a6580;
  --line: #d9dfeb;
  --blue: #1d5be6;
  --blue-ink: #ffffff;
  --blue-soft: #e3ebfd;
  --yellow: #ffc21a;
  --yellow-ink: #1d1600;
  --good: #11804a;
  --good-soft: #def3e8;
  --warn: #9a5b00;
  --warn-soft: #fdf0d9;
  --bad: #c0352b;
  --shadow: 0 1px 2px rgba(18, 26, 46, .06), 0 8px 24px rgba(18, 26, 46, .06);

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

  --r: 14px;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0f1d; --surface: #131a2c; --surface-2: #1b2339; --ink: #edf0f8; --muted: #9aa4bd;
    --line: #273152; --blue: #5b8cff; --blue-ink: #08122b; --blue-soft: #1a2a55;
    --good: #45c987; --good-soft: #12301f; --warn: #f0b04c; --warn-soft: #33260e; --bad: #ff6b5f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a0f1d; --surface: #131a2c; --surface-2: #1b2339; --ink: #edf0f8; --muted: #9aa4bd;
  --line: #273152; --blue: #5b8cff; --blue-ink: #08122b; --blue-soft: #1a2a55;
  --good: #45c987; --good-soft: #12301f; --warn: #f0b04c; --warn-soft: #33260e; --bad: #ff6b5f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
.wrap {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font: 800 17px/1 var(--f-display); letter-spacing: -.02em; }
.brand-name span { font: 600 11px/1.3 var(--f-display); color: var(--blue); letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.nav .cart-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--ink); color: var(--paper); padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.nav .cart-btn:hover { background: var(--blue); color: var(--blue-ink); }
.cart-btn svg { width: 18px; height: 18px; }
.cart-count { background: var(--yellow); color: var(--yellow-ink); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; padding: 0 6px; }
.cart-count[data-empty="true"] { display: none; }
@media (max-width: 760px) {
  .nav .nav-link { display: none; }
  .brand-name b { font-size: 15px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--blue); color: var(--blue-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-yellow { background: var(--yellow); color: var(--yellow-ink); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 28px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
.eyebrow { font: 600 12px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.hero h1 { font-size: clamp(30px, 5vw, 54px); font-weight: 800; margin-top: 14px; }
.hero h1 mark { background: var(--yellow); color: var(--yellow-ink); padding: 0 .12em; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 52ch; margin: 18px 0 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1 / .9; max-width: 100%; }
.hero-art svg { width: 100%; height: 100%; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; margin: 0 auto; order: -1; aspect-ratio: 1 / .7; }
}

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 32px; }
.trust div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.trust b { display: block; font: 700 17px/1.2 var(--f-display); }
.trust span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .trust { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Catalog toolbar ---------- */
.section { padding-block: 24px 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.section-head .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search input {
  width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px;
}
.search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.select { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.f-price { display: grid; grid-template-columns: auto minmax(0, 110px) auto minmax(0, 110px); align-items: center; gap: 8px; }
.f-mem { display: flex; align-items: center; gap: 8px; }
.f-label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.f-input { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; color: var(--ink); }
.f-mem .select { padding: 10px 12px; }
@media (max-width: 480px) { .f-price { flex: 1 1 100%; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: thin; }
.chip {
  flex-shrink: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.card-media img, .card-media svg { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.card-brand { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-title { font: 700 17px/1.2 var(--f-display); overflow-wrap: anywhere; }
.card-specs { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .card-title { font-size: 14px; }
  .card-body { padding: 10px; }
  .card-specs { font-size: 12.5px; }
}

/* Жовтий цінник з вирізом, як на ярмарку */
.price-tag {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: var(--yellow); color: var(--yellow-ink);
  font: 800 18px/1 var(--f-display); font-variant-numeric: tabular-nums;
  padding: 8px 12px 8px 18px; border-radius: 4px 10px 10px 4px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  white-space: nowrap;
}
.price-tag small { font-size: .62em; font-weight: 700; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .price-tag { font-size: 15px; padding: 7px 9px 7px 15px; } }

.grade {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 10px 5px 6px;
  font-size: 12px; font-weight: 700; box-shadow: var(--shadow); font-variant-numeric: tabular-nums;
}
.grade i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; background: var(--good-soft); color: var(--good); }
.grade[data-level="mid"] i { background: var(--warn-soft); color: var(--warn); }
.sold-veil { position: absolute; inset: 0; background: color-mix(in srgb, var(--paper) 55%, transparent); display: grid; place-items: center; }
.sold-veil span { background: var(--ink); color: var(--paper); font: 800 14px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; padding: 9px 14px; border-radius: 8px; rotate: -6deg; }
.card.is-sold .price-tag { filter: grayscale(1); opacity: .6; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 18px; aspect-ratio: .72; }
@keyframes shimmer { to { background-position: -200% 0; } }

.demo-note { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }

/* ---------- Product page ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-block: 18px 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; padding-block: 8px 56px; }
@media (max-width: 880px) { .product { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.gallery-main { position: relative; aspect-ratio: 1; background: var(--surface-2); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.gallery-main img, .gallery-main svg { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-2); cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.p-info h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; overflow-wrap: anywhere; }
.p-brand { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.p-price { display: flex; align-items: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.p-price .price-tag { font-size: 28px; padding: 12px 18px 12px 26px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); }
.p-price .price-old { font-size: 17px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--good); }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.sold { color: var(--bad); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 18px 0; }
.specs div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.specs dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.specs dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.battery { display: flex; align-items: center; gap: 8px; }
.battery-bar { width: 34px; height: 14px; border: 2px solid currentColor; border-radius: 4px; position: relative; padding: 1px; flex-shrink: 0; }
.battery-bar::after { content: ""; position: absolute; right: -5px; top: 3px; width: 3px; height: 4px; background: currentColor; border-radius: 0 2px 2px 0; }
.battery-bar span { display: block; height: 100%; background: var(--good); border-radius: 1px; }
.p-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.p-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checked { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.checked h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.checked ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 14px; }
.checked li { display: flex; gap: 8px; align-items: flex-start; }
.checked li svg { width: 18px; height: 18px; color: var(--good); flex-shrink: 0; margin-top: 2px; }
.p-desc { margin-top: 22px; max-width: 65ch; }
.p-desc h2 { font-size: 18px; margin-bottom: 8px; }
.p-desc p { margin: 0 0 10px; white-space: pre-line; }
.p-delivery { margin-top: 18px; font-size: 14px; color: var(--muted); display: grid; gap: 6px; }
.p-delivery b { color: var(--ink); }

/* ---------- Cart ---------- */
.page-title { padding-block: 28px 18px; }
.page-title h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; align-items: start; padding-bottom: 56px; }
@media (max-width: 880px) { .cart-layout { grid-template-columns: minmax(0, 1fr); } }
.cart-items { display: grid; gap: 10px; }
.cart-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.cart-item .thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.cart-item .thumb img, .cart-item .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.cart-item a { color: var(--ink); text-decoration: none; font-weight: 700; }
.cart-item .meta { color: var(--muted); font-size: 14px; }
.cart-item .right { display: flex; flex-direction: column; align-items: end; gap: 6px; }
.cart-item .price { font: 800 17px/1 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 4px; }
.link-btn:hover { color: var(--bad); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.panel h2 { font-size: 20px; margin-bottom: 14px; }
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; }
.field textarea { min-height: 80px; resize: vertical; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input:invalid:not(:placeholder-shown) { border-color: var(--bad); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--paper); }
.radio + .radio { margin-top: 8px; }
.field .radio input { width: auto; flex: none; margin-top: 4px; padding: 0; accent-color: var(--blue); }
.radio small { display: block; color: var(--muted); font-size: 13px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px dashed var(--line); margin-top: 6px; font-variant-numeric: tabular-nums; }
.total b { font: 800 24px/1 var(--f-display); }
.combo-box { position: relative; }
.combo-list { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; }
.combo-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; display: grid; gap: 2px; }
.combo-list li b { font-weight: 600; font-size: 15px; }
.combo-list li small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--blue-soft); }
.combo-list li.combo-msg { color: var(--muted); cursor: default; background: none; }
.field input:disabled { opacity: .6; cursor: not-allowed; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--paper); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 8px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 1px; }
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.pay-logos span { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.success .ok[data-state="wait"] { background: var(--blue-soft); color: var(--blue); }
.success .ok[data-state="bad"] { background: var(--warn-soft); color: var(--warn); }
.pay-split { display: grid; gap: 6px; margin: 0 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--blue-soft); font-variant-numeric: tabular-nums; }
.pay-split div { display: flex; justify-content: space-between; gap: 12px; }
.pay-split dt { color: var(--muted); font-size: 14px; }
.pay-split dd { margin: 0; font-weight: 700; text-align: right; }
.pay-note { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
fieldset .hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.form-error { color: var(--bad); font-size: 14px; min-height: 1em; }
.small-print { font-size: 13px; color: var(--muted); }
[hidden] { display: none !important; }
.addon-pick { border: 1px solid var(--line, #e3e7ee); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; display: grid; gap: 8px; min-width: 0; }
.addon-pick legend { display: flex; align-items: center; gap: 6px; font-weight: 700; padding: 0 4px; flex-wrap: wrap; }
.addon-pick legend svg { width: 18px; height: 18px; color: var(--blue); }
.addon-pick legend .hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.addon-pick label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.addon-pick label:has(input:checked) { outline: 2px solid var(--blue); background: var(--blue-soft); }
.addon-pick input { width: auto; margin: 0; accent-color: var(--blue); }
.addon-pick label span { flex: 1; }
.addon-pick label b { white-space: nowrap; }
.addons { display: grid; gap: 10px; margin: 0 0 14px; }
.addons .addon-pick { margin: 0; }
.addons.compact { grid-column: 1 / -1; gap: 8px; margin: 4px 0 0; }
.addon-check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line, #e3e7ee); border-radius: 14px; cursor: pointer; }
.addon-check:has(input:checked) { outline: 2px solid var(--blue); background: var(--blue-soft); }
.addon-check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--blue); }
.addon-check span { flex: 1; display: grid; gap: 2px; min-width: 0; }
.addon-check small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.addon-check .addon-price { white-space: nowrap; }
.addon-check.compact { padding: 8px 10px; font-size: 14px; }
.addon-pick.compact { margin: 4px 0 0; padding: 8px 10px; gap: 6px; font-size: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.addon-pick.compact legend { grid-column: 1 / -1; }
.addon-pick.compact label { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 8px 8px 28px; position: relative; overflow-wrap: anywhere; hyphens: auto; font-size: 13px; }
.addon-pick.compact label input { position: absolute; left: 10px; top: 11px; }
.addon-pick.compact label b { font-size: 13px; }
@media (max-width: 380px) { .addon-pick.compact { grid-template-columns: 1fr; } }
.success { text-align: center; padding: 40px 20px; max-width: 620px; margin: 0 auto 48px; }
.success h2 { margin: 0 0 8px; }
.success p { margin: 0 0 12px; }
.done-next { text-align: left; margin: 20px auto; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); max-width: 480px; }
.done-next ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.done-contacts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0; }
.done-receipt a { font-weight: 700; }
.success .ok { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; }
.success .ok svg { width: 32px; height: 32px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Text pages ---------- */
.prose { max-width: 72ch; padding-bottom: 56px; }
.prose h2 { font-size: 22px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 20px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 4px; min-width: 0; }
.contact-card span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.contact-card a, .contact-card b { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: auto; }
.site-footer .wrap { padding-block: 36px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.site-footer h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; color: var(--yellow); }
.site-footer a { color: var(--paper); text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer p { margin: 0 0 8px; opacity: .8; font-size: 14px; }
.site-footer .brand { color: var(--paper); margin-bottom: 12px; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); padding-top: 16px; font-size: 13px; opacity: .7; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Плаваюча кнопка зв'язку на телефоні */
.fab { display: none; }
@media (max-width: 760px) {
  .fab {
    display: flex; position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 25; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: var(--blue-ink);
    align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(29, 91, 230, .4);
  }
  .fab svg { width: 26px; height: 26px; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 40;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-weight: 600;
  display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
.toast a { color: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
