/* css/menu.css — DESTROY клієнтське меню */

:root {
  --bg: #0a0a0a;
  --card-1: #161616;
  --card-2: #0c0c0c;
  --text: #fff;
  --text-dim: #9a9a9a;
  --text-muted: #555;
  --lime: #CDF869;
  --red: #D42B2B;
  --font-display: 'Alumni Sans', 'Arial Black', sans-serif;
  --fs-alumni-scale: 1.4;
  --font-heavy: 'Arial Black', 'Helvetica', sans-serif;
  --font-body: 'Montserrat', Arial, sans-serif;
  /* Контейнер контенту меню — компактніший за index, щоб картки лягали щільно. */
  --mw: 720px;
  --rd: 8px;
  --g: var(--lime);
  --r: var(--red);
  --t: #fff;
  --t3: #bbb;
  --t4: #888;
  --font-head: var(--font-display);
  --nav-scroll-pad: 0px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { background: var(--bg); }

body {
  margin: 0 auto;
  padding: 0;
  /* Sticky header — у flow, padding-top не потрібен. */
  padding-top: 0;
  max-width: var(--mw);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh;
  /* iOS/TG in-app — dvh стабільніша при появі/зникненні тулбарів */
  min-height: 100dvh;
}

/* ─── Хедер у Telegram in-app браузері ─── */
/* site-nav.css ставить .hdr position:fixed → у TG in-app з'являлись артефакти
   з висотою вьюпорту і безпечними зонами. Sticky тримається в flow і коректно
   реагує на динамічну висоту in-app браузера. */
body.menu-page .hdr {
  position: sticky;
  top: 0;
  height: auto;   /* slot-сторінка: базовий .hdr тепер height:0 (overlay); тут повертаємо слот, щоб хедер не накладався на меню */
}
/* На menu-page лого видно одразу (без слайд-анімації з -100% при завантаженні) */
body.menu-page .hdr-slide {
  transform: translateY(0) !important;
}
/* Safe-area-inset-top — щоб лого не ховався під системний бар iOS/TG */
body.menu-page .hdr-in {
  padding-top: max(10px, env(safe-area-inset-top, 0px));
}


img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ─── Компактна шапка: «МЕНЮ» + вкладки в одному рядку ─── */
.m-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.m-title-accent {
  flex-shrink: 0;
  color: var(--red);
  font-family: var(--font-display);  /* Alumni Sans */
  font-weight: 600;                   /* SemiBold */
  font-size: 27px;
  line-height: 1;
  letter-spacing: 3px;
}

/* ─── Вкладки розділів меню — сегментований вигляд як .vt-qa у Вітрині ─── */
/* Активний сегмент залитий НЕЙТРАЛЬНО (не лайм), неактивний приглушений. */
.m-tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.m-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;                 /* гострі кути — у дусі Вітрини .vt-qa */
  padding: 10px 14px;
  color: var(--text-dim);
  font-family: var(--font-display);   /* Alumni Sans */
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1.5px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.m-tab.active {
  background: #2c2c2c;                 /* нейтральна заливка, НЕ лайм */
  border-color: #2c2c2c;
  color: #f0f0f0;
}

/* Мобільний: «МЕНЮ» дрібніше зверху, таби тісним рядком під ним */
@media (max-width: 560px) {
  .m-title {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .m-title-accent { font-size: 22px; }
  .m-tabs { gap: 6px; }
  .m-tab { flex: 1; padding: 9px 8px; font-size: 14px; letter-spacing: 1px; }
}

/* ─── Site-nav compact mode (зменшення лого на скролі) ─── */
.hdr-brand img { transition: height 0.25s ease; }
.hdr-in { transition: padding 0.25s ease; }
.hdr-brand .hdr-sub { transition: opacity 0.18s ease, max-height 0.25s ease; }

.hdr.hdr-compact .hdr-brand img { height: 36px !important; }
@media (min-width: 768px) {
  .hdr.hdr-compact .hdr-brand img { height: 42px !important; }
}
.hdr.hdr-compact .hdr-in { padding-top: 6px; padding-bottom: 6px; }
.hdr.hdr-compact .hdr-brand .hdr-sub {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}

/* (Force-visible тепер у блоці sticky-override вище) */
/* Прибрати .on на пункті "Про DESTROY" (на цій сторінці ми не на /about) */
body.menu-page .mmenu .mmenu-links a.on { color: #f2f2f2 !important; }

/* Бургер-меню — суцільний чорний фон (site-nav має linear-gradient 0.98 → крізь нього
   ледь просвічувався контент і назви секцій візуально «налазили» на пункти меню). */
body.menu-page .mmenu {
  background: #0a0a0a !important;
}

/* Пункти меню — більше повітря між рядками, читабельніше */
@media (max-width: 1199px) {
  body.menu-page .mmenu .mmenu-links a {
    padding-top: 20px;
    padding-bottom: 20px;
    letter-spacing: 0.1em;
  }
}

/* Десктоп: нав НЕ прив'язана до ширини карток (--mw 720) — нав має свій
   широкий контейнер ~1080px щоб усі 8 пунктів вмістились у один рядок
   і "Контакти" не злітали на нову лінію. */
@media (min-width: 1200px) {
  body.menu-page .mmenu .mmenu-links {
    max-width: min(1080px, calc(100% - 32px));
    gap: 8px 18px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ─── Group ─── */
.m-group { padding: 18px 10px 4px; }
@media (min-width: 600px) {
  .m-group { padding: 22px 14px 6px; }     /* десктоп: повертаємо комфорт */
}

.m-group-title {
  margin: 0 0 14px;
  font-family: var(--font-display);  /* Alumni Sans */
  font-weight: 600;                   /* SemiBold */
  font-size: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}

/* Навчальний рядок під заголовком «Готові набори» */
.m-group-edu {
  margin: -8px 0 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--text-2, #b9b9b9);
}


.m-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* 2 колонки на мобільному — крупні картинки */
  gap: 10px;
  align-items: end;
}

@media (min-width: 600px) {
  .m-group-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 колонки на планшеті/десктопі */
    gap: 12px;
  }
}

/* Нотатка про переробку під гридом Тиру */
.m-tir-recycle {
  margin: 14px 2px 0;
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.m-tir-skel { padding: 20px 2px; color: #6f6f6f; font-size: 13px; }


/* Spacer щоб бара не перекривала останній ряд */
.m-spacer { height: 30px; }

/* ─── Sticky bar ─── */
/* [hidden] має перемагати display:flex — бар лише коли qty>0 (інакше висить «порожньо»). */
.m-bar[hidden] { display: none; }

.m-bar {
  position: sticky;
  /* --dcb-h — висота cookie-банера (ставить menu.js). Бар стоїть рівно над банером;
     на дисмісі (--dcb-h→0) плавно осідає на низ. */
  bottom: var(--dcb-h, 0px);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border-top: 1px solid #1a1a1a;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  transition: bottom 0.34s cubic-bezier(.22, 1, .36, 1);
}

/* Поки кошик відкритий — ховаємо cookie-смужку, щоб не перекривала кошик/CTA.
   Банер лишається в DOM (логіку згоди не чіпаємо), CSS лише приховує. */
body.cart-open .dcb { display: none; }

.m-bar-sum {
  flex: 1;
  min-width: 0;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 10px;
}
.m-bar-sum.has-items { cursor: pointer; }

.m-bar-cart-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
}
.m-bar-cart-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.m-bar-sum.has-items .m-bar-cart-icon { color: #8a8a8a; }
.m-bar-sum.has-items:hover .m-bar-cart-icon { transform: scale(1.06); }

.m-bar-text {
  flex: 1;
  min-width: 0;
}

.m-bar-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.m-bar-num {
  display: inline-block;
  transform-origin: left center;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.m-bar-cur { color: var(--text-muted); font-size: 18px; }

.m-bar-chevron {
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.25s ease;
  display: inline-block;
}
.m-bar-chevron[hidden] { display: none; }
.m-bar-chevron.up { transform: rotate(180deg); color: #8a8a8a; }

@keyframes m-bar-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.m-bar-num.pulse { animation: m-bar-pulse 0.22s ease-out; }

.m-bar-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ─── CTA (копія btn-gh з index.html, адаптовано на 2 рядки) ─── */
.m-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 18px;
  min-width: 156px;
  border-radius: 10px;
  border: 2px solid rgba(205, 248, 105, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: background .22s, color .22s, border-color .22s, opacity .25s;
  font-family: var(--font-body);
  font-weight: 800;
}

.m-cta::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: rgba(205, 248, 105, 0.14);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: -1;
}

.m-cta-1 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}
.m-cta-2 {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--lime);
  -webkit-text-stroke: 1.5px #0a0a0a;
  text-shadow:
    -1px -1px 0 #0a0a0a,
     1px -1px 0 #0a0a0a,
    -1px  1px 0 #0a0a0a,
     1px  1px 0 #0a0a0a;
}

/* Tremble — як .btn-gh у index (2.35s) */
@keyframes m-cta-tremble {
  0%,100% { transform: translate(0,0) rotate(0); }
  25%     { transform: translate(0.4px,-0.3px) rotate(-0.4deg); }
  50%     { transform: translate(-0.3px,0.4px) rotate(0.35deg); }
  75%     { transform: translate(0.3px,0.3px) rotate(-0.3deg); }
}
@keyframes m-cta-tremble-hi {
  0%,100% { transform: translate(0,0) rotate(0); }
  20%     { transform: translate(0.7px,-0.5px) rotate(-0.7deg); }
  40%     { transform: translate(-0.7px,0.6px) rotate(0.7deg); }
  60%     { transform: translate(0.6px,0.4px) rotate(-0.6deg); }
  80%     { transform: translate(-0.5px,-0.4px) rotate(0.5deg); }
}

.m-cta:not(:disabled) {
  animation: m-cta-tremble 2.35s ease-in-out infinite;
}

.m-cta:not(:disabled):hover,
.m-cta:not(:disabled):focus-visible {
  background: var(--lime);
  color: #101804;
  border-color: var(--lime);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
  animation: m-cta-tremble-hi 0.68s ease-in-out infinite !important;
  outline: none;
}
.m-cta:not(:disabled):hover::before,
.m-cta:not(:disabled):focus-visible::before { opacity: 1; }
.m-cta:not(:disabled):hover .m-cta-2,
.m-cta:not(:disabled):focus-visible .m-cta-2 {
  color: #101804;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.m-cta:disabled {
  opacity: 0.35;
  pointer-events: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .m-cta:not(:disabled) { animation: none !important; }
}

/* ─── Edit mode (?edit=1) ─── */
.m-edit-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--card-1);
  border-bottom: 2px solid var(--lime);
}
.m-edit-bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.m-edit-bar-title {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lime);
}
.m-edit-copy {
  background: var(--lime);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.m-edit-out {
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px;
  color: #fff;
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  min-height: 0;
  height: 0;
  resize: vertical;
  width: 100%;
  outline: none;
  transition: height 0.2s ease, padding 0.2s ease;
}
.m-edit-out.show {
  min-height: 180px;
  height: 180px;
  padding: 8px;
}

.m-edit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1a1a1a;
}
.m-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-edit-label {
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 700;
  min-width: 14px;
  text-transform: uppercase;
}
.m-edit-slider {
  flex: 1;
  min-width: 0;
  accent-color: var(--lime);
  height: 18px;
}
.m-edit-val {
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--lime);
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

/* ─── Cart bottom-sheet (відкривається кліком на суму) ─── */
.m-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 70;
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.32s ease;
}
.m-cart-backdrop[hidden] { display: none; }
.m-cart-backdrop.open { opacity: 1; }

