/* =====================================================================
   Ecostrum — дизайн-система (світла та темна теми через змінні).
   Розмітка використовує Tailwind (CDN) для сітки/відступів, а цей файл —
   для компонентів і тем.
   ===================================================================== */

:root {
  color-scheme: light;
  --bg: 244 246 249;
  --surface: 255 255 255;
  --surface2: 237 240 245;
  --ink: 15 23 42;
  --muted: 91 101 119;
  --line: 221 226 234;
  --brand: 255 196 0;
  --brand-strong: 240 176 0;
  --on-brand: 11 18 32;
  --accent: 161 98 7;
  --navy: 10 16 28;
  --navy-2: 18 28 48;
  --ok: 21 128 61;
  --danger: 185 28 28;
  --warn: 180 83 9;
  --plate: 255 255 255;
  --shadow: 15 23 42;
  --focus: 29 78 216;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: 11 18 32;
  --surface: 17 26 45;
  --surface2: 26 37 64;
  --ink: 232 237 245;
  --muted: 148 160 184;
  --line: 40 53 80;
  --brand: 255 196 0;
  --brand-strong: 255 210 51;
  --on-brand: 11 18 32;
  --accent: 255 196 0;
  --navy: 7 12 22;
  --navy-2: 15 24 42;
  --ok: 74 222 128;
  --danger: 248 113 113;
  --warn: 251 191 36;
  --plate: 243 245 248;
  --shadow: 0 0 0;
  --focus: 147 197 253;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--ink));
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgb(var(--focus)); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgb(var(--brand)); color: rgb(var(--on-brand)); }
.tabular { font-variant-numeric: tabular-nums; }

.container-x { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container-x { padding: 0 24px; } }
@media (min-width: 1024px) { .container-x { padding: 0 32px; } }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: rgb(var(--brand)); color: rgb(var(--on-brand)); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ---------- Верхня смуга та шапка ---------- */
.topbar { background: rgb(var(--navy)); color: rgb(203 213 225); font-size: 12.5px; border-bottom: 1px solid rgb(255 255 255 / .06); }
.topbar a:hover { color: #fff; }

.site-header { position: sticky; top: 0; z-index: 40; background: rgb(var(--navy-2)); color: #fff; border-bottom: 1px solid rgb(255 255 255 / .08); }
.header-row { display: flex; align-items: center; gap: 12px; height: 64px; }
@media (min-width: 1024px) { .header-row { height: 76px; gap: 24px; } }
.logo-link { display: inline-flex; align-items: center; flex-shrink: 0; max-width: min(52vw, 240px); }
.logo-img { height: 34px; width: auto; max-width: 100%; display: block; object-fit: contain; }
@media (min-width: 640px) { .logo-img { height: 40px; } }
@media (min-width: 1024px) { .logo-img { height: 46px; } }
.logo-img-foot { height: 48px; }
@media (min-width: 640px) { .logo-img-foot { height: 56px; } }

.main-nav { display: none; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.nav-link { padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: rgb(203 213 225); transition: background .15s, color .15s; white-space: nowrap; }
.nav-link:hover { background: rgb(255 255 255 / .08); color: #fff; }
.nav-link.active { color: rgb(var(--brand)); background: rgb(255 255 255 / .06); }

.hdr-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; min-width: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .14); background: rgb(255 255 255 / .05); color: #fff; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s; }
.hdr-btn:hover { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .28); }
.hdr-btn svg { width: 20px; height: 20px; }
.cart-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgb(var(--brand)); color: rgb(var(--on-brand)); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid rgb(var(--navy-2)); }

.header-search { position: relative; flex: 1; max-width: 420px; display: none; }
@media (min-width: 1024px) { .header-search { display: block; } }
.search-input { width: 100%; height: 42px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .14); background: rgb(255 255 255 / .07); color: #fff; padding: 0 14px 0 40px; font-size: 14px; }
.search-input::placeholder { color: rgb(148 163 184); }
.search-input:focus { outline: none; border-color: rgb(var(--brand)); background: rgb(255 255 255 / .1); }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: rgb(148 163 184); pointer-events: none; }
.search-dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; background: rgb(var(--surface)); color: rgb(var(--ink)); border: 1px solid rgb(var(--line)); border-radius: 14px; box-shadow: 0 18px 40px rgb(var(--shadow) / .25); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid rgb(var(--line)); }
.search-item:last-child { border-bottom: 0; }
.search-item:hover, .search-item:focus { background: rgb(var(--surface2)); outline: none; }

