/* =====================================================================
   Techno Focus — вітрина магазину (дизайн-система v3)
   ===================================================================== */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e4e8ef;
  --line-2: #eef1f6;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff4ff;
  --accent: #f97316;
  --accent-600: #ea580c;
  --success: #16a34a;
  --success-50: #ecfdf3;
  --danger: #e11d48;
  --danger-50: #fff1f3;
  --warning: #f59e0b;
  --dark: #0b1220;
  --dark-2: #111a2e;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 6px 24px -8px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
  --header-h: 72px;
  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.main { min-height: 60vh; padding-bottom: 48px; outline: none; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; line-height: 1.2; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; background: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .i { width: 18px; height: 18px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-600); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-600); }
.btn--dark { background: var(--dark); color: #fff; }
.btn--dark:hover { background: #1e293b; }
.btn--outline { border-color: var(--line); background: var(--surface); color: var(--text); }
.btn--outline:hover { border-color: #cbd5e1; background: var(--surface-2); }
.btn--ghost { color: var(--primary); }
.btn--ghost:hover { background: var(--primary-50); }
.btn--ghost-light { color: #fff; border-color: rgba(255,255,255,.25); }
.btn--ghost-light:hover { background: rgba(255,255,255,.08); }
.btn--danger-soft { color: var(--danger); background: var(--danger-50); }
.btn--sm { padding: 8px 12px; font-size: 13.5px; border-radius: 10px; }
.btn--lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; border: 0; background: transparent; color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.icon-btn--solid { background: var(--line-2); }
.icon-btn--light { color: #fff; }
.icon-btn--light:hover { background: rgba(255,255,255,.12); color: #fff; }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--surface);
}

/* ── Верхня панель ──────────────────────────────────────── */
.topbar { background: var(--dark); color: #cbd5e1; font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 20px; min-width: 0; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__item .i { width: 15px; height: 15px; color: #38bdf8; }
.topbar__link { color: #94a3b8; }
.topbar__link:hover { color: #fff; }
.topbar__phone { color: #fff; font-weight: 700; white-space: nowrap; }

/* ── Шапка ──────────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.header__burger { display: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__mark { width: 40px; height: 40px; }
.logo__text { font-family: var(--font-head); font-size: 20px; letter-spacing: .02em; display: inline-flex; gap: 4px; }
.logo__text b { font-weight: 800; color: var(--text); }
.logo__text span { font-weight: 800; background: linear-gradient(90deg, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo__text--light b { color: #fff; }
.logo__text--light span { background: linear-gradient(90deg, #38bdf8, #a78bfa); -webkit-background-clip: text; background-clip: text; }
.header__catalog { flex-shrink: 0; }
.header__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header__search-toggle { display: none; }

.search { position: relative; flex: 1; display: flex; align-items: center; max-width: 620px; height: 46px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
.search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.search__icon { position: absolute; left: 14px; color: var(--muted); }
.search__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 12px 0 44px; outline: none; font-size: 14.5px; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__btn { height: 36px; margin-right: 5px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--dark); color: #fff; font-weight: 600; font-size: 14px; }
.search__btn:hover { background: #1e293b; }
.search__dropdown { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 60; }
.search__dropdown.is-open { display: block; }
.suggest { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.suggest:hover, .suggest.is-active { background: var(--surface-2); }
.suggest img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; flex-shrink: 0; }
.suggest__title { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suggest__price { margin-left: auto; font-weight: 700; white-space: nowrap; font-size: 14px; }
.suggest-all { display: block; padding: 12px 14px; text-align: center; font-weight: 600; color: var(--primary); font-size: 14px; }
.suggest-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }

.cart-btn { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 14px; border: 1px solid var(--line); margin-left: 6px; transition: border-color .15s; }
.cart-btn:hover { border-color: #cbd5e1; }
.cart-btn__text { display: flex; flex-direction: column; line-height: 1.15; }
.cart-btn__text small { color: var(--muted); font-size: 12px; }
.cart-btn__text b { font-size: 14px; white-space: nowrap; }

/* Мега-меню */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 55; }
.mega__inner { display: grid; grid-template-columns: 300px 1fr; min-height: 380px; padding-top: 12px; padding-bottom: 20px; }
.mega__cats { border-right: 1px solid var(--line); padding-right: 12px; }
.mega__cat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; font-weight: 600; text-align: left; font-size: 14.5px; color: var(--text-2); }
.mega__cat .i { color: var(--muted); }
.mega__cat.is-active, .mega__cat:hover { background: var(--primary-50); color: var(--primary); }
.mega__cat.is-active .i { color: var(--primary); }
.mega__cat small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.mega__panel { padding: 8px 28px; }
.mega__panel h3 { font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.mega__subs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px; }
.mega__subs a { padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-size: 14.5px; display: flex; justify-content: space-between; gap: 8px; }
.mega__subs a:hover { background: var(--surface-2); color: var(--primary); }
.mega__subs a span { color: var(--muted); font-size: 12.5px; }
.mega-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 40; }

/* Мобільне меню */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(88vw, 360px); background: #fff; z-index: 95; transform: translateX(-105%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.is-open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer__body { overflow-y: auto; padding: 10px 10px 30px; }
.drawer__title { padding: 14px 10px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.drawer__link { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; font-weight: 500; }
.drawer__link:hover { background: var(--surface-2); }
.drawer__link .i { color: var(--muted); }

/* ── Загальні блоки ─────────────────────────────────────── */
.page-loader { display: flex; justify-content: center; padding: 120px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.section { margin-top: 48px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section__title { font-size: 26px; font-weight: 800; }
.section__sub { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary); white-space: nowrap; font-size: 14.5px; }
.link-more:hover { text-decoration: underline; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 18px 0 12px; font-size: 13.5px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span[aria-hidden] { color: #cbd5e1; }
.page-title { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.empty { text-align: center; padding: 64px 20px; }
.empty__icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.empty__icon .i { width: 32px; height: 32px; }
.empty h3 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--dark); border-color: var(--dark); color: #fff; }
.chip small { color: inherit; opacity: .6; }

/* ── Hero слайдер ───────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin-top: 20px; }
.slider { position: relative; border-radius: 22px; overflow: hidden; background: var(--dark); min-height: 400px; isolation: isolate; }
.slide { position: absolute; inset: 0; display: flex; align-items: flex-end; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide__bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -2; transform: scale(1.03); transition: transform 6s ease; }
.slide.is-active .slide__bg { transform: scale(1); }
.slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11,18,32,.92) 0%, rgba(11,18,32,.72) 42%, rgba(11,18,32,.1) 80%); }
.slide__content { padding: 44px 48px 64px; max-width: 560px; color: #fff; }
.slide__badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(56,189,248,.16); color: #7dd3fc; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.slide__title { font-size: 40px; font-weight: 800; line-height: 1.1; margin-bottom: 14px; }
.slide__text { color: #cbd5e1; font-size: 16px; margin-bottom: 26px; max-width: 460px; }
.slider__nav { position: absolute; right: 20px; bottom: 20px; display: flex; gap: 8px; z-index: 2; }
.slider__arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(15,23,42,.45); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); }
.slider__arrow:hover { background: rgba(15,23,42,.75); }
.slider__dots { position: absolute; left: 48px; bottom: 28px; display: flex; gap: 6px; z-index: 2; }
.slider__dot { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: rgba(255,255,255,.35); transition: width .25s, background .25s; }
.slider__dot.is-active { width: 26px; background: #fff; }
.hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.promo-tile { position: relative; border-radius: 22px; padding: 24px; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; isolation: isolate; }
.promo-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55)); z-index: -1; }
.promo-tile__bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -2; transition: transform .4s; }
.promo-tile:hover .promo-tile__bg { transform: scale(1.05); }
.promo-tile small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.promo-tile b { font-family: var(--font-head); font-size: 21px; line-height: 1.2; margin-top: 4px; }

/* ── Переваги ───────────────────────────────────────────── */
.perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.perk { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.perk__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.perk b { display: block; font-size: 14.5px; }
.perk span { color: var(--muted); font-size: 13px; }

/* ── Категорії ──────────────────────────────────────────── */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cat-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; padding: 20px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: transparent; }
.cat-card__name { font-family: var(--font-head); font-weight: 700; font-size: 17px; max-width: 62%; position: relative; z-index: 1; }
.cat-card__count { color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.cat-card__img { position: absolute; right: -6px; bottom: -6px; width: 52%; height: 85%; object-fit: contain; object-position: right bottom; mix-blend-mode: multiply; transition: transform .3s; }
.cat-card:hover .cat-card__img { transform: scale(1.06); }
.cat-card__icon { position: absolute; right: 18px; bottom: 18px; width: 60px; height: 60px; border-radius: 18px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.cat-card__icon .i { width: 30px; height: 30px; }

/* ── Картка товару ──────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .2s, border-color .2s; min-width: 0; }
.pcard:hover { box-shadow: var(--shadow); border-color: transparent; }
.pcard__media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; padding: 18px; }
.pcard__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s, opacity .3s; }
.pcard__media img.is-alt { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); opacity: 0; }
.pcard:hover .pcard__media img.is-alt { opacity: 1; }
.pcard:hover .pcard__media img.has-alt { opacity: 0; }
.pcard__badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 5px; z-index: 2; align-items: flex-start; }
.tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.tag--sale { background: var(--danger); color: #fff; }
.tag--new { background: var(--success); color: #fff; }
.tag--top { background: var(--dark); color: #fff; }
.tag--soft { background: var(--line-2); color: var(--text-2); }
.pcard__fav { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--muted); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: color .15s, transform .15s; }
.pcard__fav:hover { color: var(--danger); transform: scale(1.06); }
.pcard__fav.is-active { color: var(--danger); }
.pcard__fav.is-active .i { fill: currentColor; }
.pcard__quick { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px); opacity: 0; transition: all .2s; z-index: 2; background: rgba(15,23,42,.85); color: #fff; border: 0; border-radius: 10px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pcard:hover .pcard__quick { opacity: 1; transform: translate(-50%, 0); }
.pcard__body { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; flex: 1; }
.pcard__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--success); font-size: 12.5px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--out { color: var(--muted); }
.pcard__brand { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.pcard__title { font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.pcard__title:hover { color: var(--primary); }
.pcard__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 4px; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price__old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.price__now { font-family: var(--font-head); font-weight: 800; font-size: 20px; white-space: nowrap; }
.price__now.is-sale { color: var(--danger); }
.pcard__buy { width: 46px; height: 46px; border-radius: 13px; border: 0; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
.pcard__buy:hover { background: var(--primary-600); }
.pcard__buy.is-in { background: var(--success); }
.pcard__buy:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.rating .star { color: #f59e0b; }

/* Карусель (горизонтальна прокрутка) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-wrap { position: relative; }
.rail-arrow { position: absolute; top: 38%; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; z-index: 3; color: var(--text); }
.rail-arrow--prev { left: -16px; }
.rail-arrow--next { right: -16px; }

/* Банер-акція */
.deal-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 30px; border-radius: 22px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #1d4ed8 0%, #0b1220 60%); margin-bottom: 18px; }
.deal-banner h3 { font-size: 24px; margin-bottom: 4px; }
.deal-banner p { color: #cbd5e1; }

/* Бренди */
.brands { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 92px; padding: 10px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-align: center; transition: border-color .15s, box-shadow .15s; }
.brand:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.brand b { font-family: var(--font-head); font-size: 17px; letter-spacing: .02em; }
.brand span { color: var(--muted); font-size: 12px; }

/* Шоурум / контакт */
.showroom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; border-radius: 22px; overflow: hidden; background: var(--dark); color: #fff; }
.showroom__text { padding: 40px; }
.showroom__text h3 { font-size: 28px; margin: 10px 0 12px; }
.showroom__text p { color: #cbd5e1; margin-bottom: 20px; }
.showroom__list { display: grid; gap: 12px; margin-bottom: 26px; }
.showroom__list li { display: flex; gap: 12px; color: #e2e8f0; }
.showroom__list .i { color: #38bdf8; margin-top: 2px; }
.showroom__img { background-size: cover; background-position: center; min-height: 300px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #38bdf8; }

/* ── Каталог ────────────────────────────────────────────── */
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.catalog-head .muted { font-size: 14px; }
.subcats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.subcats::-webkit-scrollbar { display: none; }
.catalog { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px 18px 18px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.filters__head { display: none; }
.fgroup { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup__title { font-weight: 700; font-size: 14px; margin-bottom: 12px; display: flex; justify-content: space-between; }
.fcheck { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; cursor: pointer; color: var(--text-2); }
.fcheck input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.fcheck small { margin-left: auto; color: var(--muted); }
.fcheck:hover { color: var(--text); }
.flink { display: flex; justify-content: space-between; padding: 6px 10px; margin: 0 -10px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.flink:hover { background: var(--surface-2); }
.flink.is-active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.flink small { color: var(--muted); }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 10px; }
.price-range input { width: 100%; }
.fmore { border: 0; background: none; color: var(--primary); font-weight: 600; padding: 6px 0 0; font-size: 13.5px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar__filters-btn { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters .chip { padding: 5px 10px; font-size: 12.5px; }
.select { height: 42px; padding: 0 38px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; font-size: 14px; cursor: pointer; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .is-current { background: var(--dark); color: #fff; border-color: var(--dark); }
.pagination .is-gap { border: 0; background: none; min-width: 20px; }
.pagination .is-disabled { opacity: .45; pointer-events: none; }

/* ── Сторінка товару ────────────────────────────────────── */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 16px); display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
.gallery__thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; scrollbar-width: none; }
.gallery__thumb { width: 76px; height: 76px; border-radius: 12px; border: 2px solid var(--line); background: #fff; padding: 6px; flex-shrink: 0; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumb.is-active { border-color: var(--primary); }
.gallery__main { position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 32px; cursor: zoom-in; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__badges { position: absolute; top: 16px; left: 16px; display: flex; gap: 6px; z-index: 1; }
.pinfo__brand { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; margin-bottom: 10px; flex-wrap: wrap; }
.pinfo__brand a { font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.pinfo__title { font-size: 28px; font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.buybox { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; margin-top: 18px; }
.buybox__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.buybox__price .price__now { font-size: 34px; }
.buybox__price .price__old { font-size: 17px; }
.save-tag { background: var(--danger-50); color: var(--danger); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.buybox__note { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.buybox__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buybox__actions .btn { padding: 14px 16px; font-size: 15px; }
.buybox__secondary { display: flex; gap: 8px; margin-top: 10px; }
.buybox__secondary .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 38px; height: 40px; border: 0; background: none; font-size: 18px; color: var(--text-2); }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 42px; height: 40px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.infolist { display: grid; gap: 2px; margin-top: 16px; }
.infolist__row { display: flex; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line-2); }
.infolist__row:first-child { border-top: 0; }
.infolist__row .i { color: var(--primary); margin-top: 1px; }
.infolist__row b { display: block; font-size: 14px; }
.infolist__row span { color: var(--muted); font-size: 13.5px; }
.keyspecs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 4px 0 6px; }
.keyspecs div { font-size: 13.5px; color: var(--text-2); display: flex; flex-direction: column; }
.keyspecs span { color: var(--muted); font-size: 12px; }
.tabs { margin-top: 40px; }
.tabs__nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs__btn { padding: 14px 18px; border: 0; background: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs__btn.is-active { color: var(--text); border-bottom-color: var(--primary); }
.tabs__panel { padding: 24px 0; }
.specs { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs tr:nth-child(even) { background: var(--surface-2); }
.specs th, .specs td { text-align: left; padding: 12px 18px; font-size: 14px; vertical-align: top; }
.specs th { width: 42%; color: var(--muted); font-weight: 500; }
.prose { max-width: 820px; color: var(--text-2); line-height: 1.7; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 22px; list-style: disc; }
.prose h2, .prose h3, .prose h4 { margin: 18px 0 8px; font-size: 18px; }
.prose img { height: auto; border-radius: 12px; margin: 12px 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px; }

/* ── Кошик / Оформлення ─────────────────────────────────── */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cart-list { display: grid; gap: 12px; }
.citem { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.citem__img { width: 96px; height: 96px; object-fit: contain; border-radius: 12px; background: #fff; }
.citem__title { font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.citem__title:hover { color: var(--primary); }
.citem__row { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.citem__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.citem__remove { border: 0; background: none; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.citem__remove:hover { color: var(--danger); }
.summary { position: sticky; top: calc(var(--header-h) + 16px); padding: 22px; }
.summary h3 { font-size: 20px; margin-bottom: 16px; }
.summary__row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14.5px; color: var(--text-2); }
.summary__row--total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 18px; color: var(--text); font-weight: 800; }
.summary__row--discount { color: var(--success); }
.promo-form { display: flex; gap: 8px; margin: 14px 0; }
.promo-form .input { flex: 1; }
.msg { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; margin-top: 8px; }
.msg--error { background: var(--danger-50); color: var(--danger); }
.msg--ok { background: var(--success-50); color: var(--success); }
.checkout-mini { display: grid; gap: 10px; margin-bottom: 14px; max-height: 300px; overflow-y: auto; }
.checkout-mini__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.checkout-mini__item img { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }

/* Форми */
.form-card { padding: 24px; margin-bottom: 16px; }
.form-card h3 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field label i { color: var(--danger); font-style: normal; }
.input, .textarea { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 14.5px; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.1); outline: none; }
.input.is-invalid { border-color: var(--danger); }
.field__hint { font-size: 12.5px; color: var(--muted); }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }
.radio-card b { display: block; font-size: 14.5px; }
.radio-card span { color: var(--muted); font-size: 13px; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.autocomplete { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 20; max-height: 260px; overflow-y: auto; }
.autocomplete button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; font-size: 14px; }
.autocomplete button:hover { background: var(--surface-2); }
.autocomplete small { color: var(--muted); }

/* Комбобокс (місто / відділення / вулиця) */
.combo { position: relative; }
.combo__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto; padding: 4px; }
.combo__list--tall { max-height: 340px; }
.combo__item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 9px; font-size: 14px; line-height: 1.35; }
.combo__item b { font-weight: 500; }
.combo__item small { color: var(--muted); font-size: 12.5px; }
.combo__item:hover, .combo__item.is-active { background: var(--primary-50); }
.combo__empty { padding: 12px; color: var(--muted); font-size: 13.5px; }
.radio-cards--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .radio-cards--grid { grid-template-columns: 1fr; } }

/* Успіх замовлення */
.success { max-width: 620px; margin: 40px auto; padding: 40px; text-align: center; }
.success__icon { width: 84px; height: 84px; border-radius: 50%; background: var(--success-50); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.success__icon .i { width: 42px; height: 42px; stroke-width: 2.2; }
.success__icon--wait { background: var(--primary-50); }
.success__icon--fail { background: var(--danger-50); color: var(--danger); }
.success h1 { font-size: 28px; margin-bottom: 10px; }
.order-no { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px dashed #cbd5e1; font-weight: 700; font-size: 18px; margin: 18px 0; font-family: var(--font-head); }

/* Кабінет */
.account { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.account__nav { padding: 10px; }
.account__nav button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 11px 12px; border-radius: 10px; font-weight: 500; color: var(--text-2); }
.account__nav button.is-active, .account__nav button:hover { background: var(--primary-50); color: var(--primary); }
.order-card { padding: 18px; margin-bottom: 12px; }
.order-card__head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.status { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--line-2); color: var(--text-2); }
.status--new { background: #e0edff; color: var(--primary); }
.status--confirmed, .status--processing { background: #fff7e6; color: #b45309; }
.status--shipped { background: #f3e8ff; color: #7c3aed; }
.status--delivered, .status--completed { background: var(--success-50); color: var(--success); }
.status--cancelled { background: var(--danger-50); color: var(--danger); }
.auth-box { max-width: 460px; margin: 30px auto; padding: 28px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line-2); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.seg button { border: 0; background: none; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg button.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* Інфо-сторінки */
.info-hero { padding: 36px; border-radius: 22px; background: radial-gradient(110% 140% at 100% 0%, #1d4ed8 0%, #0b1220 55%); color: #fff; margin-bottom: 26px; }
.info-hero h1 { font-size: 32px; margin: 8px 0 10px; max-width: 760px; }
.info-hero p { color: #cbd5e1; max-width: 720px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.info-card { padding: 22px; }
.info-card__icon { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.info-card h3 { font-size: 17px; margin-bottom: 8px; }
.info-card p { color: var(--muted); font-size: 14px; }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; color: var(--text-2); }
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .i { color: var(--primary); margin-top: 2px; }
.contact-row b { display: block; }
.contact-row span, .contact-row a { color: var(--muted); font-size: 14px; }
.contact-row a:hover { color: var(--primary); }

/* ── Модальні вікна ─────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); animation: fade .2s; }
.modal__dialog { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop .22s ease; }
.modal__dialog.is-wide { max-width: 940px; }
.modal__head { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 16px 12px 24px; border-bottom: 1px solid var(--line-2); z-index: 2; }
.modal__title { font-size: 19px; }
.modal__body { padding: 20px 24px 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.qv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.qv__img { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: #fff; }
.qv__img img { width: 100%; height: 100%; object-fit: contain; }
.qv h2 { font-size: 21px; margin-bottom: 10px; }
.mini-product { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 12px; background: var(--surface-2); border-radius: 14px; margin-bottom: 16px; }
.mini-product img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 10px; }
.mini-product b { display: block; font-size: 14px; line-height: 1.35; }

.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(2,6,23,.92); display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; background: #fff; border-radius: 16px; padding: 20px; }
.lightbox__close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; line-height: 1; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

/* ── Тости ──────────────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 140; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 14px 16px; border-radius: 14px; background: var(--dark); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .2s; }
.toast--error { background: var(--danger); }
.toast--ok .i { color: #4ade80; }
.toast a { color: #93c5fd; font-weight: 600; margin-left: auto; white-space: nowrap; }

/* ── Чат підтримки ──────────────────────────────────────── */
.chat { position: fixed; right: 22px; bottom: 22px; z-index: 100; }
.chat__fab { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px -6px rgba(37,99,235,.55); transition: transform .15s; }
.chat__fab:hover { transform: scale(1.05); }
.chat__fab .i { width: 26px; height: 26px; }
.chat__ico-close { display: none; }
.chat.is-open .chat__ico-open { display: none; }
.chat.is-open .chat__ico-close { display: block; }
.chat__window { position: absolute; right: 0; bottom: 72px; width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 120px); background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop .2s; border: 1px solid var(--line); }
.chat__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 16px 20px; background: var(--dark); color: #fff; }
.chat__head b { display: block; font-size: 15px; }
.chat__head small { color: #94a3b8; font-size: 12.5px; }
.chat__body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat__intro { padding: 20px; overflow-y: auto; }
.chat__intro p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.chat__intro .field { margin-bottom: 12px; }
.chat__thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.bubble small { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.bubble--me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.bubble--op { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble--op b { display: block; font-size: 12px; color: var(--primary); margin-bottom: 2px; }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat__form .input { height: 44px; }
.chat__meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }

/* ── Підвал ─────────────────────────────────────────────── */
.footer { background: var(--dark); color: #94a3b8; padding-top: 52px; margin-top: 30px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer ul { display: grid; gap: 9px; }
.footer a:hover { color: #fff; }
.footer__brand p { margin: 14px 0 18px; max-width: 320px; line-height: 1.6; }
.footer__phone { display: block; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.footer__muted { margin-bottom: 8px; }
.footer__link { display: block; margin-bottom: 14px; }
.footer__social { display: flex; gap: 8px; }
.footer__social a { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.06); color: #e2e8f0; font-size: 13px; font-weight: 600; }
.footer__social a:hover { background: rgba(255,255,255,.12); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.footer__pay { display: flex; gap: 8px; flex-wrap: wrap; }
.footer__pay span { padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); font-size: 12px; }

.tabbar { display: none; }

/* ── Адаптив ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero__side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .cart-btn__text { display: none; }
  .cart-btn { padding: 0; border: 0; }
}
@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .header__catalog span { display: none; }
  .header__catalog { padding: 11px 13px; }
  .grid, .grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-auto-columns: calc((100% - 32px) / 3); }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(90vw, 360px); max-height: none; border-radius: 0; z-index: 110; transform: translateX(-105%); transition: transform .25s; padding-top: 0; }
  .filters.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .filters__head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; padding: 14px 0; border-bottom: 1px solid var(--line); z-index: 2; }
  .filters__apply { position: sticky; bottom: 0; background: #fff; padding: 12px 0 4px; }
  .toolbar__filters-btn { display: inline-flex; }
  .product { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .layout-2 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .mega__inner { grid-template-columns: 240px 1fr; }
  .mega__subs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showroom { grid-template-columns: 1fr; }
  .showroom__img { min-height: 220px; }
  .rail-arrow { display: none; }
}
@media (max-width: 768px) {
  body { font-size: 14.5px; padding-bottom: 64px; }
  .container { padding: 0 16px; }
  .topbar__hide-sm, .topbar__hide-md, .hide-sm { display: none !important; }
  .topbar__inner { min-height: 34px; font-size: 12.5px; }
  .header__inner { gap: 6px; }
  .header__burger { display: inline-flex; margin-left: -8px; }
  .header__catalog { display: none; }
  .logo__mark { width: 34px; height: 34px; }
  .logo__text { font-size: 17px; }
  .search { position: absolute; left: 12px; right: 12px; top: calc(100% + 8px); max-width: none; display: none; box-shadow: var(--shadow-lg); background: #fff; }
  .search.is-open { display: flex; }
  .header__search-toggle { display: inline-flex; }
  .cart-btn { margin-left: 0; }
  .grid, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail { grid-auto-columns: calc((100% - 10px) / 2); gap: 10px; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-card { min-height: 120px; padding: 14px; }
  .cat-card__name { font-size: 15px; max-width: 70%; }
  .cat-card__icon { width: 46px; height: 46px; right: 12px; bottom: 12px; border-radius: 14px; }
  .perks { grid-template-columns: 1fr 1fr; gap: 8px; }
  .perk { padding: 12px; gap: 10px; }
  .perk__icon { width: 38px; height: 38px; }
  .perk div span { display: none; }
  .perk b { font-size: 13px; }
  .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand { height: 76px; }
  .section { margin-top: 34px; }
  .section__title { font-size: 21px; }
  .section__sub { display: none; }
  .slider { min-height: 380px; border-radius: 18px; }
  .slide::before { background: linear-gradient(0deg, rgba(11,18,32,.95) 0%, rgba(11,18,32,.75) 50%, rgba(11,18,32,.15) 100%); }
  .slide__content { padding: 24px 22px 60px; }
  .slide__title { font-size: 26px; }
  .slide__text { font-size: 14.5px; margin-bottom: 18px; }
  .slider__dots { left: 22px; bottom: 26px; }
  .slider__nav { right: 14px; bottom: 14px; }
  .hero__side { grid-template-columns: 1fr 1fr; gap: 10px; }
  .promo-tile { min-height: 140px; padding: 16px; border-radius: 18px; }
  .promo-tile b { font-size: 15px; }
  .promo-tile small { display: none; }
  .cat-card__img { width: 40%; height: 58%; }
  .cat-card__name { max-width: 64%; }
  .pcard__media { padding: 12px; }
  .pcard__media img.is-alt { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .pcard__body { padding: 0 12px 12px; gap: 6px; }
  .pcard__title { font-size: 13.5px; min-height: 38px; }
  .price__now { font-size: 17px; }
  .pcard__buy { width: 40px; height: 40px; border-radius: 11px; }
  .pcard__quick { display: none; }
  .pcard__fav { width: 34px; height: 34px; top: 8px; right: 8px; }
  .page-title { font-size: 24px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__thumbs { flex-direction: row; order: 2; max-height: none; overflow-x: auto; }
  .gallery__thumb { width: 64px; height: 64px; }
  .gallery__main { padding: 18px; border-radius: 18px; }
  .pinfo__title { font-size: 22px; }
  .buybox { padding: 18px; }
  .buybox__price .price__now { font-size: 28px; }
  .keyspecs { grid-template-columns: 1fr; }
  .specs th, .specs td { padding: 10px 12px; font-size: 13.5px; }
  .citem { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .citem__img { width: 72px; height: 72px; }
  .citem__right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .form-grid { grid-template-columns: 1fr; }
  .account { grid-template-columns: 1fr; }
  .account__nav { display: flex; overflow-x: auto; gap: 4px; }
  .account__nav button { white-space: nowrap; width: auto; }
  .info-hero { padding: 24px; }
  .info-hero h1 { font-size: 24px; }
  .info-grid, .contacts { grid-template-columns: 1fr; }
  .qv { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: flex-end; }
  .modal__dialog { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .modal__body { padding: 18px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .deal-banner { flex-direction: column; align-items: flex-start; padding: 22px; }
  .showroom__text { padding: 26px; }
  .chat { right: 14px; bottom: 76px; }
  .chat__fab { width: 52px; height: 52px; }
  .chat__window { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; height: 85vh; max-height: none; border-radius: 22px 22px 0 0; }
  .toasts { left: 12px; right: 12px; bottom: 76px; }
  .toast { min-width: 0; max-width: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a.is-active { color: var(--primary); }
  .tabbar .badge { top: 3px; right: calc(50% - 22px); }
}
@media (max-width: 400px) {
  .logo__text { font-size: 15px; }
  .icon-btn { width: 40px; height: 40px; }
  .buybox__actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Серверний (SEO) рендер — видно лише до запуску JS або без JS */
.ssr { padding: 24px 16px 40px; }
.ssr h1 { font-size: clamp(22px, 3vw, 30px); margin: 14px 0 12px; }
.ssr h2 { font-size: 18px; margin: 22px 0 10px; }
.ssr img { max-width: 100%; height: auto; border-radius: 12px; background: #fff; }
.ssr-links { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; }
.ssr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 0; list-style: none; }
.ssr-card { background: #fff; border: 1px solid #e5e8ef; border-radius: 12px; padding: 10px; font-size: 14px; }
.ssr-card a { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.ssr-card img { aspect-ratio: 1; object-fit: contain; width: 100%; }
.ssr-price b { font-size: 24px; }
.ssr-product table { border-collapse: collapse; width: 100%; max-width: 760px; font-size: 14px; }
.ssr-product th, .ssr-product td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.ssr-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.ssr-pages a { padding: 4px 10px; border: 1px solid #e5e8ef; border-radius: 8px; }
.footer__legal:not(:empty)::before { content: " · "; }