.m-cart {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: min(var(--mw), 100%);
  z-index: 71;
  background: var(--card-1);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* Легкий overshoot на виїзд (cubic-bezier з ease-out-back) — корзина "м'яко осідає". */
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.55);
}
.m-cart[hidden] { display: none; }
.m-cart.open { transform: translateX(-50%) translateY(0); }

.m-cart-handle {
  width: 40px;
  height: 4px;
  background: #2a2a2a;
  border-radius: 999px;
  margin: 8px auto 0;
  flex-shrink: 0;
}

.m-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 10px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.m-cart-title {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.m-cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(.22,1,.36,1), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.m-cart-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.m-cart-close:hover {
  transform: rotate(90deg);
  background: rgba(212, 43, 43, 0.14);
  border-color: rgba(212, 43, 43, 0.45);
  box-shadow: 0 0 14px rgba(212, 43, 43, 0.18);
}
.m-cart-close:active { transform: rotate(90deg) scale(0.94); }

.m-cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

/* ─── Нейтральна смужка «2 простори» (лише коли обидві секції непорожні) ─── */
/* Розбивка предметів по категоріях (склад усього кошика). Назви — приглушені, лічильники — лайм. */
.m-cart-breakdown {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.5;
}
.m-cart-breakdown b {
  color: #cdf869;
  font-weight: 700;
}
.m-cart-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d8d8d8;
  font-size: 12px;
  line-height: 1.4;
}
.m-cart-note svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: var(--text-dim);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Дві секції: на десктопі поруч у дві колонки, на мобільному стовпчиком ─── */
.m-cart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 700px) {
  .m-cart-grid { grid-template-columns: 1fr 1fr; }
}
.m-cart-section {
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #0d0d0d;
  padding: 6px 12px 12px;
}
.m-cart-section:only-child { grid-column: 1 / -1; }