.burger { display: inline-flex; }
@media (min-width: 1024px) { .burger { display: none; } }
.hide-lg { display: inline-flex; }
@media (min-width: 1024px) { .hide-lg { display: none; } }
.only-sm-hide { display: none; }
@media (min-width: 640px) { .only-sm-hide { display: inline; } }

/* Мобільне меню */
.mobile-menu { position: fixed; inset: 0; z-index: 70; display: none; }
.mobile-menu.open { display: block; }
.mobile-menu .backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .6); }
.mobile-menu .panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 360px); background: rgb(var(--navy-2)); color: #fff; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgb(0 0 0 / .4); animation: slideIn .22s ease-out; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.mobile-menu .m-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgb(255 255 255 / .08); color: rgb(226 232 240); }
.mobile-menu .m-link.active { color: rgb(var(--brand)); }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 14.5px; line-height: 1.2; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; text-align: center; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: rgb(var(--brand)); color: rgb(var(--on-brand)); box-shadow: 0 1px 0 rgb(0 0 0 / .08); }
.btn-primary:hover:not(:disabled) { background: rgb(var(--brand-strong)); box-shadow: 0 6px 16px rgb(var(--brand) / .28); }
.btn-dark { background: rgb(var(--navy-2)); color: #fff; }
.btn-dark:hover:not(:disabled) { background: rgb(var(--navy)); }
html[data-theme="dark"] .btn-dark { background: rgb(var(--surface2)); }
html[data-theme="dark"] .btn-dark:hover:not(:disabled) { background: rgb(var(--line)); }
.btn-outline { background: rgb(var(--surface)); color: rgb(var(--ink)); border-color: rgb(var(--line)); }
.btn-outline:hover:not(:disabled) { border-color: rgb(var(--ink) / .45); background: rgb(var(--surface2)); }
.btn-ghost { background: transparent; color: rgb(var(--ink)); }
.btn-ghost:hover:not(:disabled) { background: rgb(var(--surface2)); }
.btn-onnavy { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .22); }
.btn-onnavy:hover { background: rgb(255 255 255 / .16); }
.btn-lg { min-height: 52px; padding: 13px 26px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); color: rgb(var(--muted)); }
.icon-btn:hover { color: rgb(var(--ink)); background: rgb(var(--surface2)); }
.link { color: rgb(var(--accent)); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- Базові блоки ---------- */
.card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 16px; }
.card-pad { padding: 20px; }
@media (min-width: 640px) { .card-pad { padding: 24px; } }
.section { padding: 48px 0; }
@media (min-width: 1024px) { .section { padding: 72px 0; } }
.section-alt { background: rgb(var(--surface)); border-top: 1px solid rgb(var(--line)); border-bottom: 1px solid rgb(var(--line)); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--accent)); }
.h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.h2 { font-size: clamp(22px, 2.8vw, 30px); line-height: 1.2; font-weight: 800; letter-spacing: -.015em; }
.h3 { font-size: 18px; line-height: 1.3; font-weight: 700; }
.lead { color: rgb(var(--muted)); font-size: 16px; }
.muted { color: rgb(var(--muted)); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgb(var(--surface2)); color: rgb(var(--ink)); border: 1px solid rgb(var(--line)); }
.badge-brand { background: rgb(var(--brand)); color: rgb(var(--on-brand)); border-color: transparent; }
.badge-ok { background: rgb(var(--ok) / .12); color: rgb(var(--ok)); border-color: rgb(var(--ok) / .3); }
.badge-warn { background: rgb(var(--warn) / .12); color: rgb(var(--warn)); border-color: rgb(var(--warn) / .3); }
.badge-danger { background: rgb(var(--danger) / .12); color: rgb(var(--danger)); border-color: rgb(var(--danger) / .3); }
.stock-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.stock-badge.in { color: rgb(var(--ok)); }
.stock-badge.pre { color: rgb(var(--warn)); }
.stock-badge::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.divider { border: 0; border-top: 1px solid rgb(var(--line)); margin: 0; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: rgb(var(--muted)); padding: 18px 0 6px; }
.breadcrumbs a:hover { color: rgb(var(--ink)); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { position: relative; background: radial-gradient(1200px 500px at 85% -10%, rgb(255 196 0 / .12), transparent 60%), rgb(var(--navy-2)); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: rgb(255 255 255 / .08); }
.hero .lead { color: rgb(203 213 225); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .12); }
@media (min-width: 900px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.hero-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 4px 2px 2px; color: inherit; }
.hero-stat svg { width: 20px; height: 20px; color: rgb(var(--brand)); margin-bottom: 2px; flex-shrink: 0; }
.hero-stat strong { display: block; font-size: 14.5px; font-weight: 800; color: #fff; line-height: 1.2; }
.hero-stat span { font-size: 12.5px; color: rgb(203 213 225); line-height: 1.35; }
.hero-stat:hover strong { color: rgb(var(--brand)); }
.hero-card { background: rgb(var(--surface)); color: rgb(var(--ink)); border-radius: 20px; padding: 14px; box-shadow: 0 30px 60px rgb(0 0 0 / .35); border: 1px solid rgb(255 255 255 / .08); }

/* Плитка з фото товару */
.plate { background: rgb(var(--plate)); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.plate img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .3s ease; }
.plate-sq { aspect-ratio: 1 / 1; }
.plate-43 { aspect-ratio: 4 / 3; }

/* ---------- Категорії ---------- */
.cat-tile { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-tile:hover { border-color: rgb(var(--brand)); box-shadow: 0 10px 26px rgb(var(--shadow) / .12); transform: translateY(-2px); }
.cat-tile:hover .plate img { transform: scale(1.04); }

/* ---------- Картка товару ---------- */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .pgrid { gap: 16px; } }
@media (min-width: 900px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1200px) { .pgrid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard { position: relative; display: flex; flex-direction: column; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 16px; overflow: hidden; transition: border-color .15s, box-shadow .2s, transform .2s; height: 100%; }
.pcard:hover { border-color: rgb(var(--ink) / .3); box-shadow: 0 14px 30px rgb(var(--shadow) / .12); transform: translateY(-2px); }
.pcard:hover .plate img { transform: scale(1.04); }
.pcard .plate { border-radius: 0; border-bottom: 1px solid rgb(var(--line)); }
.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 16px; gap: 10px; }
.pcard-title { font-weight: 700; font-size: 16.5px; line-height: 1.3; }
.pcard-title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard-actions { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 559px) {
  .pcard { border-radius: 12px; }
  .pcard-body { padding: 10px; gap: 6px; }
  .pcard-title { font-size: 13.5px; }
  .pcard .specs { font-size: 11px; }
  .pcard .specs div { gap: 6px; padding: 4px 0; }
  .pcard .price { font-size: 16px; }
  .pcard .price-old { font-size: 11px; }
  .pcard .plate img { padding: 6px; }
  .pcard-actions .btn { min-height: 38px; padding: 6px 8px; font-size: 12.5px; gap: 0; }
  .pcard-cart-label { display: none; }
  .pcard .stock-badge { font-size: 11px; }
}
.specs { display: grid; gap: 0; font-size: 13px; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgb(var(--line)); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: rgb(var(--muted)); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
.price { font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-old { color: rgb(var(--muted)); text-decoration: line-through; font-size: 13.5px; white-space: nowrap; }
.discount-tag { position: absolute; top: 10px; left: 10px; background: rgb(var(--brand)); color: rgb(var(--on-brand)); font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 8px; z-index: 1; }
.series-tag { position: absolute; top: 10px; right: 10px; background: rgb(var(--navy-2)); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .06em; padding: 3px 8px; border-radius: 8px; z-index: 1; }

/* ---------- Каталог ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); font-weight: 600; font-size: 13.5px; color: rgb(var(--ink)); transition: all .15s; }
.chip:hover { border-color: rgb(var(--ink) / .4); }
.chip.active { background: rgb(var(--navy-2)); color: #fff; border-color: rgb(var(--navy-2)); }
html[data-theme="dark"] .chip.active { background: rgb(var(--brand)); color: rgb(var(--on-brand)); border-color: rgb(var(--brand)); }
.chip .count { opacity: .65; font-weight: 500; }

/* ---------- Форми ---------- */
.field { display: block; }
.field > span.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: rgb(var(--ink)); }
.field > span.lbl em { color: rgb(var(--danger)); font-style: normal; }
.input, .select { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); color: rgb(var(--ink)); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input::placeholder { color: rgb(var(--muted) / .7); }
.input:hover, .select:hover { border-color: rgb(var(--ink) / .35); }
.input:focus, .select:focus { outline: none; border-color: rgb(var(--focus)); box-shadow: 0 0 0 3px rgb(var(--focus) / .18); }
.input.invalid { border-color: rgb(var(--danger)); box-shadow: 0 0 0 3px rgb(var(--danger) / .14); }
.field-error { color: rgb(var(--danger)); font-size: 12.5px; margin-top: 4px; font-weight: 500; }
.hint { color: rgb(var(--muted)); font-size: 12.5px; margin-top: 4px; }

.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid rgb(var(--line)); border-radius: 14px; cursor: pointer; background: rgb(var(--surface)); transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: rgb(var(--ink) / .35); }
.radio-card:has(input:checked) { border-color: rgb(var(--brand-strong)); background: rgb(var(--brand) / .09); box-shadow: 0 0 0 1px rgb(var(--brand-strong)); }
.radio-card:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.radio-card input { margin-top: 3px; width: 18px; height: 18px; accent-color: rgb(var(--brand-strong)); flex-shrink: 0; }

/* Кількість */
.qty { display: inline-flex; align-items: center; border: 1px solid rgb(var(--line)); border-radius: 10px; overflow: hidden; background: rgb(var(--surface)); }
.qty button { width: 36px; height: 36px; border: 0; background: transparent; font-size: 18px; color: rgb(var(--ink)); }
.qty button:hover { background: rgb(var(--surface2)); }
.qty span { min-width: 32px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Кошик / оформлення ---------- */
.cart-row { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgb(var(--line)); align-items: center; }
.cart-row:last-child { border-bottom: 0; }
@media (min-width: 640px) { .cart-row { grid-template-columns: 88px 1fr auto auto; } }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; margin-top: 8px; border-top: 1px solid rgb(var(--line)); font-weight: 800; font-size: 20px; }
.sticky-side { position: static; }
@media (min-width: 1024px) { .sticky-side { position: sticky; top: 96px; } }
.steps { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: rgb(var(--muted)); font-weight: 600; }
.steps .on { color: rgb(var(--ink)); }
.steps .num { display: inline-flex; width: 22px; height: 22px; border-radius: 999px; align-items: center; justify-content: center; background: rgb(var(--surface2)); font-size: 12px; margin-right: 6px; }
.steps .on .num { background: rgb(var(--brand)); color: rgb(var(--on-brand)); }

/* ---------- Сторінка замовлення / реквізити ---------- */
.order-hero { border-radius: 18px; padding: 22px; background: rgb(var(--navy-2)); color: #fff; }
.order-number { font-size: clamp(24px, 5vw, 34px); font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; color: rgb(var(--brand)); word-break: break-all; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid rgb(var(--line)); border-radius: 12px; background: rgb(var(--surface)); }
.copy-row .k { font-size: 12px; color: rgb(var(--muted)); font-weight: 600; }
.copy-row .v { font-weight: 700; font-size: 15px; word-break: break-word; overflow-wrap: anywhere; }
.copy-row .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.copy-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface2)); font-weight: 700; font-size: 13px; transition: background .15s; }
.copy-btn:hover { background: rgb(var(--line)); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn.done { border-color: rgb(var(--ok) / .5); color: rgb(var(--ok)); background: rgb(var(--ok) / .1); }
.purpose-box { border: 2px solid rgb(var(--brand-strong)); background: rgb(var(--brand) / .1); border-radius: 14px; padding: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface2)); }
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.notice-info { border-color: rgb(var(--focus) / .35); background: rgb(var(--focus) / .08); }
.notice-warn { border-color: rgb(var(--warn) / .4); background: rgb(var(--warn) / .1); }
.notice-ok { border-color: rgb(var(--ok) / .4); background: rgb(var(--ok) / .1); }
.notice-err { border-color: rgb(var(--danger) / .4); background: rgb(var(--danger) / .08); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 20px; border: 2px dashed rgb(var(--line)); border-radius: 14px; background: rgb(var(--surface2) / .5); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: rgb(var(--brand-strong)); background: rgb(var(--brand) / .08); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Таблиця характеристик / вкладки ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid rgb(var(--line)); vertical-align: top; }
.spec-table th { color: rgb(var(--muted)); font-weight: 500; width: 42%; padding-right: 16px; }
.spec-table td { font-weight: 600; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid rgb(var(--line)); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; line-height: 1; color: rgb(var(--muted)); transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 18px; color: rgb(var(--muted)); max-width: 760px; }

