/* ======================================================================
   DonateTeam — GAME.CSS
   Стили страницы игры: хлебные крошки, шапка, каталог товаров, корзина,
   описание/SEO, переключатель режима и модалка, мобильный док и шит.

   Структура файла:
   0) Токены/алиасы (game-*)
   1) База
   2) Навигация (крошки + переключатель режима)
   3) Шапка игры (лого, тайтл, фильтры)
   4) Сетка/карточки товаров
   5) Корзина (ПК) + состояния
   6) Описание + SEO-блок
   7) Переключатели режима (кнопки/чип)
   8) Модалка выбора режима
   9) Мобильный док-бар
   10) Мобильный нижний шит корзины
   11) Доп.правила: ховеры, юридические страницы, шрифты в контролах
   12) Адаптив (порядок брейкпоинтов сохранён)
   ====================================================================== */


/* ========== 0) TOKENS / АЛИАСЫ ДЛЯ СТРАНИЦЫ ИГРЫ ===================== */
: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;

  --game-bg: var(--bg, #0f0f0f);
  --game-panel: var(--panel, #151515);
  --game-panel-2: var(--panel-2, #111111);
  --game-text: var(--text, #fff);
  --game-muted: var(--muted, #bdbdbd);

  --game-brand: var(--brand, #a75eff);
  --game-brand-2: var(--brand-2, #8a3df6);
  --game-brand-soft: var(--brand-soft, rgba(167,94,255,.35));

  --card-accent: var(--game-brand);
  --card-accent-2: var(--game-brand-2);
  --card-accent-soft: color-mix(in srgb, var(--card-accent) 35%, transparent);

  --game-border: var(--border-soft, 1px solid rgba(255,255,255,.06));
  --game-shadow: var(--card-shadow, 0 8px 24px rgba(0,0,0,.35));

  --game-radius: var(--radius, 16px);

  --game-h1: 44px; --game-h2: 34px; --game-h3: 22px;
  --game-text-lg: 18px; --game-text-md: 16px; --game-text-sm: 14px;

  --game-lh-base: 1.55;

  /* Локальные алиасы (не конфликтуют с глобалкой) */
  --page-x: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius-xl: 16px;
}

/* ========== 1) БАЗА =================================================== */
body{ font-family: var(--font-body); }
.page-title,.faq-title,.desc-title,.footer-title{ font-family: var(--font-heading); }
.num,.btn-pay,.filter-btn,.mode-btn,.mode-chip,.counter .count{ font-family: var(--font-accent); }
[hidden]{ display:none !important; }


/* ========== 2) НАВИГАЦИЯ (крошки + переключатель режима) ============== */
.navigation{ margin-block-start: var(--space-4); padding-bottom: 0; }
.navigation .page-1400{
  display: flex; align-items: center; justify-content: space-between; height: 35px;
}

/* Слева — хлебные крошки */
.nav-crumbs{ display: flex; align-items: center; height: 100%; }

/* Ссылки/разделители */
.navigation-link, .navigation-current, .navigation-sep{
  display: flex; align-items: center; height: 100%;
  font-size: 20px; line-height: 1;
}
.navigation-link{
  font-weight: 700; color: #fff; text-decoration: none !important;
  transition: color .25s ease, filter .25s ease;
}
.navigation-link:hover{
  color: var(--game-brand);
  text-shadow: none;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--game-brand) 45%, transparent));
}
.navigation-current{ color:#fff; font-weight:700; }
.navigation-sep{ margin-inline: var(--space-2); color: var(--game-muted); }

/* Справа — переключатель режима в хедере */
.navigation .mode-switch{ margin-left: auto; }
#nav-mode-switch .mode-btn[data-mode="inapp"],
#nav-mode-switch .mode-btn[data-mode="web"]{
  width: 120px !important; min-width: 120px; white-space: nowrap;
  height: 35px; padding: 0 14px; display:flex; align-items:center; justify-content:center;
  font-size: 14px; line-height: 1;
  
}


/* ========== 3) ШАПКА ИГРЫ ============================================ */
.game-header{ display:flex; align-items:flex-start; gap:var(--space-6); margin-bottom:var(--space-8); }
.game-header-content{ flex:1; }
.page-title{ font-size:var(--game-h2); line-height:1.2; font-weight:700; color:var(--game-text); margin:0 0 var(--space-4) 0; text-align:left; }
.game-logo{ width:120px; height:120px; border-radius:var(--game-radius); object-fit:cover; flex-shrink:0; }
.header-actions{ display:flex; flex-wrap:wrap; gap:var(--space-4); }

.filter-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:var(--space-3) var(--space-5);
  font-size:var(--game-text-md); color:var(--game-text);
  background:var(--game-panel); border:var(--game-border); border-radius:var(--game-radius);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.filter-btn:hover{ box-shadow:0 0 0 3px var(--game-brand-soft); }
.filter-btn:active{ transform: translateY(1px); }
.filter-btn.active{ background:var(--game-brand); color:var(--game-text); cursor: default; }


/* ========== 4) СЕТКА / КАРТОЧКИ ТОВАРОВ =============================== */
.main-content{ display:flex; gap:var(--space-5); }
.products{
  display:grid; flex:1 1 auto; gap:var(--space-6);
  grid-template-columns:repeat(auto-fill, minmax(var(--card-min), 1fr));
}

/* Карточка товара */
.product-card{
  --card-accent: var(--game-brand);
  --card-accent-2: var(--game-brand-2);
  --card-accent-soft: color-mix(in srgb, var(--card-accent) 35%, transparent);
  position:relative; display:flex; flex-direction:column; gap:var(--space-3);
  text-align:center; overflow:hidden; z-index:0;
  padding:var(--space-5) var(--space-4) var(--space-4);
  background:var(--game-panel); border:var(--game-border);
  border-radius:var(--game-radius); box-shadow:var(--game-shadow);
  transition: box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
.product-card::before{ /* внутренняя окантовка */
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset;
}
.product-card::after{ /* свечение при hover/focus */
  content:""; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none;
  opacity:0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0) inset,
    0 0 0 0 color-mix(in srgb, var(--game-brand) 0%, transparent),
    0 0 0 0 color-mix(in srgb, var(--game-brand) 0%, transparent);
  transition: opacity .22s ease, box-shadow .22s ease, filter .22s ease;
}
.product-card:hover{
  box-shadow:var(--elev-2);
  border-color: color-mix(in srgb, var(--game-brand) 45%, #2e2e2e);
  background: color-mix(in srgb, var(--game-panel) 94%, var(--game-brand) 6%);
}
.product-card:hover::after,
.product-card:focus-visible::after{
  opacity:1;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--game-brand) 55%, rgba(255,255,255,.08)) inset,
    0 0 0 2px color-mix(in srgb, var(--game-brand) 24%, transparent),
    0 16px 38px color-mix(in srgb, var(--game-brand) 22%, transparent);
}
.product-card:focus-visible{ outline:none; }

@keyframes shimmer{ 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Медиа-подиум */
.card-media{
  position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden;
  aspect-ratio:4/3; border-radius:var(--game-radius); border:var(--game-border);
  background:
    radial-gradient(65% 55% at 50% 15%, color-mix(in srgb, var(--card-accent) 18%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
}
.card-media::after{
  content:""; position:absolute; inset:auto 8% 8% 8%; height:16%; border-radius:50%;
  background:radial-gradient(60% 80% at 50% 50%, color-mix(in srgb, var(--card-accent) 25%, transparent), transparent 70%);
  filter:blur(12px); pointer-events:none;
}
.card-media.is-loading::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04));
  animation:shimmer 1.1s linear infinite; border-radius:inherit;
}
.card-media img{
  width:82%; height:82%; object-fit:contain;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.35));
  transition:transform .25s ease;
}
.product-card:hover .card-media img{ transform:none; } /* без масштабирования */

