/* ======================================================================
   DonateTeam — MAIN.CSS
   Глобальные стили для всех страниц + главная (каталог, FAQ, футер).
   Источник правды по шрифтам/цветам — tokens.css.
   Здесь дублируем только безопасные алиасы и доп.переменные под UI.

   Структура файла:
   0) Переменные
   1) База/типографика/ссылки
   2) Контейнер
   3) Хедер
   4) Блок «Процесс»
   5) Каталог (поиск, карточки, сетка)
   6) FAQ
   7) Разделитель и футер
   8) Служебное (FAB/коннектор/фокус/доступность)
   9) Адаптив (в том же порядке брейкпоинтов, что и был)
   ====================================================================== */


/* ========== 0) ПЕРЕМЕННЫЕ ============================================ */
/* Можно оставить: совпадает с tokens.css и не конфликтует */
:root{
  /* Шрифты */
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Jura", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-accent:  "Jura", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ui:var(--font-body); --font-display:var(--font-heading);

  /* Цвета/фон/границы/тени */
  --bg:#0f0f0f; --panel:#151515; --panel-2:#111111; --text:#fff; --muted:#bdbdbd;
  --border-soft:1px solid rgba(255,255,255,.06);
  --panel-bg:#141414; --panel-bg-2:#151515; --card-shadow:0 8px 24px rgba(0,0,0,.35);
  --brand:#a75eff; --brand-2:#8a3df6; --brand-soft:rgba(167,94,255,.35);
  --glow:0 10px 32px rgba(138,61,246,.35);

  /* Отступы/радиусы/кегли/межстрочные */
  --space-0:0px; --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px; --space-7:28px; --space-8:32px; --space-10:40px;
  --space-12:48px; --space-16:64px; --space-18:72px;
  --pad-inline:var(--space-6);
  --radius:16px; --radius-sm:calc(var(--radius)*.5);
  --search-h:44px;
  --h1:44px; --h2:34px; --h3:22px;
  --text-lg:18px; --text-md:16px; --text-sm:14px; --text-xs:12px;
  --lh-tight:1.3; --lh-base:1.55; --lh-relaxed:1.7;

  /* Разное (для элементов каталога/иконок/эффектов) */
  --game-border-color-strong:#2e2e2e;
  --game-border-contrast:1px solid color-mix(in srgb, #fff 12%, #000 88%);
  --control-h:40px; --icon-sm:24px; --icon-md:28px; --control-h-sm:32px;
  --counter-min:108px; --count-min:28px; --icon-text-md:16px;
  --grad-brand:radial-gradient(120% 120% at 50% 0%, var(--brand) 0%, var(--brand-2) 65%);
  --grad-neutral:linear-gradient(180deg, #2a2a2a, #232323);
  --elev-2:0 14px 34px rgba(0,0,0,.42); --elev-1:0 6px 14px rgba(0,0,0,.35);
  --logo:100px; --thumb:30px; --icon-text-lg:20px;
  --chip-bg:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  --blur-md:14px; --img-shadow:0 6px 14px rgba(0,0,0,.38);
  --cart-items-max-h:150px;
  --disabled-bg:#555; --hover-veil:rgba(255,255,255,.05);
  --inner-stroke:0 0 0 1px rgba(255,255,255,.06) inset;
  --inner-stroke-strong:0 0 0 1px rgba(255,255,255,.10) inset;
  --brand-shadow-sm:0 6px 16px rgba(168,85,247,.35);
  --brand-shadow-md:0 10px 26px rgba(168,85,247,.45);
  --brand-shadow-lg:0 14px 32px rgba(168,85,247,.60);
  --space-0-5:2px; --card-min:240px; --lift-sm:6px; --press-1:1px;
  --cart-w:300px; --enter-shift:10px; --focus-ring:3px;
  --disabled-opacity:.5; --lift-xs:5px; --glow-radius-sm:4px; --tracking-tight:.5px;
}


/* ========== 1) БАЗА / ТИПОГРАФИКА ==================================== */
* { box-sizing: border-box; }
html { font-size: 100%; }

html, body{
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: var(--lh-base);
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
*, *::before, *::after{ font-family: inherit; }

:where(button, input, select, textarea){ font: inherit; } /* форс наследования */

p { font-size: var(--text-md); line-height: var(--lh-relaxed); margin: 0 0 .8em; }
.small, small { font-size: var(--text-sm); line-height: var(--lh-base); }
.muted { color: rgba(255, 255, 255, .7); }
ul, ol { font-size: var(--text-md); line-height: var(--lh-relaxed); }

a { color: #b793ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.btn, .badge { font-size: var(--text-sm); line-height: var(--lh-tight); }

/* Световой градиент от шапки страницы */
html::before {
  content: "";
  position: fixed; left: 0; right: 0; top: -200px; height: 500px;
  pointer-events: none; z-index: 0;
  background: radial-gradient(1200px 500px at 50% 0, #1a1420 0%, transparent 60%);
}

/* Заголовки — рубленая таблица и отдельные маркированные элементы */
h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; line-height: 1; }

/* Карта заголовков на Jura */
.page-title, .desc-title, .faq-title, .footer-title{ font-family: var(--font-heading); }


/* ========== 2) КОНТЕЙНЕР ============================================== */
.page-1400 {
  max-width: 1280px;
  width: min(100%, 1280px);
  margin-inline: auto;
  padding-inline: 24px;
}


/* ========== 3) ХЕДЕР ================================================== */
.page-header { padding-block: var(--space-8); }
.logo { margin: 0; font-size: var(--h1); letter-spacing: .5px; text-align: center; }
.logo span { color: var(--brand); }


/* ========== 4) БЛОК «ПРОЦЕСС» ======================================== */
.order-process-slider {
  --dot-size: 72px;
  --steps-left: 0px;
  --steps-total: auto;
  --delivery-card-w: clamp(420px, 30vw, 540px);
  background: transparent;
}
.process-header {
  width: var(--steps-total, auto);
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.process-title { font-size: var(--h2); }
.process-subtitle { color: #d9d9d9; margin-block: var(--space-8); }

.process-steps{
  position: relative; display: flex; justify-content: center;
  gap: clamp(48px, 7.5vw, 120px);
  margin-inline: calc(-1 * var(--pad-inline)); padding-inline: var(--pad-inline);
  width: 100%; padding: 0; background: transparent !important;
}
.process-steps::before{
  content:""; position:absolute; left:0; right:0; top: calc(var(--dot-size)/2 - 1px);
  height:2px;
  background:linear-gradient(90deg, transparent 0%, rgba(167,94,255,.6) 20%, rgba(167,94,255,.9) 50%, rgba(167,94,255,.6) 80%, transparent 100%);
  filter: drop-shadow(0 0 12px rgba(167, 94, 255, .35));
  z-index: 0;
}

.process-step { position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:12px; min-width:120px; user-select:none; }
.process-step * { pointer-events:none; }

.step-icon{
  width: var(--dot-size); height: var(--dot-size); border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #b78eff 0%, #8a3df6 100%);
  box-shadow: var(--glow), inset 0 0 0 1px rgba(255, 255, 255, .06);
  position: relative; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.step-icon::after {
  content:""; position:absolute; inset:5px; border-radius:50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent);
}
.step-icon svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.process-step:hover .step-icon { transform: translateY(-2px) scale(1.02); filter: brightness(1.05); }

.step-text { font-weight: 700; font-size: 14px; color: #fff; text-shadow: 0 0 18px rgba(183,142,255,.25); }

.delivery-info{
  max-width: var(--delivery-card-w);
  width: 100%;
  margin: var(--space-8) auto 0;
  padding: var(--space-5) var(--space-6);
  background: var(--panel-bg-2);
  border: var(--border-soft);
  border-color: rgba(255,255,255,.06);
  border-radius: 14px;
  text-align: center;
}
.delivery-title { margin: 0 0 var(--space-3); font-size: var(--h3); font-weight: 800; letter-spacing: .2px; }
.delivery-text  { margin: 0 0 var(--space-3); line-height: 1.35; color: #eaeaea; }
.delivery-note  { margin: 0; font-size: 14px; line-height: 1.3; color: var(--muted); }


/* ========== 5) КАТАЛОГ / ПОИСК / КАРТОЧКИ ============================ */
.games-top { display:flex; align-items:center; justify-content:space-between; margin-block: var(--space-8); }
.games-title { display:flex; align-items:center; font-size: var(--h2); }

/* Поиск */
.search-wrap{
  height: var(--search-h);
  display:flex; align-items:center;
  padding: 8px 12px;
  background: #121212;
  border-radius: 10px;
  position: relative;
  box-shadow: inset 0 0 0 1.5px rgba(167,94,255,.35);
}
.search-wrap:focus-within{
  box-shadow:
    inset 0 0 0 1.5px var(--brand),
    0 0 14px var(--brand-soft);
}
.games-top .search-wrap { flex: 1 1 560px; max-width: 860px; }

.search-input{
  flex:1 1 auto; min-width:0; background:transparent; border:0; outline:0; color:var(--text);
  font: 600 15px/1.2 inherit; padding:2px 0;
}
.search-input::-webkit-search-cancel-button{ -webkit-appearance:none; display:none; }
.search-input::placeholder { color: rgba(255,255,255,.5); font-weight: 500; letter-spacing: .3px; }

.search-clear{
  flex:0 0 auto; display:grid; place-items:center; width:24px; height:24px; border:0; background:transparent; cursor:pointer; opacity:.75;
  transition: opacity .2s ease, transform .15s ease;
}
.search-clear:hover { opacity:1; transform: scale(1.06); }
.search-clear svg { width:14px; height:14px; stroke:#cda9ff; stroke-width:2; fill:none; }

.no-results{
  display: inline-block; position: relative; left: 50%; transform: translateX(-50%);
  padding:10px 14px; color:#d7c7ff; background:#161116; border:1px dashed rgba(167,94,255,.45);
  border-radius:10px; text-align:center;
}
.hidden { display: none !important; }

/* Сетка и карточки */
.games-grid { display:grid; grid-template-columns: 1fr; gap:18px; align-items:stretch; }

.game-card{
  display:flex; flex-direction:column; min-width:0;
  background: var(--panel); border-radius: 18px; padding:12px; text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  box-shadow: var(--card-shadow);
}
.game-card .game-thumb { border-radius:14px; overflow:hidden; background:#0e0e0e; }
.game-card .game-thumb img { width:100%; height:auto; display:block; object-fit: unset; }

.game-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(167,94,255,.25); filter: brightness(1.05); }
.game-card:hover img { transform:none !important; }

.game-title{
  background:#1b1b1b; padding:10px 12px; border-radius:12px;
  font-weight:800; text-align:center;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
  font-size:16px; line-height:1.25;
  min-height: calc(2 * 1.25em + 20px); max-height: calc(2 * 1.25em + 20px);
  word-break: break-word;
}
.game-card .game-title { min-height:48px; margin-top: var(--space-3); }

.game-card mark{
  background:linear-gradient(90deg, rgba(167,94,255,.3), rgba(167,94,255,.15));
  color:#fff; padding:0 .15em; border-radius:4px;
}


/* ========== 6) FAQ ==================================================== */
.faq { display:flex; flex-direction:column; }
#faq-title { display:block; font-size: var(--h2); margin-block-end: var(--space-8); }

.faq-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }

.faq-question{
  width:100%; display:flex; align-items:center; background:var(--panel-bg); border:var(--border-soft);
  border-radius:14px; padding:18px 20px; padding-right:52px; color:#fff; font-weight:800; cursor:pointer; position:relative;
  transition: background .2s ease, border-color .2s ease; text-align:left;
  font-size: var(--text-md);         /* FIX: заменён кривой токен */
  line-height: var(--lh-base);       /* FIX: заменён кривой токен */
}
.faq-question:hover { background:#171317; border-color: rgba(167,94,255,.45); }

.faq-answer { display:none; padding:12px 20px 0; color:#dedede; }
.faq .faq-answer > p:first-child { margin-top: 12px; }
.faq-item.open .faq-answer { display:block; }

/* Плюсик-иконка справа */
.plus{
  position:absolute; right:20px; top:50%; transform: translateY(-50%);
  width:16px; height:16px; display:inline-block; margin:0;
}
.plus::before, .plus::after{ content:""; position:absolute; inset:0; margin:auto; background:#fff; border-radius:2px; }
.plus::before{ width:14px; height:2px; }
.plus::after{ width:2px; height:14px; transition: transform .2s ease; }
.faq-item.open .plus::after{ transform: scaleY(0); }


/* ========== 7) РАЗДЕЛИТЕЛЬ И ФУТЕР =================================== */
/* Градиентная линия-разделитель секций */
.hr-section{
  width: 100%;
  height: 2px;
  margin-block: var(--space-8);
  border: none;
  background: linear-gradient(
    90deg,
    rgba(167, 94, 255, 0) 0%,
    rgba(167, 94, 255, 0.35) 25%,
    rgba(167, 94, 255, 0.75) 50%,
    rgba(167, 94, 255, 0.35) 75%,
    rgba(167, 94, 255, 0) 100%
  );
  box-shadow: 0 0 8px rgba(167, 94, 255, 0.15);
}

/* Футер */
.footer-head { display:flex; align-items:center; justify-content:space-between; column-gap: var(--space-4); margin-block: var(--space-8); }
.footer-brand, .footer-title { margin:0 0 var(--space-4) 0; font-size:22px; font-weight:800; line-height:1.05; color:var(--text); }

.tg-inline { flex:0 0 auto; display:inline-block; width:28px; height:28px; }
.tg-inline svg { width:100%; height:100%; }

.site-footer{ text-align:left; }
.site-footer p{ margin:0 0 var(--space-3); }
.site-footer .footer-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); margin-block: var(--space-8); }
.site-footer .footer-title{ margin:0; text-align:left; }
.site-footer .tg-inline{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; margin:0; }

.footer-links { display:flex; gap:var(--space-6); flex-wrap:wrap; margin-block: var(--space-8); }
.footer-links a { color:#b793ff; text-decoration:none; font-size: var(--text-md); }
.footer-links a:hover { text-decoration: underline; }


/* ========== 8) СЛУЖЕБНОЕ / ДОСТУПНОСТЬ ============================== */
/* Телеграм-FAB и соединяющая линия процесса по умолчанию выключены (включаются в адаптиве) */
.tg-fab { display:none !important; }
.process-connector { display:none; filter:none; }

/* Управляем фокусом карточек (клавиатура/доступность) */
.game-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 3px;
}

/* Жёсткая типографика для футера (IBM для читабельности) */
.site-footer, .site-footer *{ font-family: var(--font-body) !important; }
.site-footer .footer-title{ font-family: var(--font-heading) !important; font-weight: 700; }

/* Меньше анимаций при reduce-motion */
@media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }


/* ======================================================================
   9) АДАПТИВ (главная). Хедер и «Процесс оформления» не трогаем.
   ----------------------------------------------------------------------
   Каталог игр:
   ≤699 — 2 колонки; 700–1023 — 3; 1024–1279 — 4; ≥1280 — 5.
   Поиск: ширина через clamp(...) — не жмётся и не растягивается.
   ====================================================================== */

/* Базовые (вне медиа) — стабильность карточек/поиска */
.games-grid{ display:grid; gap:22px; }
.game-card{ min-width:0; }
.game-card img{ display:block; width:100%; aspect-ratio:1/1; object-fit:cover; }
:is(.game-card-title,.game-title,.game-card .title,.game-card .card-title){
  display:block; white-space:normal; overflow:hidden;
  min-height: calc(2 * 1.15em); /* 2 строки — сетка не «прыгает» */
}

.games-top{ display:flex; align-items:center; gap:var(--space-4); }
.games-title{ margin:0; flex:0 0 auto; }
.search-wrap{ height:var(--search-h,44px); margin-left:auto; }
.search-input{ width:100%; height:100%; }

/* ---------- ≤300px: очень узкие экраны (упрощаем «Процесс») ---------- */
@media (max-width: 300px){
  .process-steps{ display:grid; grid-template-columns:1fr; grid-template-rows:repeat(4,var(--dot-size)); row-gap:var(--space-6); column-gap:0; margin-inline:0; padding-inline:0; }
  .process-step:nth-child(1){grid-column:1;grid-row:1;}
  .process-step:nth-child(2){grid-column:1;grid-row:2;}
  .process-step:nth-child(3){grid-column:1;grid-row:3;}
  .process-step:nth-child(4){grid-column:1;grid-row:4;}
  .process-connector{ display:none !important; }
  .step-text{ position:static; transform:none; margin-top:6px; white-space:normal; text-align:center; }
}

/* ---------- ≤374px: компактнее подписи/заголовок «Процесса» ---------- */
@media (max-width: 374px){
  .order-process-slider{ --dot-size:52px; --step-drop:36px; --label-gap:8px; }
  .step-text{ font-size:11px; }
  .process-title{ letter-spacing:.1px; }
}

/* ---------- ≤390px: поджим линии «Процесса» -------------------------- */
@media (max-width: 390px){
  .order-process-slider{ --dot-size:56px; --step-drop:38px; --label-gap:8px; }
  .step-text{ font-size:11.5px; max-width:14ch; }
  .process-steps{ column-gap:var(--space-5); }
}

/* ---------- ≤414px: компактная типографика --------------------------- */
@media (max-width: 414px){
  :root{ --h1:30px; --h2:22px; --h3:17px; }
  .logo{ word-break:break-word; }
  .process-header{ margin-block-end:var(--space-6); }
}

/* ---------- 414–480px: акценты ввода/FAQ ------------------------------ */
@media (min-width:414px) and (max-width:480px){
  .search-input{ font:600 17.5px/1.25 inherit; }
  .search-input::-webkit-input-placeholder{ font-size:17.5px; }
  .search-input::placeholder{ font-size:17.5px; }

  .faq-question{ font-size:18px; padding:20px 56px 20px 22px; }
  .plus{ right:22px; }
}

/* ----------------------------- ≤480px -------------------------------- */
@media (max-width:480px){
  :root{
    --search-h:42px;
    --dot-size:64px; --step-drop:44px; --label-gap:10px;
    --zig-pad-x:10px; --zig-pad-y:6px;
    --h1:32px; --h2:24px; --h3:18px;
    --text-lg:17px; --text-md:15px; --text-sm:13px; --text-xs:11px;
  }
  .process-subtitle{ font-size:14px; }

  /* Процесс: «ёлочка» 2×4 */
  .process-steps{
    position:relative; display:grid;
    grid-template-columns:1fr 1fr; grid-template-rows:repeat(4,var(--dot-size));
    column-gap:var(--space-6); row-gap:var(--step-drop);
    width:100%; overflow:visible; margin-inline:0; padding-inline:0;
    margin-bottom:var(--space-16) !important; background:transparent;
  }
  .process-steps::before{ content:none !important; }
  .process-step{ position:relative; z-index:1; display:grid; place-items:center; justify-self:center; text-align:center; }
  .process-step:nth-child(1){grid-column:1;grid-row:1;}
  .process-step:nth-child(2){grid-column:2;grid-row:2;}
  .process-step:nth-child(3){grid-column:1;grid-row:3;}
  .process-step:nth-child(4){grid-column:2;grid-row:4;}
  .step-icon{ margin:0; }
  .step-text{ position:absolute; top:calc(100% + var(--label-gap)); left:50%; transform:translateX(-50%); max-width:16ch; font-size:12px; line-height:1.15; white-space:nowrap; }
  .process-connector{
    display:block; position:absolute; z-index:0; top:var(--zig-pad-y); bottom:var(--zig-pad-y);
    left:calc(var(--zig-pad-x) + var(--space-6) / 2); right:calc(var(--zig-pad-x) + var(--space-6) / 2);
    margin:0; width:auto; height:auto; pointer-events:none;
    filter:drop-shadow(0 0 3px rgba(167,94,255,.18)) !important;
  }

  .process-steps + .delivery-info{ margin-top:var(--space-8) !important; }
  .delivery-info{ max-width:100%; padding:14px; border-radius:12px; margin-top:0 !important; }

  /* Каталог: до 699 должно быть 2 колонки — начинаем уже здесь */
  .games-top{ flex-direction:column; align-items:stretch; justify-content:initial; row-gap:var(--space-4); }
  .games-top .search-wrap{ flex:none; width:100%; max-width:none; height:var(--search-h); }
  .search-input{ font:600 16px/1.2 inherit; }

  .games-title{ display:block; text-align:center; }
  .games-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:18px; } /* было 1fr — делаем 2 колонки */
  .game-card{ min-width:0; }

  .footer-links{ flex-direction:column; align-items:flex-start; }
}

/* ----------------------------- 481–699px ------------------------------ */
@media (min-width:481px) and (max-width:699px){
  :root{
    --h1:34px; --h2:26px; --h3:19px;
    --text-lg:17px; --text-md:15.5px; --text-sm:13.5px; --text-xs:11.5px;
  }
  .order-process-slider{ --dot-size:64px; --step-drop:44px; --label-gap:10px; --zig-pad-x:10px; --zig-pad-y:6px; }

  /* Процесс — как выше (ёлочка) */
  .process-steps{
    position:relative; display:grid;
    grid-template-columns:1fr 1fr; grid-template-rows:repeat(4,var(--dot-size));
    column-gap:var(--space-6); row-gap:var(--step-drop);
    width:100%; margin-inline:0; padding-inline:0; overflow:visible;
    margin-bottom:var(--space-16) !important;
  }
  .process-steps::before{ content:none !important; }
  .process-step{ display:grid; place-items:center; justify-self:center; text-align:center; }
  .process-step:nth-child(1){grid-column:1;grid-row:1;}
  .process-step:nth-child(2){grid-column:2;grid-row:2;}
  .process-step:nth-child(3){grid-column:1;grid-row:3;}
  .process-step:nth-child(4){grid-column:2;grid-row:4;}
  .step-icon{ margin:0; }
  .step-text{ position:absolute; top:calc(100% + var(--label-gap)); left:50%; transform:translateX(-50%); max-width:16ch; font-size:12px; line-height:1.15; white-space:nowrap; }
  .process-connector{
    display:block; position:absolute; z-index:0; top:var(--zig-pad-y); bottom:var(--zig-pad-y);
    left:calc(var(--zig-pad-x) + var(--space-6) / 2); right:calc(var(--zig-pad-x) + var(--space-6) / 2);
    margin:0; width:auto; height:auto; pointer-events:none; filter:drop-shadow(0 0 3px rgba(167,94,255,.18));
  }

  /* Главное: до 699 — 2 карточки */
  .games-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:18px; }
  .games-top{ flex-direction:column; align-items:stretch; row-gap:var(--space-4); }
  .games-title{ display:block; text-align:center; }
  .games-top .search-wrap{ flex:none; width:100%; max-width:none; height:var(--search-h); }

  .footer-links{ flex-direction:column; align-items:flex-start; }
}

/* ----------------------------- 700–899px ------------------------------ */
@media (min-width:700px) and (max-width:899px){
  :root{ --search-h:40px; }
  .order-process-slider{ --delivery-card-w:min(100%,520px); }
  .delivery-info{ padding:var(--space-4) var(--space-5); }
  .delivery-note{ font-size:13px; }

  .games-top{ flex-direction:column; align-items:stretch; row-gap:var(--space-4); }
  .games-top .search-wrap{ flex:none; width:100%; max-width:none; height:var(--search-h); }

  .games-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:20px; }
  .games-title{ align-self:stretch; display:block; text-align:center; margin:0; }
}

/* ----------------------------- 900–1023px ----------------------------- */
@media (min-width:900px) and (max-width:1023px){
  .games-top{ flex-direction:row; align-items:center; justify-content:flex-start; column-gap:var(--space-4); }
  .games-title{ flex:0 0 auto; text-align:left; }
  .games-top .search-wrap{
    margin-left:auto; width:auto; max-width:none; height:var(--search-h);
    flex:0 1 clamp(420px, 46vw, 600px); /* умеренная ширина поиска */
  }
  .games-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:20px; }
}

/* ----------------------------- 1024–1279px ---------------------------- */
@media (min-width: 1024px) and (max-width: 1279px){
  .games-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }

  /* ряд: заголовок слева, поиск справа, но с гарантированным зазором */
  .games-top{
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;                 /* вместо space-between */
    column-gap: clamp(16px, 3vw, 32px);          /* минимальный «воздух» */
  }

  .games-title{
    margin-right: 0;                              /* зазор отдаём column-gap */
    text-align: left;
  }

  .games-top .search-wrap{
    /* ↓ было: flex: 0 1 clamp(520px, 40vw, 680px) */
    flex: 0 1 clamp(480px, 36vw, 680px);         /* мин-ширину снизили: 520 → 460 */
    height: var(--search-h);
    max-width: none;
    margin-left: auto;                            /* уводим вправо */
  }
}


/* ≥1280: можно позволить пошире, но не во всю строку */
@media (min-width:1280px){
  .games-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 22px; }
  .games-top{
    display:flex; align-items:center; justify-content:flex-start;
    column-gap: clamp(20px, 2.5vw, 40px);
  }
  .games-top .search-wrap{
    margin-left:auto;
    flex: 0 1 clamp(560px, 36vw, 760px);
    height: var(--search-h);
    max-width:none;
  }
}

/* ----------------------------- ≥1440px -------------------------------- */
@media (min-width:1440px){
  .search-wrap{ flex-basis:640px; } /* стабилизация ширины поиска */
}