/* ---------- Відгуки ---------- */
.stars { display: inline-flex; gap: 2px; color: rgb(var(--brand-strong)); }
.stars svg { width: 16px; height: 16px; fill: currentColor; }
.stars .off { color: rgb(var(--line)); }

/* ---------- Футер ---------- */
.site-footer { background: rgb(var(--navy)); color: rgb(176 188 207); margin-top: 0; }
.site-footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin: 0 0 14px; letter-spacing: .02em; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 9px; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .08); font-size: 13px; }

/* ---------- Тости ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; width: min(94vw, 440px); background: rgb(var(--navy-2)); color: #fff; border: 1px solid rgb(255 255 255 / .12); border-radius: 14px; padding: 12px 14px; box-shadow: 0 18px 40px rgb(0 0 0 / .35); display: flex; align-items: center; gap: 12px; animation: toastIn .25s ease-out; }
@media (min-width: 900px) { .toast { left: auto; right: 24px; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 900px) { @keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } } }
.toast .t-icon { width: 34px; height: 34px; border-radius: 10px; background: rgb(var(--ok) / .2); color: #4ade80; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast.err .t-icon { background: rgb(248 113 113 / .2); color: #f87171; }

/* Модальне вікно підтвердження */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgb(0 0 0 / .6); }
.modal.open { display: flex; }
.modal-card { width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 18px; padding: 24px; box-shadow: 0 30px 60px rgb(0 0 0 / .4); }