.card-title{
  margin:0;
  font-size:var(--game-text-lg); 
  line-height:1.35;
  font-weight:700;
  color:var(--game-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.price-chip{
  display:flex; align-items:center; justify-content:center; flex:1 1 auto; height:40px;
  font-weight:600; font-family: var(--font-ui);
  color:var(--game-text); background:rgba(255,255,255,.02);
  border:1px solid #5a5a5a; border-radius:var(--game-radius);
  white-space: nowrap; min-width: 0; /* чтобы цена не рвалась */
}

/* Кнопка «+» */
.add-btn{
  display:flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px;
  border:none; border-radius:50%; cursor:pointer; font-size:20px; color:var(--game-text);
  background: radial-gradient(120% 120% at 50% 0%, var(--game-brand) 0%, var(--game-brand-2) 65%);
  box-shadow: 0 10px 26px var(--game-brand-soft), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: box-shadow .2s ease, filter .2s ease;
}
.add-btn:hover{ box-shadow:0 14px 32px var(--game-brand-soft), 0 0 0 1px rgba(255,255,255,.10) inset; }
.add-btn:active{ transform:none; }

/* Счётчик */
.counter{
  display:flex; align-items:center; justify-content:center; gap:var(--space-4);
  min-width:0; height:40px; padding:0 var(--space-2);
  background:var(--game-panel-2); border:var(--game-border); border-radius:var(--game-radius);
}
.counter .count{ min-width:2ch; text-align:center; font-weight:600; line-height:1; }
.counter .inc, .counter .dec{
  display:flex; align-items:center; justify-content:center; width:28px; height:28px;
  border:none; border-radius:50%; cursor:pointer; font-size:18px; color:var(--game-text);
  transition: box-shadow .2s ease, filter .2s ease; aspect-ratio: 1 / 1;
}
.counter .dec{
  background:linear-gradient(180deg,#2a2a2a,#232323);
  box-shadow:0 6px 14px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.counter .inc{
  background: radial-gradient(140% 140% at 50% 20%, var(--game-brand) 0 60%, var(--game-brand-2) 100%);
  box-shadow:0 6px 16px var(--game-brand-soft), 0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Когда внизу счётчик — сетка «цена | счётчик» */
.price-row:has(.counter){
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--space-3); align-items: center;
}
.price-row:has(.counter) .counter{ width: auto; }
.price-row:has(.counter) .price-chip{ width: auto; }

/* Стабилизация высоты карточек на десктопе */
@media (min-width: 901px){
  .products{ align-items: start; }
  .product-card{
    display: grid; grid-template-rows: auto 1fr auto; /* media | spacer | price */
    min-height: 0;
  }
  .product-card .card-media{ align-self: start; }
  .product-card .price-row{ min-height: 40px; }
  .product-card .price-row:has(.counter){
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  }
}


/* ========== 5) КОРЗИНА (ПК) ========================================== */
.cart{
  align-self:flex-start; position:sticky; overflow:visible;
  flex:0 0 300px; width:300px;
  max-height:calc(100dvh - var(--space-8));
  padding: 12px var(--space-3) var(--space-3);
  top:var(--space-3);
  background:var(--game-panel);
  border:var(--game-border);
  border-radius:var(--game-radius);
}

/* Шапка корзины */
.cart-header{ margin-bottom:var(--space-3); }
.cart-header-top{
  display:grid; grid-template-columns:1fr auto 1fr;
  align-items:center; gap:var(--space-3);
  min-height:40px;
}
.cart-header{ --cart-header-size: var(--game-text-xl, 20px); }
.cart-header h2{ margin:0; font-weight:700; font-size:var(--cart-header-size); line-height:1.2; }
.cart-header h2.cart-title{ display:flex; align-items:center; gap:8px; justify-self:start; }
.cart-title .cart-title-text{ font-weight:700; }

.cart-count{
  display:inline-flex; align-items:center; padding:0; border:none; border-radius:0; background:none;
  font-size:var(--cart-header-size); line-height:1.2; color:var(--game-text); font-weight:700;
}
#cart-total{ justify-self:center; color:var(--game-brand); font-size:var(--cart-header-size); line-height:1.2; }
.cart-actions{ justify-self:end; display:inline-flex; align-items:center; gap:var(--space-2); }

.cart ul{ list-style: none; margin: 0 0 var(--space-4) 0; padding: 0; }
#cart-items > .cart-item-card:last-child{ margin-bottom: 0; }

.cart.scrollable #cart-items{ max-height:420px; overflow-y:auto; }

.cart-clear-btn{
  cursor:pointer; padding:var(--space-1); border-radius:var(--radius-sm);
  background:none; border:none; transition:background .2s ease, transform .2s ease;
}
.cart-clear-btn:hover{ background:rgba(255,255,255,.05); transform:scale(1.05); }
.cart-clear-btn .icon-trash{ stroke:var(--game-muted); transition:stroke .2s ease; }
.cart-clear-btn:hover .icon-trash{ stroke:#ff5555; }

.cart-item-card{
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:var(--space-3);
  padding:var(--space-3); margin-bottom:var(--space-3);
  background:var(--game-panel-2); border:var(--game-border); border-radius:var(--game-radius);
}
/* Тайтл в 2 строки */
.cart .cart-item-card .item-name{
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.2; max-height: calc(1.2em * 2);
}
/* Цена в корзине — фиолетовая */
.cart .cart-item-card .item-price { color: var(--brand, #8b5cf6); }

.item-counter{
  grid-column:1/-1; display:flex; align-items:center; justify-content:space-between;
  height:36px; padding:0 var(--space-2); background:var(--game-panel-2);
  border:var(--game-border); border-radius:var(--game-radius);
}
.item-counter button{
  width:28px; height:28px; cursor:pointer; background:none; border:none;
  color:var(--game-brand); font-size:18px; transition:filter .2s;
}
.item-counter button:hover{ filter:drop-shadow(0 0 4px var(--game-brand)); }

.item-source{
  grid-column:1 / -1; height:36px; display:flex; align-items:center; justify-content:center;
  background:var(--game-panel-2); border:var(--game-border); border-radius:var(--game-radius);
  font-size:14px; color:var(--game-text); font-family:var(--font-accent);
}

.btn-pay{
  width:100%; cursor:pointer; padding:var(--space-3) var(--space-4);
  border:none; border-radius:var(--game-radius);
  font-size:var(--game-text-md); font-weight:700; color:var(--game-text);
  background:var(--game-brand);
}
.btn-pay:disabled{ background:#555; opacity:.5; cursor:not-allowed; }

#cart-mode-switch, #cart .mode-chip{ display:none !important; } /* в корзине скрываем чип/свитч */

.cyber-total.total-highlight{ animation:totalPulse .6s ease; }
@keyframes totalPulse{
  0%{text-shadow:none;filter:none}
  35%{text-shadow:0 0 12px var(--game-brand);filter:saturate(1.1)}
  100%{text-shadow:none;filter:none}
}

/* Скролл-обёртка */
.cart-items-wrap { position: relative; }
.cart-nav { display: none; }      /* стрелки скрыты базово */
#cart-items{ overflow: visible; } /* базово без фикс.высоты */

/* Невидимый скролл, включаем только при необходимости */
.cart-items-wrap #cart-items{ scrollbar-width: none; -ms-overflow-style: none; }
.cart-items-wrap #cart-items::-webkit-scrollbar{ width:0; height:0; display:none; }
.cart-items-wrap.is-scroll #cart-items{
  overflow-y: auto !important; scroll-snap-type: y proximity; scroll-padding-bottom: 2px; max-height: 420px;
}
/* Если есть ≥3 элемента (поддержка :has) — включаем скролл */
@supports(selector(:has(*))){
  .cart-items-wrap:has(#cart-items > *:nth-child(3)) #cart-items{
    overflow-y: auto !important; scroll-snap-type: y proximity; scroll-padding-bottom: 2px; max-height: 420px;
  }
}

/* Пустая корзина — одна «пилюля» во всю ширину */
.cart .cart-empty{ 
  margin: 12px 0;                  /* сверху и СНИЗУ по 12px */
}
.cart .cart-empty[hidden]{          /* на всякий случай: если JS ставит hidden */
  display: none !important;
}
.cart .cart-empty-bar{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: var(--game-radius);
  background: var(--panel-2, #151515);
  border: 1px solid color-mix(in srgb, var(--text-2, #fff) 12%, transparent);
  box-shadow: none;
  color: var(--text-1, #fff);
  font-weight: 600;
  letter-spacing: .01em;
  cursor: default;              /* это не интерактивный элемент */
  user-select: none;
}


/* ========== 6) ОПИСАНИЕ + SEO ======================================== */
#game-desc-title#game-desc-title{ margin-bottom:12px; }
.desc-intro{ margin-block: var(--space-3); display: flow-root; }
.extra-description{ margin-block: var(--space-3); }
.extra-description:not([hidden]){ display: flow-root; }
#game-desc-content{ margin-top:0; }
#game-desc-intro, #game-desc-extra{ margin-top: 12px; }
#game-desc-intro p + p, #game-desc-content p + p { margin-top: 12px; }

.game-desc{ margin-block:var(--space-8); }
.desc-head{ display:flex; align-items:center; gap:12px; padding:0; background:none; border:none; cursor:pointer; color:var(--game-text); }
.desc-title{ margin:0; font-size:var(--game-h2); line-height:1.2; letter-spacing:.2px; }
.arrow-icon{ color:var(--game-brand); transition:transform .25s ease; }
.desc-head[aria-expanded="true"] .arrow-icon{ transform:rotate(180deg); }

.extra-description{
  position:relative; margin-top:var(--space-4); padding:var(--space-8) var(--space-5);
  background:var(--game-panel); border-radius:var(--game-radius); overflow:hidden;
}
.extra-description::before{
  content:""; position:absolute; inset:0; border-radius:inherit;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset; pointer-events:none;
}
.extra-description .category-seo > :first-child{ margin-top:0 !important; }
.extra-description .category-seo > :last-child{  margin-bottom:0 !important; }
.extra-description p{
  margin:0 0 var(--space-4); color:var(--game-text); line-height:var(--game-lh-base);
  max-width: none; /* текст описания во всю строку */
}
.extra-description h3{ margin:var(--space-6) 0 var(--space-3); font-size:var(--game-h3); line-height:1.25; }
.extra-description .dot-list{ margin:0 0 var(--space-4); padding-left:0; list-style:none; }
.extra-description .dot-list li{
  position:relative; margin:.4em 0; padding-left:1.25em; color:var(--game-text);
}
.extra-description .dot-list li::before{
  content:""; position:absolute; left:0; top:.55em; width:.5em; height:.5em; border-radius:50%;
  background:var(--game-brand); box-shadow:0 0 0 2px color-mix(in srgb, var(--game-brand) 20%, transparent);
}
.extra-description a{ color:var(--game-brand); text-decoration:underline; text-underline-offset:2px; }


/* ========== 7) ПЕРЕКЛЮЧАТЕЛИ РЕЖИМА ================================== */
.mode-switch{
  display:inline-flex; align-items:center; gap:0;
  margin-left:var(--space-4);
  background:var(--game-panel); border:var(--game-border);
  border-radius:999px; overflow:hidden;
}
.mode-switch.disabled{ opacity:.5; pointer-events:none; }
.mode-btn{
  padding:8px 14px;
  font-size:14px;
  color:var(--game-text);
  background:transparent;
  border:none;
  cursor:pointer;
  transition:color .2s ease, background .2s ease;
}
.mode-btn:hover{
  color:var(--game-text);
}
.mode-btn.active{
  color:var(--game-text);
  background:color-mix(in srgb, var(--game-brand) 22%,transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--game-brand) 25%, transparent)
}
.mode-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  margin-right:var(--space-2);
  border-radius: 999px;
  font-size:13px;
  color:var(--game-text);
  background:color-mix(in srgb, var(--game-brand) 22%, transparent);
  border:1px solid rgba(255,255,255,.06);
}


/* ========== 8) МОДАЛКА ВЫБОРА РЕЖИМА ================================= */
.mode-modal{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:grid; place-items:center; z-index:9999; padding:24px; }
.mode-modal[hidden]{ display:none; }
.mode-modal__card{
  width:min(720px,100%); background:var(--game-panel); border:var(--game-border);
  border-radius:var(--game-radius); padding:20px; box-shadow:var(--game-shadow);
}
.mode-modal__card h3{ margin:0 0 6px 0; font-size:20px; }
.mode-modal__hint{ margin:0 0 16px 0; color:var(--game-muted); font-size:14px; }
.mode-modal__grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:10px; }
.mode-modal__option{
  display:grid; gap:4px; padding:14px; border-radius:12px;
  border:1px solid rgba(255,255,255,.08); background:var(--game-panel-2);
  cursor:pointer; text-align:left;
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.mode-modal__option:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb, var(--game-brand) 32%, transparent);
  box-shadow:0 10px 26px rgba(168,85,247,.2);
}

/* Фокус-доступность */
.mode-modal__option:focus{ outline: none; }
.mode-modal__option::-moz-focus-inner{ border: 0; }
.mode-modal__option:focus-visible{ outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 3px; }

#mode-modal-title, .mode-modal__title{ font-weight: 600; }
.mode-modal__option-title{ margin:0 0 6px 0; font-size:16px; line-height:1.2; }
.mode-modal__option-note{ color:var(--game-muted); font-size:14px; }
.mode-modal__footer-hint{ margin:12px 0 0 0; font-size:14px; color:var(--game-muted); }


/* ========== 9) МОБИЛЬНЫЙ ДОК-БАР ===================================== */
.mobile-bar{
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: none; /* включаем на ≤755px ниже */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px));
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.mobile-bar__inner{
  max-width: 1400px; margin: 0 auto;
  padding: 10px var(--page-x);
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0;
}
.mbtn{
  appearance: none; border: 0; background: transparent; box-shadow: none; color: var(--text);
  height: 64px; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; user-select: none;
}
.mbtn__icon{ width: 22px; height: 22px; display: grid; place-items: center; }
.mbtn__label{ font: 600 13px/1 var(--font-accent); opacity: .9; min-height: 16px; }
.mbtn--cart .mbtn__label{ display: none; }
.mbtn__badge{
  position: static; transform: none; min-width: auto; height: auto; padding: 2px 6px;
  border-radius: 999px; background: var(--brand); color: #fff;
  font: 700 12px/1 var(--font-accent); margin-top: 2px;
}
.mbtn--cart .mbtn__badge[hidden]{ display: none; }

/* Уточнение размеров SVG в доке (более специфично, чем legacy-правило ниже) */
.mobile-bar .mbtn__icon svg{ width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2; }


/* ========== 10) МОБИЛЬНЫЙ НИЖНИЙ ШИТ КОРЗИНЫ ========================= */
.cart-drawer{ position: fixed; inset:0; z-index: 120; display: contents; }
.cart-drawer[aria-hidden="true"] .cart-drawer__overlay{ opacity:0; pointer-events:none; }
.cart-drawer[aria-hidden="true"] .cart-drawer__sheet{ transform: translateY(100%); }

.cart-drawer__overlay{ position: fixed; inset:0; background: rgba(0,0,0,.5); transition: opacity .25s ease; }
.cart-drawer__sheet{
  position: fixed; left:0; right:0; bottom:0;
  margin: 0 auto; max-width: 1400px;
  background: var(--panel-2); color: var(--text);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  box-shadow: 0 -20px 40px rgba(0,0,0,.6);
  transform: translateY(0); transition: transform .28s ease;
  max-height: calc(100vh - 70px); display:flex; flex-direction:column;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
}
.cart-drawer__grip{ width: 54px; height: 6px; border-radius: 3px; background: #2a2a2a; margin: 10px auto 6px; }
.cart-drawer__header{ display:flex; align-items:center; justify-content:space-between; padding: 8px 16px 4px; }
.cart-drawer__header h3{ font-size:18px; font-weight:800; margin:0; }
.cart-drawer__close{ background: transparent; color: var(--muted); border:0; font-size:20px; line-height:1; padding:8px; cursor:pointer; }
.cart-drawer__clear{ background: transparent; border:0; color: var(--muted); padding:8px; cursor:pointer; line-height:1; display:inline-flex; align-items:center; justify-content:center; }
.cart-drawer__clear:hover{ color:#ff6b6b; }

.cart-drawer__body{ padding: 8px 16px; overflow:auto; }
.cart-list{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.cart-item{
  display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center;
  background: var(--panel); border-radius: 14px; padding: 12px;
}
.cart-item__title{ font-weight:600; font-size:14px; }
.cart-item__price{ color: var(--brand); font-weight:700; font-size:14px; }

.cart-qty{ display:flex; align-items:center; gap:8px; }
.cart-qty button{
  width:34px; height:34px; border-radius:10px; background: transparent; border: 0; color: var(--brand);
  font-weight:800; line-height:1; display:grid; place-items:center; cursor:pointer;
}
.cart-qty button:active{ transform: translateY(1px); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 50%, transparent)); }
.cart-qty input{
  width:48px; height:34px; text-align:center; border:0; background:#1a1a1a; color:#fff; border-radius:10px; font-weight:700;
}
.cart-qty .js-rem{ display:none !important; } /* старый элемент — скрыт */

.cart-drawer__footer{
  margin-top:auto; padding: 12px 16px 16px; display:grid; gap:10px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 30%, rgba(0,0,0,.35) 100%);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
}
.cart-total{ display:flex; align-items:baseline; justify-content:space-between; font-size:16px; font-weight:700; }
.btn.btn--brand{ height: 48px; border-radius: 14px; border:0; font-weight:800; cursor:pointer; background: var(--brand); color:#fff; }

body.drawer-open .mobile-bar{ opacity:0; pointer-events:none; } /* шит перекрывает док */

/* LEGACY 18px (оставляем для совместимости; выше есть более специфичное правило на 22px) */
.mbtn__icon svg{ width:18px; height:18px; display:block; fill:none; stroke:currentColor; stroke-width:2; }

/* Лок-боди при открытом шите + видимое фокус-кольцо */
body.drawer-open { overflow: hidden; }
:where(button, [role="button"], .mode-modal__option):focus-visible{
  outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 2px;
}

/* Усиленная подсветка карточек товара (десктоп-эффект) */
.product-card { transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 16px 38px rgba(167,94,255,.45); filter: brightness(1.06); }

/* Заголовки разделов на странице игры выровнены по весу */
.desc-title, .faq-title{ font-weight: 700; font-family: var(--font-heading); }

/* Крошки/легал — IBM для читабельности */
.navigation, .navigation *{ font-family: var(--font-body) !important; }
.navigation .navigation-link, .navigation .navigation-current{ font-weight: 700; }

.legal, .legal *{ font-family: var(--font-body) !important; }
.legal h1, .legal h2, .legal h3{ font-family: var(--font-heading) !important; font-weight: 700; }
.legal a{ font: inherit; color: #b793ff; text-decoration: underline; text-underline-offset: 2px; }

/* Счётчики/кнопки в корзине — на акцентном шрифте */
.counter .count, .item-counter, .cart-qty input, .cart-qty button{ font-family: var(--font-accent) !important; font-weight: 700; }
.cart :where(button, input){ font: inherit; } /* наследование на всякий случай */

/* Фикс ширины при появлении/исчезновении вертикального скролла */
html { scrollbar-gutter: stable both-edges; }
@supports not (scrollbar-gutter: stable){
  html { overflow-y: scroll; } /* fallback для старых движков */
}

/* === CARD TITLE: базовая нейтральная настройка (без фикса высоты) === */
.card-title{
  margin: 0 !important;
  font-size: var(--game-text-lg);
  line-height: 1.2;
  font-weight: 700;
  color: var(--game-text);
  overflow: hidden;               /* на десктопе добавим ellipsis */
  text-align: center;             /* единый вид */
}


/* === PATCH: заголовок карточки — без лишних отступов и с нужными переносами === */
.product-card :is(.card-title,.product-title,.title){
  margin-block: 0 !important;            /* убираем 4px/8px сверху/снизу */
}

/* Заголовок карточки — чистая база, без лишних отступов */
.product-card .card-title{
  margin: 0 !important;
  line-height: 1.15;
  font-weight: 700;
  color: var(--game-text);
}

/* По умолчанию обе части «в строку» (ПК) */
.product-card .card-title .ct-top,
.product-card .card-title .ct-rest{
  display: inline;
}

/* ==========================================================================
   12) АДАПТИВ
   Правила организованы по диапазонам. Конфликтов и «дыр» между брейками нет.
   -------------------------------------------------------------------------- */

/* ≥1025 — выравнивание шапки */
@media (min-width: 1025px){
  .game-header{ align-items: stretch; }
  .game-header-content{ display:flex; flex-direction:column; justify-content:space-between; min-height:120px; }
  .page-title{ margin:0 0 var(--space-3) 0; }
}

/* ≥732 — базовая компоновка правой части шапки */
@media (min-width: 732px){
  .game-header{ align-items: stretch; }
  .game-header-content{ display:flex; flex-direction:column; justify-content:space-between; min-height:120px; }
  .page-title{ margin:0 0 var(--space-3) 0; text-align:left; }
}

/* ≥700 — навигация «как на десктопе»: крошки слева, свитч справа */
@media (min-width: 700px){
  .navigation .page-1400{ justify-content:flex-start !important; }
  .navigation .mode-switch,
  .navigation .page-1400 > #nav-mode-switch{ margin-left:auto !important; }
}

/* ≤699 — моб. навигация в 2 строки + каталог в 2 колонки */
@media (max-width: 699px){
  /* Навигация в 2 строки */
  .navigation .page-1400{
    display:flex !important; flex-wrap:wrap !important;
    align-items:center !important; justify-content:center !important;
    row-gap:var(--space-3) !important; column-gap:16px !important;
    height:auto !important; width:100% !important;
  }
  .navigation .nav-crumbs{
    order:1 !important; flex:0 0 100% !important;
    display:flex !important; justify-content:center !important; align-items:center !important;
    margin:0 !important; text-align:center !important; white-space:normal !important;
  }
  .navigation .nav-crumbs .navigation-sep{ display:inline-block !important; line-height:1 !important; margin:0 8px !important; }
  .navigation .page-1400 > #nav-mode-switch,
  .navigation .mode-switch{
    order:2 !important; flex:0 0 auto !important; width:max-content !important;
    display:inline-flex !important; align-items:center !important; gap:12px !important;
    margin-inline:auto !important; margin-top:var(--space-1) !important;
  }
  .navigation{ margin-bottom:var(--space-3) !important; }

  /* Каталог: всегда 2 колонки */
  :is(#products,#products-grid,#catalog,#game-products,
      .products,.products-grid,.products-list,[data-products],
      #cards,.goods-grid,.game-cards,.game-products,.catalog-grid){
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:var(--space-4) !important;
    justify-items:stretch !important;
    align-items:stretch !important;
  }
}

/* 531–641 — сетка шапки (лого | контент) */
@media (min-width: 531px) and (max-width: 641px){
  .game-header{
    display:grid; grid-template-columns:156px 1fr; column-gap:var(--space-5);
    align-items:start; margin-bottom:32px;
  }
  .game-logo{ grid-column:1; width:156px; height:166px; object-fit:cover; margin:0; align-self:start; }
  .game-header-content{
    grid-column:2; display:flex; flex-direction:column; justify-content:space-between;
    min-height:calc(166px - var(--space-3));
  }
  .page-title{
    margin:0; line-height:1.05; text-align:center; margin-inline:auto; text-wrap:balance;
    max-inline-size:28ch; hyphens:auto; overflow-wrap:anywhere;
  }
  .game-header .header-actions{
    display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); grid-auto-rows:36px;
    gap:12px 14px; margin-block-start:var(--space-3); justify-items:stretch; align-content:end;
  }
  .game-header .filter-btn{ width:100%; height:36px; padding:8px 14px; font-size:14px; white-space:nowrap; justify-content:center; }
}

/* ≤530 — мобильная шапка/типографика */
@media (max-width: 530px){
  .game-header{
    display:flex !important; flex-direction:column !important;
    align-items:stretch !important; text-align:center !important;
    gap:14px !important; margin-bottom:var(--space-6) !important;
  }
  .game-logo{ display:none !important; }
  .page-title{
    order:1 !important; margin:0 !important; text-align:center !important;
    max-width:100% !important; text-wrap:balance !important; line-height:1.15 !important;
  }
  .game-header .header-actions{
    order:2 !important; display:grid !important;
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    column-gap:14px !important; row-gap:12px !important;
    width:100% !important; margin:var(--space-4) 0 0 !important;
    align-items:stretch !important; justify-items:stretch !important;
  }
  .game-header .header-actions > *{ min-width:0 !important; }
  .game-header .filter-btn{
    width:100% !important; height:38px !important; padding:10px 16px !important;
    font-size:14px !important; white-space:nowrap !important; justify-content:center !important;
  }
}

/* ≤449 — в крошках показываем только «Главная» + больше зазор до разделителя */
@media (max-width: 449px){
  .navigation .nav-crumbs .navigation-sep{ display:none !important; }
  .navigation .nav-crumbs > :not(:first-child){ display:none !important; }
  .navigation{ margin-bottom:var(--space-4) !important; }
}

/* ≤399 — каталог: жёстко 1 колонка для всех контейнеров + компактная крошка */
@media (max-width: 399px){
  :is(#products,#products-grid,#catalog,#game-products,
      .products,.products-grid,.products-list,[data-products],
      #cards,.goods-grid,.game-cards,.game-products,.catalog-grid){
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:var(--space-4) !important;
    justify-items:stretch !important;
    align-items:stretch !important;
  }
  .nav-crumbs{ font-size:clamp(11px,3.3vw,15px) !important; }
}

/* 700–1085 — всегда 3 колонки + моб. корзина, десктоп-корзину скрыть */
@media (min-width: 700px) and (max-width: 1085px){
  :is(#products,.products,.products-grid,.cards-grid,.goods-grid){
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:var(--space-4) !important;
    justify-items:stretch !important;
    align-items:stretch !important;
  }
  :is(#products,.products,.products-grid,.cards-grid,.goods-grid) > .product-card{
    grid-column:auto !important;
    width:100% !important; max-width:none !important; min-width:0 !important;
    margin:0 !important; box-sizing:border-box !important;
  }
}

/* 642–681 — сетка шапки без «псевдострок» тайтла */
@media (min-width: 642px) and (max-width: 681px){
  .game-header{
    display:grid; grid-template-columns:156px 1fr; column-gap:var(--space-5);
    align-items:start; margin-bottom:32px;
  }
  .game-logo{ grid-column:1; width:156px; height:166px; object-fit:cover; margin:0; align-self:start; }
  .game-header-content{
    grid-column:2; display:flex; flex-direction:column; justify-content:space-between; min-height:156px;
  }
  .page-title{
    margin:0; line-height:1.05; text-align:center; margin-inline:auto; text-wrap:balance; max-inline-size:28ch;
    hyphens:auto; overflow-wrap:anywhere;
  }
  .game-header .header-actions{
    display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); grid-auto-rows:36px;
    gap:12px 14px; margin-block-start:var(--space-3); justify-items:stretch; align-content:end;
  }
  .game-header .filter-btn{ width:100%; height:36px; padding:8px 14px; font-size:14px; white-space:nowrap; justify-content:center; }
}

/* 682–731 — тайтл в 2 строки через ::before/::after (макетный вариант) */
@media (min-width: 682px) and (max-width: 731px){
  .game-header{
    display:grid !important; grid-template-columns:156px minmax(0,1fr) !important;
    column-gap:var(--space-5) !important; align-items:start !important; margin-bottom:32px !important;
  }
  .game-logo{ width:156px; height:166px; object-fit:cover; }
  .game-header-content{
    display:grid !important; grid-template-rows:auto 1fr !important;
    min-height:166px !important; row-gap:12px !important; align-content:start !important;
  }
  .page-title{
    grid-row:1 !important; margin:0 !important; padding:0 !important;
    font-size:0 !important; line-height:0 !important; justify-self:center !important; max-inline-size:100% !important;
  }
  .page-title::before{
    content:"Star Wars:"; display:block !important; white-space:nowrap !important; text-align:center !important;
    font-size:34px !important; line-height:1.05 !important; color:var(--text,#fff);
  }
  .page-title::after{
    content:"Galaxy of Heroes"; display:block !important; white-space:nowrap !important; text-align:center !important;
    font-size:34px !important; line-height:1.05 !important; color:var(--text,#fff);
  }
  .game-header .header-actions{
    grid-row:2 !important; margin-top:auto !important; align-self:end !important;
    display:grid !important; grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    grid-auto-rows:36px !important; gap:12px 14px !important;
    width:100% !important; max-inline-size:min(100%, calc(2 * 240px + 14px)) !important;
    justify-self:center !important; box-sizing:border-box !important; overflow:hidden !important;
  }
  .game-header .filter-btn{
    min-width:0 !important; width:100% !important; height:36px !important; padding:8px 14px !important;
    white-space:nowrap !important; justify-content:center !important;
  }
}

/* 1086–1186 — 3 карточки + правая корзина (узкая правая колонка) */
@media (min-width: 1086px) and (max-width: 1186px){
  :root{ --cart-w:300px; }
  .main-content{
    display:grid !important; grid-template-columns:repeat(3, minmax(0,1fr)) var(--cart-w) !important;
    gap:var(--space-5); align-items:start;
  }
  :is(#products,.products,.products-grid,.cards-grid,.goods-grid){
    grid-column:1 / span 3 !important;
    display:grid !important; grid-template-columns:repeat(3, minmax(0,1fr)) !important; gap:var(--space-4);
  }
  #cart.cart{ grid-column:4 !important; width:var(--cart-w) !important; flex:0 0 var(--cart-w) !important; position:sticky; top:16px; }

  /* price-row в столбик (более плотная верстка карточки) */
  .product-card .price-row{
    display:grid !important; grid-template-columns:1fr !important; row-gap:10px !important; align-items:center !important;
  }
  .product-card .price-row > *{ min-width:0 !important; }
  .product-card .price-row .add-btn{
    grid-column:1 / -1 !important; justify-self:center !important;
    width:40px !important; height:40px !important; border-radius:50% !important; margin:0 !important;
  }
  .product-card .price-row .counter{
    grid-column:1 / -1 !important; justify-self:stretch !important; width:100% !important;
    display:grid !important; grid-template-columns:auto 1fr auto !important; column-gap:12px !important;
    align-items:center !important; padding:0 12px !important; box-sizing:border-box !important;
  }
}

/* 1187–1280 — как на ПК (3 карточки + правая корзина, стандартная сетка) */
@media (min-width: 1187px) and (max-width: 1280px){
  :root{ --cart-w:300px; }
  .main-content{
    display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) var(--cart-w) !important;
    gap:var(--space-5) !important; align-items:start !important;
  }
  :is(#products,.products,.products-grid,.cards-grid,.goods-grid){
    grid-column:1 / span 3 !important;
    display:grid !important; grid-template-columns:repeat(3, minmax(0,1fr)) !important; gap:var(--space-4) !important;
  }
  #cart.cart{ grid-column:4 !important; width:var(--cart-w) !important; flex:0 0 var(--cart-w) !important; position:sticky; top:16px; }
}

/* ≤919 — «плюс» под ценой, счётчик на всю ширину */
@media (max-width: 919px){
  .product-card .price-row{
    display:grid !important; grid-template-columns:1fr !important; gap:12px; align-items:center;
  }
  .product-card .add-btn{ justify-self:center !important; }
  .product-card .price-row .counter{
    justify-self:stretch !important; width:100%;
    display:grid !important; grid-template-columns:auto 1fr auto; align-items:center; column-gap:12px; padding:0 8px;
  }
  .product-card .counter .dec{ justify-self:start; }
  .product-card .counter .count{ justify-self:center; min-width:2ch; text-align:center; font-weight:600; }
  .product-card .counter .inc{ justify-self:end; }
}

/* ≥1086 — мобильный шит не нужен (только десктоп-корзина) */
@media (min-width: 1086px){
  .cart-drawer{ display:none; }
}

/* ≤1085 — док-бар + шит; зазор снизу, без теней, хэндл над окном */
@media (max-width: 1085px){
  :root{
    --dock-h:72px;                         /* высота док-бара при закрытой корзине */
    --drawer-gap:32px;                     /* зазор снизу при открытой корзине     */
    --sheet-bg:var(--game-panel, var(--panel, #111111));
    --grip-color:color-mix(in srgb, #fff 35%, transparent);
  }

  /* Резерв под док-бар / под 32px при открытом шите */
  body{ padding-bottom:calc(var(--dock-h) + env(safe-area-inset-bottom,0px)) !important; }
  body.drawer-open{ padding-bottom:calc(var(--drawer-gap) + env(safe-area-inset-bottom,0px)) !important; }

  /* Док-бар и десктоп-корзина */
  .mobile-bar,[hidden].mobile-bar{ display:block !important; }
  #cart.cart,.cart-nav{ display:none !important; }
  .cart-drawer{ display:contents !important; }

  /* Скрыт = вообще не виден */
  .cart-drawer[aria-hidden="true"]{ pointer-events:none !important; }
  .cart-drawer[aria-hidden="true"] .cart-drawer__overlay,
  .cart-drawer[aria-hidden="true"] .cart-drawer__sheet{ display:none !important; }

  /* Открыт = шит над 32px, оверлей до самого низа */
  body.drawer-open .mobile-bar{ opacity:0; pointer-events:none; }
  body.drawer-open .cart-drawer__sheet{
    bottom:calc(var(--drawer-gap) + env(safe-area-inset-bottom,0px)) !important;
    max-height:calc(100vh - var(--drawer-gap) - 70px) !important;
  }
  body.drawer-open .cart-drawer__overlay{ bottom:0 !important; }

  /* Подкрашиваем нижний зазор тем же цветом, что и шит */
  body.drawer-open .cart-drawer__overlay::after{
    content:"";
    position:fixed; left:0; right:0; bottom:0;
    height:calc(var(--drawer-gap) + env(safe-area-inset-bottom,0px));
    background:var(--sheet-bg);
    pointer-events:none;
  }

  /* Сам шит: одинаковый фон, без теней, хэндл над окном */
  #cart-drawer .cart-drawer__sheet{
    background:var(--sheet-bg) !important;
    box-shadow:none !important; filter:none !important;
    padding:8px 0 0 !important; margin:0 !important;
    overflow:visible !important; border-top-left-radius:20px; border-top-right-radius:20px;
  }
  #cart-drawer .cart-drawer__sheet::before,
  #cart-drawer .cart-drawer__sheet::after{ content:none !important; display:none !important; }

  #cart-drawer .cart-drawer__grip{
    display:block !important; position:absolute; left:50%; top:-26px; transform:translateX(-50%);
    width:56px; height:4px; border-radius:999px; background:var(--grip-color); pointer-events:auto; cursor:grab;
    box-shadow:0 0 0 1px rgba(255,255,255,.06);
  }
  #cart-drawer .cart-drawer__grip:empty{ height:0; }
  #cart-drawer .cart-drawer__grip:empty::after{
    content:""; display:block; width:56px; height:4px; border-radius:999px;
    background:var(--grip-color); box-shadow:0 0 0 1px rgba(255,255,255,.06);
  }

  /* Футер в цвет шита */
  #cart-drawer .cart-drawer__footer{
    background:transparent !important; box-shadow:none !important;
    border-top-left-radius:0 !important; border-top-right-radius:0 !important;
    padding:12px 16px 16px !important; margin-top:auto !important;
  }

  /* Карточка заказа «как на ПК» (фон/бордеры) */
  #cart-drawer .cart-item{
    background:var(--game-panel-2) !important;
    border:var(--game-border) !important; border-radius:var(--game-radius) !important;
  }

  /* Без лишних «пустых» отступов снизу */
  #cart-drawer .cart-drawer__body,
  #cart-drawer .cart-drawer__content{
    padding-bottom:0 !important; margin-bottom:0 !important; background:transparent !important;
  }
  #cart-drawer .cart-drawer__sheet > *:last-child,
  #cart-drawer .cart-drawer__body  > *:last-child{
    margin-bottom:0 !important; padding-bottom:0 !important;
  }

  /* Служебные «спейсеры»/тени — off */
  #cart-drawer .sheet-spacer,
  #cart-drawer [data-spacer],
  #cart-drawer .spacer,
  #cart-drawer .cart-drawer__bottom,
  #cart-drawer .drawer-bottom,
  #cart-drawer .bottom-shadow,
  #cart-drawer .cart-bottom-sheet{
    display:none !important; height:0 !important; content:none !important;
  }

  /* На мобайле заголовок карточки делаем на две строки */
  .card-title{ --title-maxch:12.5ch; }
}

/* ≤1280 — заголовок карточки: ровно 2 строки */
@media (max-width: 1280px){
  .product-card .card-title{
    display:block; white-space:normal; overflow:hidden;
    min-height:calc(2 * 1.15em);          /* ровно две строки по высоте */
    max-height:calc(2 * 1.15em);
    text-wrap:balance; overflow-wrap:anywhere; hyphens:auto;
  }
  .product-card .card-title .ct-top,
  .product-card .card-title .ct-rest{
    display:block; /* две строки независимо от длины слов */
  }
}

/* ≥1281 — заголовок карточки одной строкой */
@media (min-width: 1281px){
  .product-card .card-title{
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    min-height:0; max-height:none;
  }
}

/* 1086–1280 — на широких с правой корзиной сильнее сжимаем текстовый блок */
@media (min-width: 1086px) and (max-width: 1280px){
  .card-title{ --title-maxch:10.8ch; } /* было 12ch — делаем жёстче */
}