.m-cart-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.m-cart-section-title {
  font-family: var(--font-display);   /* Alumni Sans — нейтральний приглушений kicker */
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 0 2px;
}
/* Хрестик — прибрати всю секцію (приглушений) */
.m-cart-section-x {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-dim);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}
.m-cart-section-x svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.m-cart-section-x:hover { color: #e5e5e5; border-color: #3a3a3a; }

/* Підсумок секції — приглушений білий (НЕ лайм) */
.m-cart-section-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  color: #cfcfcf;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

/* Тиха підказка мінімуму Тиру — приглушена, НЕ червона, бронювання не блокує */
.m-cart-section-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
}
.m-cart-section-hint svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Інлайн-підтвердження: показуємо лише в секції з .is-confirming */
.m-cart-section-confirm { display: none; padding: 8px 0 4px; }
.m-cart-section.is-confirming .m-cart-section-head,
.m-cart-section.is-confirming .m-cart-section-rows,
.m-cart-section.is-confirming .m-cart-section-hint,
.m-cart-section.is-confirming .m-cart-section-sub { display: none; }
.m-cart-section.is-confirming .m-cart-section-confirm { display: block; }
.m-cart-confirm-q {
  display: block;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.m-cart-confirm-btns { display: flex; gap: 8px; }
.m-cart-confirm-btns button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.m-cart-confirm-yes {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
}
.m-cart-confirm-no {
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  color: #d8d8d8;
}

.m-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.m-cart-row-name {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-cart-row-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.m-cart-row-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #0c0c0c;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.m-cart-row-btn:active { transform: scale(0.94); }

.m-cart-row-qty {
  min-width: 26px;
  text-align: center;
  color: #fff;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.m-cart-row-sum {
  color: #f0f0f0;                 /* було лайм — лайм лишаємо тільки на фінальній сумі/CTA */
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 72px;
  text-align: right;
  flex-shrink: 0;
}

.m-cart-empty {
  text-align: center;
  padding: 30px 16px;
  color: #555;
  font-size: 14px;
}

/* Cart-foot всередині кошика — виїжджає з затримкою після cart-sheet */
.m-cart-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  flex-shrink: 0;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.4s 0.18s cubic-bezier(.22, 1, .36, 1), opacity 0.4s 0.18s;
}
.m-cart.open .m-cart-foot {
  transform: translateY(0);
  opacity: 1;
}

.m-cart-foot-sum {
  flex: 1;
  min-width: 0;
}
.m-cart-foot-num {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.m-cart-foot-cur {
  color: var(--text-muted);
  font-size: 16px;
}
.m-cart-foot-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Кнопка checkout у cart-foot — той самий стиль що .m-cta */
.m-cart-checkout {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--lime);
  color: #101804;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 18px;
  min-width: 150px;
  border-radius: 10px;
  border: 2px solid var(--lime);
  box-shadow: 0 4px 18px rgba(205, 248, 105, 0.22);
  font-family: var(--font-body);
  font-weight: 800;
  flex-shrink: 0;
  transition: filter 0.2s, transform 0.1s;
}
.m-cart-checkout:hover { filter: brightness(1.06); }
.m-cart-checkout:active { transform: scale(0.97); }
.m-cart-checkout:disabled { opacity: 0.4; pointer-events: none; }

.m-cart-checkout .m-cta-2 {
  /* Чорна обводка лайму на лаймовому тлі — прибираємо, текст і так чорний */
  color: #101804;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* ─── Booking modal ─── */
.m-bk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.25s;
}
.m-bk-backdrop[hidden] { display: none; }
.m-bk-backdrop.open { opacity: 1; }

.m-bk {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: min(480px, 100%);
  z-index: 91;
  background: var(--card-1);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  max-height: 90vh;
  overflow-y: auto;
}
.m-bk[hidden] { display: none; }
.m-bk.open { transform: translateX(-50%) translateY(0); }

.m-bk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.m-bk-title {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.m-bk-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 4px 8px;
}

.m-bk-form { display: flex; flex-direction: column; gap: 12px; }
.m-bk-field { display: flex; flex-direction: column; gap: 6px; }
.m-bk-lbl {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.m-bk-lbl em { color: var(--red); font-style: normal; }

.m-bk-form input[type=tel],
.m-bk-form input[type=text],
.m-bk-form textarea {
  background: var(--card-2);
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.m-bk-form input:focus,
.m-bk-form textarea:focus { border-color: var(--lime); }
.m-bk-form textarea { resize: none; }

.m-bk-err {
  font-size: 12px;
  color: var(--red);
}
.m-bk-err[hidden] { display: none; }

.m-bk-tabs {
  display: flex;
  gap: 8px;
}
.m-bk-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card-2);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px 6px;
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: opacity .2s, border-color .2s, background .2s;
}
.m-bk-tab svg { width: 24px; height: 24px; fill: currentColor; }
.m-bk-tab[data-channel="telegram"] { color: #2aabee; }
.m-bk-tab[data-channel="viber"]    { color: #7d4cc4; }
.m-bk-tab[data-channel="call"]     { color: var(--lime); }
.m-bk-tab span { color: #f0f0f0; }
.m-bk-tab:hover { border-color: #3a3a3a; }
/* Неактивні поки номер невалідний — тьмяні, але клікабельні (клік → ввід номера) */
.m-bk-tab.is-locked { opacity: .4; }
.m-bk-tab.is-sending { opacity: .6; pointer-events: none; animation: none !important; }
.m-bk-tab:active { transform: scale(0.96); }

/* Геймифікація: активні кнопки звʼязку м'яко світяться по черзі (chase) — манять клік.
   Плавне дихання glow + ледь помітна обводка бренд-кольором, без різкого підйому. */
@keyframes m-bk-tab-blink {
  0%, 100% { border-color: #2a2a2a; box-shadow: 0 0 0 0 rgba(0,0,0,0); }
  50%      { border-color: currentColor; box-shadow: 0 0 9px -1px currentColor; }
}
.m-bk-tab.is-live { animation: m-bk-tab-blink 3.6s ease-in-out infinite; }
.m-bk-tab.is-live:nth-child(1) { animation-delay: 0s; }
.m-bk-tab.is-live:nth-child(2) { animation-delay: 1.2s; }
.m-bk-tab.is-live:nth-child(3) { animation-delay: 2.4s; }

/* М'яка пульсуюча обводка поля номера — поки номер невалідний і поле не у фокусі. */
@keyframes m-bk-phone-pulse {
  0%, 100% { border-color: #2a2a2a; box-shadow: 0 0 0 0 rgba(205,248,105,0); }
  50%      { border-color: rgba(205,248,105,.55); box-shadow: 0 0 0 3px rgba(205,248,105,.12); }
}
.m-bk-form input[type=tel].pulse:not(:focus) {
  animation: m-bk-phone-pulse 1.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .m-bk-tab.is-live,
  .m-bk-form input[type=tel].pulse:not(:focus) { animation: none; }
  .m-bk-tab:active { transform: none; }
}

/* ─── Toast ─── */
.m-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  z-index: 95;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--card-1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #2a2a2a;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 90vw;
  text-align: center;
}
.m-toast[hidden] { display: none; }
.m-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.m-toast.ok  { border-color: #3a3a3a; }
.m-toast.err { border-color: var(--red); }

/* ─── Booking: наповнення кімнати (згортний підсумок у попапі) ─── */
.m-bk-fill{margin:0 0 14px;border:1px solid #242329;border-radius:2px;overflow:hidden}
.m-bk-fill-head{display:flex;align-items:center;gap:10px;width:100%;padding:13px 14px;background:transparent;border:none;cursor:pointer;font:inherit;color:#f0f0f0;text-align:left}
.m-bk-fill-label{flex:1;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:#a3a3a3}
.m-bk-fill-total{font-weight:700;font-size:15px;color:#f0f0f0}
.m-bk-fill-chev{color:#7f7f7f;font-size:13px;transition:transform .2s}
.m-bk-fill.open .m-bk-fill-chev{transform:rotate(180deg)}
.m-bk-fill[data-empty="1"] .m-bk-fill-chev{display:none}
.m-bk-fill-list{padding:2px 14px 12px;border-top:1px solid #242329}
.m-bk-fill-sec{margin-top:10px}
.m-bk-fill-sec-t{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:#7f7f7f;margin-bottom:5px}
.m-bk-fill-row{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:3px 0;color:#bbb}
.m-bk-fill-row b{color:#f0f0f0;font-weight:500}
.m-bk-fill-sub{font-size:12px;color:#a3a3a3;margin-top:5px;text-align:right}
.m-bk-fill-empty{padding:12px 14px;font-size:13px;color:#a3a3a3;line-height:1.55;border-top:1px solid #242329}

/* ── Картка набору: кнопка «Склад набору» (другорядна, під ціною) ── */

/* ── Попап «Склад набору»: bottom-sheet на мобайлі, центр-модал на десктопі ── */
.m-sklad-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.62);opacity:0;transition:opacity .25s;z-index:92}
.m-sklad-backdrop.open{opacity:1}
.m-sklad{position:fixed;left:50%;bottom:0;transform:translate(-50%,100%);width:min(560px,100%);max-height:82vh;display:flex;flex-direction:column;background:#131313;border:1px solid #262626;border-bottom:0;border-radius:18px 18px 0 0;z-index:93;transition:transform .3s cubic-bezier(.22,1,.36,1)}
.m-sklad.open{transform:translate(-50%,0)}
/* Закритий попап МАЄ вийти з layout, інакше display:flex перебиває [hidden] і прозорий
   елемент ловить усі кліки. hideOverlay ставить [hidden] ПІСЛЯ фейду → анімація ціла. */
.m-sklad[hidden]{display:none!important}
.m-sklad-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 10px;flex-shrink:0}
.m-sklad-title{font-family:'Alumni Sans',sans-serif;font-weight:800;text-transform:uppercase;letter-spacing:.4px;font-size:calc(14px * var(--fs-alumni-scale));color:#fff}
.m-sklad-close{background:none;border:0;width:34px;height:34px;cursor:pointer;color:#aaa;flex-shrink:0}
.m-sklad-close svg{width:20px;height:20px;stroke:currentColor;stroke-width:2;fill:none}
.m-sklad-grid{overflow-y:auto;-webkit-overflow-scrolling:touch;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:0 16px 22px;align-content:start}
.m-sklad-cell{position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;background:#1a1a1a;border:1px solid #262626;border-radius:10px;padding:6px 5px;overflow:hidden}
.m-sklad-cname{font-size:9.5px;line-height:1.1;color:#b9b9b9;text-align:center;width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:21px}
.m-sklad-ic{flex:1;min-height:0;width:100%;object-fit:contain;padding:4px 2px 6px}
.m-sklad-cqty{position:absolute;right:6px;bottom:5px;font-family:'Alumni Sans',sans-serif;font-weight:800;font-size:calc(10px * var(--fs-alumni-scale));color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.75)}
.m-sklad-empty{padding:34px 16px;text-align:center;color:#8a8a8a;grid-column:1/-1}
@media(min-width:560px){
  .m-sklad{bottom:auto;top:50%;border-radius:16px;border-bottom:1px solid #262626;transform:translate(-50%,-46%);opacity:0;transition:opacity .22s ease,transform .22s ease}
  .m-sklad.open{transform:translate(-50%,-50%);opacity:1}
}


/* ═══════════════════════════════════════════════════════════════════════
   App-shell для in-app браузерів соцмереж (Telegram/Instagram/Facebook…)
   Причина: коли скролиться <body>, ці браузери авто-ховають свою панель →
   висота viewport стрибає → sticky/fixed-хедер зривається (перевірено на TG iOS).
   Рішення: скрол переноситься у внутрішній #app, <body> не скролиться →
   панель не ховається → хедер тримається. Вмикається класом html.inapp-shell
   (ставить inline-детект у <head>). У звичайних Safari/Chrome/десктоп #app
   прозорий (display:contents) → поведінка й розмітка як були.
   ═══════════════════════════════════════════════════════════════════════ */
#app { display: contents; }

html.inapp-shell { height: 100%; overflow: hidden; }
html.inapp-shell body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
html.inapp-shell #app {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
/* Хедер — верхній flex-рядок (body не скролиться, sticky не потрібен) */
html.inapp-shell body.menu-page .hdr { position: static; }