/* Нижня панель купівлі на мобільному */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: rgb(var(--surface)); border-top: 1px solid rgb(var(--line)); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; box-shadow: 0 -10px 24px rgb(var(--shadow) / .1); }
@media (min-width: 900px) { .buybar { display: none; } }
body.has-buybar { padding-bottom: 76px; }
@media (min-width: 900px) { body.has-buybar { padding-bottom: 0; } }

.page { animation: pageIn .25s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.pre-line { white-space: pre-line; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Хрестик модального вікна */
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface2)); color: rgb(var(--ink)); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.modal-x:hover { background: rgb(var(--line)); }

/* Покроковe оформлення */
.stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stepper .step-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); font-weight: 700; font-size: 14px; color: rgb(var(--muted)); cursor: default; }
.stepper .step-btn .n { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--surface2)); font-size: 13px; }
.stepper .step-btn.active { color: rgb(var(--ink)); border-color: rgb(var(--brand-strong)); }
.stepper .step-btn.active .n { background: rgb(var(--brand)); color: rgb(var(--on-brand)); }
.stepper .step-btn.done { color: rgb(var(--ink)); cursor: pointer; }
.stepper .step-btn.done .n { background: rgb(var(--ok) / .2); color: rgb(var(--ok)); }
.stepper .sep { width: 28px; height: 2px; background: rgb(var(--line)); border-radius: 2px; }
.dropzone.has-file { border-style: solid; border-color: rgb(var(--ok) / .6); background: rgb(var(--ok) / .08); }
.dropzone.invalid { border-color: rgb(var(--danger)); background: rgb(var(--danger) / .06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.checkout-slide { max-width: 680px; display: grid; gap: 16px; }
.checkout-slide #checkout-step-1,
.checkout-slide #checkout-step-2 { display: grid; gap: 16px; }
.checkout-slide #checkout-step-1[hidden],
.checkout-slide #checkout-step-2[hidden] { display: none !important; }
.checkout-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.checkout-span { grid-column: 1 / -1; }
.np-wrap { position: relative; }
.np-suggest { position: absolute; left: 0; right: 0; top: calc(100% - 2px); z-index: 40; margin: 0; padding: 6px; list-style: none; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 12px; box-shadow: 0 12px 32px rgb(var(--shadow) / .18); max-height: 240px; overflow: auto; }
.np-suggest li { margin: 0; }
.np-opt { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; font-size: 14px; color: rgb(var(--ink)); cursor: pointer; }
.np-opt:hover, .np-opt:focus { background: rgb(var(--surface2)); }
.checkout-promo-row { display: flex; gap: 8px; }
.checkout-promo-row .input { flex: 1; min-width: 0; }
.checkout-promo-row .btn { flex-shrink: 0; min-width: 72px; }
.checkout-slide .h3 { margin-bottom: 12px; }
@media (max-width: 639px) {
  .checkout-slide { gap: 12px; }
  .checkout-slide #checkout-step-1,
  .checkout-slide #checkout-step-2 { gap: 12px; }
  .checkout-slide .card-pad { padding: 14px; }
  .checkout-slide .h3 { font-size: 16px; margin-bottom: 10px; }
  .checkout-fields { gap: 10px; }
  .checkout-slide .field > span.lbl { margin-bottom: 4px; font-size: 12.5px; }
  .checkout-slide .input { min-height: 42px; padding: 8px 12px; border-radius: 10px; }
  .checkout-promo-row .btn { min-height: 42px; padding: 8px 12px; }
  #checkout-next-btn { min-height: 48px; }
}

/* Гарантія: талон EcoFlow Ukraine */
.warranty-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgb(var(--line)); }
.warranty-title { margin: 6px 0 0; font-size: clamp(20px, 2.5vw, 30px); line-height: 1.18; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; flex: 1 1 280px; }
.warranty-term { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--on-brand)); background: rgb(var(--brand)); white-space: nowrap; }
.warranty-body { display: grid; gap: 16px; }
@media (min-width: 760px) { .warranty-body { grid-template-columns: 1.15fr .85fr; gap: 20px; } }
.warranty-facts { padding: 8px 22px; }
.warranty-row { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 12px 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgb(var(--line)); }
.warranty-row:last-child { border-bottom: 0; }
.warranty-row dt { color: rgb(var(--muted)); font-size: 14px; }
.warranty-row dd { margin: 0; font-weight: 800; font-size: 15px; text-align: right; }
.warranty-accent { color: rgb(var(--brand-strong)); }
.warranty-stamp { padding: 28px 20px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.warranty-seal { width: min(220px, 70vw); height: auto; color: #2a3aa8; opacity: .95; }
html[data-theme="dark"] .warranty-seal { color: #4d5ed4; }
.warranty-cover { margin-top: 16px; }
.warranty-list { margin: 12px 0 0; padding-left: 1.2em; font-size: 14.5px; color: rgb(var(--ink)); list-style: disc; }
.warranty-list li { margin: 0 0 8px; }
.warranty-list li:last-child { margin-bottom: 0; }
@media (max-width: 639px) {
  .warranty-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .warranty-row dd { text-align: left; }
  .warranty-facts { padding: 8px 16px; }
}
