/* Грубка — стилі (демо-концепт) */
:root {
  --graphite: #26292E;
  --graphite-2: #31353B;
  --graphite-3: #454A52;
  --ink: #1E2024;
  --ink-2: #4A4F57;
  --muted: #646972;
  --steel: #EBECEE;
  --steel-2: #F5F5F6;
  --line: #D8DADE;
  --fire: #FF6B1A;
  --fire-d: #E85A0C;
  --ember: #FFB46B;
  --ember-soft: #FFF1E6;
  --white: #FFFFFF;
  --danger: #B3261E;
  --ok: #2E7D4F;

  --display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --head-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body {
  margin: 0; font-family: var(--text); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: var(--steel-2); overflow-x: clip; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(255, 107, 26, .2); touch-action: manipulation;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.1; text-wrap: balance; letter-spacing: .005em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--fire); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 900px) { .wrap { padding-inline: 40px; } }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Демо-плашка */
.demo-bar { background: var(--ember-soft); color: #6A2C05; text-align: center; font-size: 14px; font-weight: 600; padding: 6px 12px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 30; background: var(--graphite); color: var(--white); border-bottom: 1px solid #3A3E45; }
.top__in { display: flex; align-items: center; gap: 24px; min-height: var(--head-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo__mark { width: 38px; height: 38px; }
.logo__name { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1; display: flex; flex-direction: column; }
.logo__name small { font-family: var(--text); font-weight: 400; font-size: 13px; color: #B9BDC3; margin-top: 3px; }
.nav { display: none; gap: 22px; margin-left: 12px; }
.nav a { text-decoration: none; color: #D6D8DC; font-size: 16px; padding: 6px 0; }
.top__phone { display: none; margin-left: auto; font-weight: 700; text-decoration: none; font-size: 17px; white-space: nowrap; }
.cart-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px;
  border-radius: 10px; border: 0; background: var(--graphite-3); color: var(--white); font-weight: 600; position: relative;
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-btn__count {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--fire); color: var(--ink);
  font-size: 14px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.cart-btn__count.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.3); } }
@media (min-width: 760px) { .top__phone { display: block; } .cart-btn { margin-left: 0; } }
@media (min-width: 1280px) { .nav { display: flex; } }
.nav a, .top__phone, .cart-btn { white-space: nowrap; }
@media (max-width: 420px) { .cart-btn__label { display: none; } .logo__name small { display: none; } }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  border-radius: 10px; font-weight: 700; font-size: 17px; text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.btn--fire { background: var(--fire); color: var(--ink); }
.btn--ghost { border-color: #6A7078; color: var(--white); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Герой */
.hero { background: var(--graphite); color: var(--white); overflow: hidden; }
.hero__in { display: grid; gap: 8px; padding-top: 36px; }
.hero__place { color: var(--ember); font-weight: 600; font-size: 16px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 9.4vw, 66px); font-weight: 600; max-width: 14ch; }
.hero__lead { margin-top: 18px; color: #D0D3D8; font-size: 18px; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__cta .btn { flex: 1 1 220px; }
.hero__art { position: relative; display: grid; place-items: center; min-height: 230px; }
.hero__art img { position: relative; width: min(56%, 220px); }
@media (min-width: 900px) { .hero__art img { width: min(78%, 330px); } }
.glow {
  position: absolute; width: 92%; aspect-ratio: 1; max-width: 460px; border-radius: 50%;
  background: radial-gradient(closest-side, #FF8A3D 0%, #E85A0C 28%, rgba(232, 90, 12, .25) 55%, rgba(38, 41, 46, 0) 72%);
}
.promises { list-style: none; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding-block: 0 0; }
.promises li { padding: 18px 0 22px; border-top: 1px solid #40444B; display: flex; flex-direction: column; gap: 2px; padding-right: 12px; }
.promises b { font-family: var(--display); font-weight: 500; font-size: 20px; color: var(--white); }
.promises span { color: #B9BDC3; font-size: 15px; line-height: 1.4; }
@media (min-width: 900px) {
  .hero__in { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 56px; padding-bottom: 24px; }
  .hero__art { min-height: 460px; }
  .promises { grid-template-columns: repeat(4, 1fr); margin-top: 8px; }
}

/* Каталог */
.catalog { padding: 56px 0 64px; }
.sec-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 26px; }
.sec-head h2, .info h2, .faq h2, .contacts h2 { font-size: clamp(32px, 6vw, 46px); }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 6px; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--line);
  background: var(--white); font-weight: 600; font-size: 16px; color: var(--ink-2);
}
.tab[aria-selected="true"] { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.tab span { color: var(--muted); font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] span { color: var(--ember); }
@media (min-width: 900px) {
  .sec-head { flex-direction: row; align-items: end; justify-content: space-between; }
  .tabs { margin: 0; padding: 2px; }
}
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.card { background: var(--white); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #E2E3E6; }
.card__img { position: relative; background: linear-gradient(180deg, #F1F2F4, #E4E6E9); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.card__img img { width: 68%; height: 88%; object-fit: contain; }
.badge { position: absolute; left: 14px; top: 14px; padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 14px; }
.badge--hit { background: var(--graphite); color: var(--white); }
.badge--sale { background: var(--fire); color: var(--ink); }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__cat { font-size: 14px; color: var(--muted); }
.card h3 { font-family: var(--text); font-weight: 700; font-size: 19px; line-height: 1.3; }
.card ul { margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15.5px; }
.card li { padding-left: 14px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 2px; background: var(--fire); }
.card__buy { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { display: flex; flex-direction: column; line-height: 1.1; }
.price b { font-family: var(--display); font-weight: 600; font-size: 28px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price s { color: var(--muted); font-size: 15px; white-space: nowrap; }
.card .btn { min-height: 48px; padding: 0 22px; }
@media (max-width: 400px) { .card__buy { flex-direction: column; align-items: stretch; } .card .btn { width: 100%; } }
.note { margin-top: 22px; color: var(--muted); font-size: 15.5px; }

/* Консультація */
.consult { background: var(--graphite); color: var(--white); padding: 56px 0; position: relative; overflow: hidden; }
.consult::before { content: ""; position: absolute; right: -160px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 107, 26, .35), rgba(255, 107, 26, 0) 70%); }
.consult__in { position: relative; display: grid; gap: 28px; }
.consult h2 { font-size: clamp(30px, 6vw, 44px); max-width: 16ch; }
.consult p { color: #D0D3D8; margin-top: 14px; max-width: 50ch; }
.lead { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .consult__in { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
  .lead { grid-template-columns: 1fr 1fr; align-items: end; }
  .lead .btn, .lead .form-msg { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input {
  min-height: 50px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white);
  font: inherit; font-size: 17px; color: var(--ink); width: 100%;
}
.field input:focus-visible { outline: 3px solid var(--fire); outline-offset: 1px; border-color: var(--fire); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 14.5px; }
.consult .field label { color: var(--white); }
.consult .field .err { color: #FFB3A8; }
.form-msg { font-size: 15.5px; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.is-ok { color: var(--ok); font-weight: 600; }
.form-msg.is-err { color: var(--danger); font-weight: 600; }
.consult .form-msg.is-ok { color: #9FE0B5; }
.consult .form-msg.is-err { color: #FFB3A8; }
.form-msg a { font-weight: 700; white-space: nowrap; }

/* Доставка й гарантія */
.info { padding: 64px 0; }
.info__in { display: grid; gap: 20px; }
.info__col { background: var(--white); border-radius: 14px; padding: 28px 22px; border: 1px solid #E2E3E6; }
.info__col--warm { background: var(--ember-soft); border-color: #F7D9C2; }
.terms { margin: 22px 0 0; display: grid; gap: 18px; }
.terms dt { font-weight: 700; font-size: 18px; }
.terms dd { margin: 2px 0 0; color: var(--ink-2); }
@media (min-width: 900px) { .info__in { grid-template-columns: 1fr 1fr; gap: 24px; } .info__col { padding: 36px 36px; } .info h2 { font-size: 38px; } }

/* FAQ */
.faq { padding: 8px 0 64px; }
.faq__in { display: grid; gap: 22px; }
@media (min-width: 900px) { .faq__in { grid-template-columns: .7fr 1.3fr; gap: 40px; } }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 44px 18px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--fire-d); border-bottom: 2.5px solid var(--fire-d); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); max-width: 64ch; }

/* Контакти */
.contacts { background: var(--steel); padding: 56px 0 64px; }
.contacts__grid { display: grid; gap: 22px; margin-top: 24px; }
@media (min-width: 900px) { .contacts__grid { grid-template-columns: repeat(3, 1fr); } }
.k { color: var(--muted); font-size: 15px; }
.big { font-family: var(--display); font-weight: 600; font-size: 34px; text-decoration: none; }
.big-s { font-weight: 700; font-size: 20px; }
.muted { color: var(--muted); font-size: 15.5px; }

.foot { background: var(--graphite); color: #C6C9CE; padding: 26px 0 100px; padding-right: 0; font-size: 15px; }
.foot__in { display: flex; flex-direction: column; gap: 6px; }
.foot b { color: var(--white); }
.foot__demo { color: var(--ember); }
@media (min-width: 900px) { .foot { padding-bottom: 28px; } .foot__in { flex-direction: row; justify-content: space-between; } }

/* Плаваюча кнопка дзвінка — тільки мобільний */
.call-fab {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
  background: var(--fire); color: var(--ink); font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 18px rgba(38, 41, 46, .35);
}
.call-fab svg { width: 20px; height: 20px; }
@media (min-width: 900px) { .call-fab { display: none; } }

/* Кошик */
.scrim { position: fixed; inset: 0; background: rgba(20, 22, 25, .55); z-index: 40; }
.cart {
  position: fixed; z-index: 41; inset: 0; background: var(--white); display: flex; flex-direction: column;
  overscroll-behavior: contain;
}
.cart:not([hidden]) { animation: slide .25s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@media (min-width: 700px) { .cart { left: auto; width: 440px; box-shadow: -12px 0 40px rgba(0, 0, 0, .25); } }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 22px; background: var(--graphite); color: var(--white); }
.cart__head h2 { font-size: 26px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }
.cart__view { flex: 1; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.cart__list { list-style: none; margin: 0; padding: 4px 22px; flex: 1; }
.line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line__img { width: 72px; height: 72px; border-radius: 10px; background: var(--steel); display: grid; place-items: center; }
.line__img img { width: 80%; height: 80%; object-fit: contain; }
.line__name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.line__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; }
.qty button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 20px; font-weight: 700; border-radius: 8px; }
.qty output { min-width: 32px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.line__sum { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line__del { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 14.5px; padding: 6px 0; min-height: 32px; }
.cart__empty { padding: 40px 22px; display: grid; gap: 16px; justify-items: start; }
.cart__foot { padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--steel-2); display: grid; gap: 12px; position: sticky; bottom: 0; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; }
.cart__total b { font-family: var(--display); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout { padding-top: 8px; }
.checkout > .field, .checkout > .pay, .checkout > .back { margin-inline: 22px; }
.checkout > .field { margin-top: 14px; }
.back { align-self: flex-start; border: 0; background: none; color: var(--ink-2); text-decoration: underline; padding: 10px 0; min-height: 44px; }
.pay { border: 0; padding: 0; margin-top: 18px; margin-bottom: 20px; display: grid; gap: 8px; }
.pay legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.pay label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.pay label:has(input:checked) { border-color: var(--fire); background: var(--ember-soft); }
.pay input { width: 20px; height: 20px; accent-color: var(--fire-d); flex-shrink: 0; }
.done { padding: 40px 22px; gap: 14px; }
.done h3 { font-size: 30px; }
.done p { color: var(--ink-2); }
.done .btn { justify-self: start; align-self: flex-start; margin-top: 8px; }

/* Сповіщення «Додано в кошик» */
.toast {
  position: fixed; z-index: 35; left: 12px; right: 12px; max-width: 420px; margin: 0 auto;
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--graphite); color: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); border-left: 4px solid var(--fire);
}
.toast:not([hidden]) { animation: toastIn .25s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.toast__text { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 15.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast__btn { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--fire); color: var(--ink); font-weight: 700; white-space: nowrap; }
@media (min-width: 900px) { .toast { bottom: 28px; left: auto; right: 28px; width: 420px; margin: 0; } }

/* Hover — тільки для миші, щоб на тачі кнопки не «залипали» */
@media (hover: hover) {
  .nav a:hover { color: var(--white); }
  .cart-btn:hover { background: #50565F; }
  .btn--fire:hover { background: var(--fire-d); }
  .btn--ghost:hover { border-color: var(--white); }
  .btn--line:hover { background: var(--ink); color: var(--white); }
  .tab:hover { border-color: var(--ink-2); }
  .big:hover { color: var(--fire-d); }
  .icon-btn:hover { background: var(--graphite-3); }
  .qty button:hover { background: var(--steel); }
  .line__del:hover { color: var(--danger); }
}
