:root {
  color-scheme: light;
  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --text: #0c0d12;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.14);
  --accent: #e8890e;
  --accent-hover: #cf7608;
  --accent-muted: rgba(232, 137, 14, 0.14);
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 14px 48px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 1px 0 rgba(15, 23, 42, 0.03), 0 6px 28px rgba(15, 23, 42, 0.05);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "DM Sans", system-ui, sans-serif;
  --nav-active-bg: #12192c;
  --nav-active-fg: #ffffff;
  --glass: rgba(255, 255, 255, 0.82);
  --ring: rgba(232, 137, 14, 0.38);
  --hero-mesh-1: rgba(99, 102, 241, 0.09);
  --hero-mesh-2: rgba(232, 137, 14, 0.11);
}

html.theme-dark {
  color-scheme: dark;
  --bg: #060607;
  --surface: #121215;
  --surface-2: #18181d;
  --text: #f4f4f5;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #f4a020;
  --accent-hover: #ffb02e;
  --accent-muted: rgba(244, 160, 32, 0.18);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.035), 0 20px 56px rgba(0, 0, 0, 0.58);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.025), 0 8px 32px rgba(0, 0, 0, 0.42);
  --nav-active-bg: #f4a020;
  --nav-active-fg: #141210;
  --glass: rgba(18, 18, 22, 0.88);
  --ring: rgba(244, 160, 32, 0.42);
  --hero-mesh-1: rgba(99, 102, 241, 0.1);
  --hero-mesh-2: rgba(244, 160, 32, 0.09);
  --shop-pill-bg: #16161c;
  --shop-pill-active: linear-gradient(135deg, #ffe566 0%, #fbbf24 32%, #f59e0b 58%, #ea580c 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 8% -8%, rgba(15, 23, 42, 0.05), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, var(--hero-mesh-2), transparent 52%),
    radial-gradient(720px 420px at 50% 108%, rgba(15, 23, 42, 0.04), transparent 48%);
  background-attachment: fixed;
}

html.theme-dark body {
  background-image:
    radial-gradient(1000px 500px at 6% -6%, var(--hero-mesh-2), transparent 52%),
    radial-gradient(780px 440px at 100% 8%, var(--hero-mesh-1), transparent 55%),
    radial-gradient(640px 380px at 50% 102%, rgba(0, 0, 0, 0.45), transparent 42%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.page {
  padding-bottom: 4rem;
}

/* Topbar */
.topbar {
  position: sticky;
  top: max(12px, env(safe-area-inset-top));
  z-index: 40;
  margin: 12px auto 0;
  width: min(1180px, calc(100% - 24px));
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px max(17px, env(safe-area-inset-right)) 11px max(17px, env(safe-area-inset-left));
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
  container-type: inline-size;
  container-name: topbar;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 0;
  max-width: min(280px, 52vw);
  text-decoration: none;
  color: inherit;
}

@supports (width: 1cqw) {
  .brand {
    max-width: min(300px, 46cqw);
  }
}

.brand-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent-muted), rgba(15, 23, 42, 0.04));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-ico img,
img.brand-ico-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-ico .ico-svg {
  width: 20px;
  height: 20px;
}

/* Одно PNG-лого шапки (assets/img/brand-header.png) — не растягивать натуральный размер */
.brand-logo-img {
  display: block;
  height: 30px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
}

html.theme-dark .brand-ico {
  background: linear-gradient(145deg, var(--accent-muted), rgba(255, 255, 255, 0.03));
}

.brand-ico:has(.brand-favicon) {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
  padding: 3px;
}

html.theme-dark .brand-ico:has(.brand-favicon) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.brand-favicon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.brand-name {
  font-size: 0.9375rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Узкая шапка: название не помещается — остаётся только логотип */
@container topbar (max-width: 560px) {
  .brand-name {
    display: none;
  }

  .brand {
    max-width: none;
  }
}

/* Кнопка «гамбургер»: только узкий экран */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.nav-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

html.theme-dark .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle-svg {
  display: block;
  pointer-events: none;
}

.nav-links {
  flex: 1;
  justify-content: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 1199px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 12px 12px;
    margin: 0;
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .topbar-inner.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 10px;
  }
}

@media (min-width: 1200px) {
  .nav-toggle {
    display: none !important;
  }

  .nav-links {
    display: flex !important;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 0;
    margin: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(18, 25, 44, 0.05);
}

html.theme-dark .nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-link {
  font-size: 0.88rem;
  color: var(--muted);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.topbar-social-link__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.topbar-social-link__ico .footer-social-ico {
  width: 20px;
  height: 20px;
}

.topbar-social-link--telegram {
  border-color: rgba(42, 171, 238, 0.65);
  color: #2aabee;
}

.topbar-social-link--discord {
  border-color: rgba(88, 101, 242, 0.65);
  color: #5865f2;
}

.topbar-social-link--vk {
  border-color: rgba(0, 119, 255, 0.65);
  color: #0077ff;
}

.topbar-social-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

.topbar-social-link--telegram:hover {
  border-color: #2aabee;
  background: rgba(42, 171, 238, 0.1);
}

.topbar-social-link--discord:hover {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
}

.topbar-social-link--vk:hover {
  border-color: #0077ff;
  background: rgba(0, 119, 255, 0.1);
}

html.theme-dark .topbar-social-link {
  background: rgba(255, 255, 255, 0.04);
}

html.theme-dark .topbar-social-link:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.topbar-social-link:active {
  transform: translateY(0);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

html.theme-dark .icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.theme-ico {
  display: flex;
  align-items: center;
  justify-content: center;
}

html.theme-light .theme-ico-moon,
html:not(.theme-dark) .theme-ico-moon {
  display: none;
}

html.theme-dark .theme-ico-sun {
  display: none;
}

/* Нет индикатора «системная тема»; плюс сброс кеша старых ::after у кнопки */
#theme-toggle::before,
#theme-toggle::after {
  content: none !important;
  display: none !important;
  box-shadow: none !important;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), var(--surface));
  cursor: pointer;
  font: inherit;
  box-shadow: 0 2px 12px rgba(18, 25, 44, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.cart-btn:hover {
  border-color: rgba(232, 137, 14, 0.5);
  box-shadow: 0 6px 22px var(--accent-muted);
}

html.theme-dark .cart-btn {
  background: linear-gradient(180deg, rgba(40, 40, 46, 0.98), var(--surface));
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

html.theme-dark .cart-btn:hover {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.cart-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.cart-sum {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 720px) {
  .shell {
    width: min(1180px, calc(100% - 20px));
  }

  .page {
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
  }

  .topbar {
    width: min(1180px, calc(100% - 16px));
    margin-top: 8px;
    top: max(8px, env(safe-area-inset-top));
  }

  .topbar-inner {
    gap: 10px;
    padding: 9px max(12px, env(safe-area-inset-right)) 9px max(12px, env(safe-area-inset-left));
  }

  .brand-ico {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .brand-ico .ico-svg {
    width: 18px;
    height: 18px;
  }

  .brand-favicon {
    width: 18px;
    height: 18px;
  }

  .brand-logo-img {
    height: 28px;
    max-width: min(180px, 50vw);
  }

  .cart-btn {
    padding: 7px 10px;
    gap: 8px;
    flex-shrink: 0;
  }

  .cart-sum {
    font-size: 0.84rem;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .topbar-social {
    gap: 6px;
  }

  .topbar-social-link {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .topbar-social-link__ico .footer-social-ico {
    width: 18px;
    height: 18px;
  }

  .hero {
    width: min(1180px, calc(100% - 16px));
    min-height: 220px;
    margin-top: 14px;
    margin-bottom: 22px;
  }

  .hero-inner {
    padding: 32px 18px 28px;
  }

  .hero-title {
    font-size: clamp(1.2rem, 4.5vw, 1.75rem);
  }
}

@media (max-width: 380px) {
  .brand-name {
    max-width: min(120px, 36vw);
  }

  .cart-btn {
    padding: 6px 8px;
  }
}

/* Hero */
.hero {
  position: relative;
  margin: 20px auto 28px;
  width: min(1180px, calc(100% - 24px));
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(30, 20, 60, 0.75), rgba(180, 80, 120, 0.45));
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 48px 32px 40px;
  color: #fff;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw + 0.55rem, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
  line-height: 1.12;
}

.hero-sub {
  margin: 10px 0 24px;
  opacity: 0.95;
  font-size: 1.05rem;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
  /* без backdrop-filter: при смене темы (View Transitions) размытие даёт артефакты-«призраки» */
}

.hero-status-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}

.hero-status-line {
  font-weight: 600;
}

.hero-status-sub {
  font-size: 0.82em;
  font-weight: 400;
  opacity: 0.88;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
}

.dot.on {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.dot.off {
  background: #ef4444;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
}

/* Layout shop */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto 48px;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

.main-col {
  background: rgba(255, 255, 255, 0.58);
  border-radius: calc(var(--radius) + 2px);
  padding: 22px 20px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.theme-dark .main-col {
  background: rgba(14, 14, 18, 0.82);
  border-color: rgba(255, 255, 255, 0.065);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.5);
}

@media (min-width: 960px) {
  html.theme-dark .sidebar {
    gap: 14px;
  }
}

.toolbar-titles {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-padding-inline: 4px;
}

@media (min-width: 960px) {
  .sidebar {
    flex-direction: column;
    position: sticky;
    top: 88px;
    gap: 12px;
    overflow: visible;
    scroll-snap-type: none;
    touch-action: auto;
    padding: 0 0 6px;
  }
}

/* Компактные «пилюли» категорий: телефоны и планшеты (< 960px) */
.cat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 0;
  flex-shrink: 0;
  width: auto;
  max-width: min(100%, 320px);
  scroll-snap-align: start;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 14px rgba(18, 25, 44, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s, color 0.2s;
}

@media (min-width: 960px) {
  .cat-pill {
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    width: 100%;
    max-width: none;
    min-width: unset;
    box-shadow: var(--shadow-soft);
  }
}

.cat-pill:hover {
  border-color: #cfd6df;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(18, 25, 44, 0.1);
}

.cat-pill.active {
  background: linear-gradient(145deg, #1a2340 0%, var(--nav-active-bg) 55%, #0e1424 100%);
  color: var(--nav-active-fg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 14px 40px rgba(18, 25, 44, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cat-pill.active .cat-meta {
  color: rgba(255, 255, 255, 0.78);
}

.cat-ico {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 25, 44, 0.06), rgba(18, 25, 44, 0.02));
  border: 1px solid rgba(228, 232, 237, 0.95);
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cat-ico svg {
  width: 16px;
  height: 16px;
}

@media (min-width: 960px) {
  .cat-ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .cat-ico svg {
    width: 24px;
    height: 24px;
  }
}

.cat-pill:hover .cat-ico {
  border-color: rgba(207, 214, 223, 0.95);
  box-shadow: 0 4px 14px rgba(18, 25, 44, 0.06);
}

.cat-pill.active .cat-ico {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--nav-active-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html.theme-dark .cat-ico {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
}

.cat-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-name {
  font-weight: 600;
  font-size: 0.84rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cat-meta {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}

@media (min-width: 960px) {
  .cat-name {
    font-size: 0.95rem;
  }

  .cat-meta {
    font-size: 0.78rem;
  }
}

.toolbar {
  margin-bottom: 20px;
}

.toolbar-head {
  margin-bottom: 14px;
}

.shop-heading {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.shop-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 42rem;
}

@media (max-width: 640px) {
  .shop-hint {
    font-size: 0.82rem;
  }
}

.toolbar-field {
  margin-top: 4px;
}

.toolbar-err {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  font-size: 0.9rem;
}

html.theme-dark .toolbar-err {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.select-wrap {
  max-width: 280px;
}

.select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(18, 25, 44, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select:focus {
  outline: none;
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.16);
}

html.theme-dark .select {
  background: rgba(26, 30, 42, 0.96);
}

/* Красивый выбор сервера (кастомный список вместо системного) */
.select-wrap {
  position: relative;
}

.sel-btn {
  width: 100%;
  text-align: left;
  padding: 12px 42px 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 2px 12px rgba(18, 25, 44, 0.05);
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sel-btn::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.sel-btn:focus-visible {
  outline: none;
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.16);
}

.select-wrap.is-open .sel-btn {
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.16);
}

.select-wrap.is-open .sel-btn::after {
  transform: translateY(-30%) rotate(225deg);
}

.sel-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(18, 25, 44, 0.14);
}

.sel-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 500;
  color: #1c1f27;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sel-item:hover {
  background: rgba(232, 148, 22, 0.12);
}

.sel-item.is-active {
  color: var(--accent);
  font-weight: 700;
  background: rgba(232, 148, 22, 0.18);
}

html.theme-dark .sel-btn,
html.theme-dark .sel-list {
  background: rgba(26, 30, 42, 0.96);
  color: #e8e8f0;
}

html.theme-dark .sel-item {
  color: #e8e8f0;
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 22px;
}

.card-product {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.2s ease;
}

/* Клик по карточке → product.php; кнопка «В корзину» — отдельно (pointer-events) */
.card-product-stretch {
  position: absolute;
  inset: 0;
  z-index: 0;
  text-decoration: none;
}

.card-product-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  pointer-events: none;
}

.card-product-content .btn-add-cart {
  pointer-events: auto;
}

/* Иначе клик по картинке «держится» на img и не доходит до .card-product-stretch */
.card-product-content .card-img-wrap img {
  pointer-events: none;
}

.card-product-stretch:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(232, 148, 22, 0.45);
  border-radius: var(--radius);
}

.card-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 56px rgba(18, 25, 44, 0.14);
  border-color: rgba(232, 148, 22, 0.35);
}

html.theme-dark .card-product:hover {
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5);
  border-color: rgba(244, 160, 32, 0.25);
}

.card-img-wrap {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 12px 12px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-product:hover .card-img-wrap img {
  transform: scale(1.06);
}

.card-product:hover .card-title {
  color: var(--accent);
}

.card-title {
  margin: 12px 14px 4px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.card-price {
  margin: 4px 14px 14px;
  margin-top: auto;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: #9a5a05;
}

html.theme-dark .card-price {
  color: #fcd34d;
}

.card-sale-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.card-sale-badge {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 10px;
  padding: 5px 8px;
  line-height: 1;
}

.card-sale-badge--pct {
  top: 10px;
  left: 10px;
  background: rgba(18, 25, 44, 0.55);
  color: #ff9f1a;
  backdrop-filter: blur(4px);
}

.card-sale-badge--hot {
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ff8a1a, #e86800);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.card-sale-fire {
  font-size: 0.85rem;
  line-height: 1;
}

.card-sale-badges--product .card-sale-badge--pct {
  top: 12px;
  left: 12px;
}

.card-sale-badges--product .card-sale-badge--hot {
  top: 12px;
  right: 12px;
}

.card-price-block {
  margin: 4px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: flex-start;
}

.card-price-block .card-price {
  margin: 0;
}

.card-price--sale {
  font-size: 1.15rem;
  font-weight: 800;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.card-price-meta {
  margin: 0;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-price-old {
  color: var(--muted);
}

.card-price-pct {
  color: #e86800;
  font-weight: 700;
}

html.theme-dark .card-price-pct {
  color: #fdba74;
}

.product-hero-visual {
  position: relative;
  flex: 0 0 auto;
  width: min(280px, 36vw);
  max-width: 320px;
  min-width: 0;
}

.product-hero-visual .card-sale-badges--product {
  pointer-events: none;
}

.product-buy-price--sale {
  font-size: 1.75rem;
}

.product-buy-price-meta {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.product-price-old {
  color: var(--muted);
}

.product-price-pct {
  color: #e86800;
  font-weight: 700;
  margin-left: 6px;
}

.product-sim-price-row {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
}

.product-sim-price--sale {
  font-weight: 700;
  color: var(--text);
}

/* Sections */
.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px;
  width: min(1180px, calc(100% - 24px));
  margin-inline: auto;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.section-title--center {
  text-align: center;
  width: 100%;
  max-width: none;
}

.section-servers,
.section-recent {
  width: min(1180px, calc(100% - 24px));
  margin-inline: auto;
}

/* Отступы между каталогом, сервером и последними покупками — визуально отдельные блоки */
.section-servers {
  margin-top: 20px;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .section-servers {
    margin-top: 28px;
    margin-bottom: 44px;
  }
}

.section-servers .section-title {
  margin-bottom: 14px;
}

.section-recent {
  margin-bottom: 52px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px 16px 28px;
  box-shadow: var(--shadow-soft);
}

.section-recent .section-title {
  margin-bottom: 22px;
}

html.theme-dark .section-recent {
  background: linear-gradient(180deg, rgba(26, 30, 42, 0.92) 0%, rgba(20, 24, 34, 0.88) 100%);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Ровно 6 карточек: 2×3 на телефоне, 3×2 от планшета */
.recent-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
  padding: 4px 0 0;
}

@media (min-width: 520px) {
  .recent-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 900px) {
  .recent-row {
    gap: 18px 20px;
    max-width: 100%;
  }
}

.recent-empty {
  grid-column: 1 / -1;
  text-align: center;
  margin: 16px 0;
  padding: 8px;
}

.recent-item {
  width: 100%;
  min-width: 0;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 10px 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.recent-item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 10px 28px rgba(18, 25, 44, 0.08);
  border-color: rgba(232, 148, 22, 0.35);
}

html.theme-dark .recent-item {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

html.theme-dark .recent-item:hover {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.recent-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.recent-frame {
  display: grid;
  align-items: stretch;
  width: 100%;
  max-width: 88px;
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 14px;
  padding: 3px;
  box-sizing: border-box;
  background: linear-gradient(160deg, #eef2f7 0%, #e2e8f0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 4px 14px rgba(15, 23, 42, 0.08);
}

.recent-item--case .recent-frame {
  background: linear-gradient(150deg, rgba(254, 243, 199, 0.95) 0%, rgba(253, 224, 71, 0.55) 45%, rgba(167, 243, 208, 0.5) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 16px rgba(234, 179, 8, 0.18);
}

html.theme-dark .recent-frame {
  background: linear-gradient(160deg, rgba(40, 48, 64, 0.95) 0%, rgba(28, 34, 48, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

html.theme-dark .recent-item--case .recent-frame {
  background: linear-gradient(150deg, rgba(120, 53, 15, 0.45) 0%, rgba(21, 128, 61, 0.35) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 18px rgba(234, 179, 8, 0.12);
}

.recent-img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.recent-body {
  margin-top: 0;
  text-align: center;
  min-width: 0;
}

.recent-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.015em;
}

.recent-user {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 500;
  min-width: 0;
}

.recent-user .user-ico {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.8;
}

.server-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

.server-card-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.server-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(232, 148, 22, 0.18), rgba(18, 25, 44, 0.06));
  border: 1px solid rgba(228, 232, 237, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.server-card-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.server-card-sub {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ip-row {
  margin-top: 16px;
}

.ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.muted {
  color: var(--muted);
}

/* Modal */
.modal-root[hidden] {
  display: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.45);
  backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:hover {
  border-color: #cfd6df;
}

.input:focus {
  outline: none;
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.16);
}

html.theme-dark .input {
  background: rgba(26, 30, 42, 0.85);
}

.form-error {
  color: #b91c1c;
  font-size: 0.88rem;
  margin: 0;
}

/* Уведомления об ошибках (верх экрана) */
.gg-toast-root {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.gg-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 52px 12px 20px;
  background: #e53935;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  animation: gg-toast-in 0.28s ease;
}

.gg-toast__text {
  max-width: min(42rem, calc(100vw - 88px));
}

.gg-toast__close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.gg-toast__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.gg-toast__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

@keyframes gg-toast-in {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gg-toast {
    animation: none;
  }
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 3rem;
  padding: 2.25rem 0 max(28px, env(safe-area-inset-bottom, 0px));
  color: #e8eaef;
  background: linear-gradient(180deg, #14151c 0%, #0b0c10 48%, #07080b 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -24px 48px rgba(0, 0, 0, 0.12);
}

.site-footer__accent {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(232, 137, 14, 0.35) 20%, #f4a020 50%, rgba(232, 137, 14, 0.35) 80%, transparent 100%);
  opacity: 0.95;
}

.site-footer__inner {
  padding-top: 2.25rem;
}

.footer-grid {
  display: grid;
  gap: 32px 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 10px;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.footer-brand-note {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-footer .brand-ico {
  background: linear-gradient(145deg, rgba(244, 160, 32, 0.22) 0%, rgba(232, 137, 14, 0.08) 100%);
  border-color: rgba(244, 160, 32, 0.28);
  color: #fbbf24;
}

.site-footer .brand-ico:has(.brand-favicon) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  padding: 3px;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: minmax(200px, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.footer-col--brand {
  max-width: 26rem;
}

.footer-logo {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  outline-offset: 4px;
  transition: opacity 0.15s ease;
}

.footer-logo:hover {
  opacity: 0.92;
}

.footer-logo:focus-visible {
  outline: 2px solid rgba(244, 160, 32, 0.75);
}

.footer-logo__ico {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(244, 160, 32, 0.22) 0%, rgba(232, 137, 14, 0.08) 100%);
  border: 1px solid rgba(244, 160, 32, 0.28);
  color: #fbbf24;
}

.footer-logo__ico .ico-svg {
  width: 26px;
  height: 26px;
  color: #fbbf24;
}

.footer-logo__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-top: 2px;
}

.footer-logo__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fafafa;
}

.footer-logo__tag {
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.35;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
}

.footer-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

.footer-heading,
.footer-h {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.footer-heading--spaced {
  margin-top: 1.5rem;
}

.footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px 10px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f4f4f5;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.footer-social-link__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.footer-social-link__ico .footer-social-ico {
  display: block;
}

.footer-social-link--vk .footer-social-link__ico {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.footer-social-ico--vk {
  color: #0077ff;
}

.footer-social-link--vk:hover .footer-social-ico--vk {
  color: #5aa9ff;
}

.footer-social-link--telegram .footer-social-link__ico {
  color: #5ccfff;
}

.footer-social-link--discord .footer-social-link__ico {
  color: #aab3ff;
}

.footer-social-link:hover {
  border-color: rgba(244, 160, 32, 0.45);
  background: rgba(244, 160, 32, 0.1);
  color: #fde68a;
}

.footer-social-link:hover .footer-social-link__ico {
  background: rgba(255, 255, 255, 0.08);
}

.footer-social-link:active {
  transform: scale(0.98);
}

.footer-social-link__label {
  line-height: 1.2;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links a {
  display: inline-block;
  padding: 6px 0;
  font-size: 0.93rem;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-links a:hover {
  color: #fde68a;
  border-bottom-color: rgba(244, 160, 32, 0.45);
}

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.footer-copy {
  margin: 0;
  font-size: 0.84rem;
  color: #6b7280;
  line-height: 1.45;
}

.footer-to-top {
  font-size: 0.82rem;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.footer-to-top:hover {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.05);
}

.footer-to-top:focus-visible {
  outline: 2px solid rgba(244, 160, 32, 0.6);
  outline-offset: 2px;
}

@media (max-width: 719px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.footer-powered {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #272b36;
  text-align: center;
  font-size: 0.88rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ed-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #111;
  font-weight: 800;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

html.theme-dark .card-product,
html.theme-dark .server-card,
html.theme-dark .recent-item,
html.theme-dark .cart-drawer {
  background: var(--surface);
}

/* Категории в тёмной теме: «карточки», активный градиент, светлая обводка при hover */
html.theme-dark .cat-pill:not(.active) {
  background: var(--shop-pill-bg);
  border-color: rgba(255, 255, 255, 0.065);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 32px rgba(0, 0, 0, 0.45);
}

html.theme-dark .cat-pill:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 14px 40px rgba(0, 0, 0, 0.55);
}

html.theme-dark .cat-pill:hover:not(.active) .cat-ico {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

html.theme-dark .cat-pill.active {
  background: var(--shop-pill-active);
  color: #14100c;
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow:
    0 12px 36px rgba(245, 158, 11, 0.32),
    0 6px 20px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

html.theme-dark .cat-pill.active .cat-meta {
  color: rgba(35, 28, 18, 0.62);
}

html.theme-dark .cat-pill.active .cat-ico {
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.12);
  color: #2a2418;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html.theme-dark .cat-pill.active:hover {
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  box-shadow:
    0 14px 42px rgba(245, 158, 11, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* --- корзина, оплата, кнопка в карточке --- */
.btn-add-cart {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0 11px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #ffa726 0%, #fb8c00 45%, #f57c00 100%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 22px rgba(245, 124, 0, 0.48);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  transition:
    max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.32s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.btn-add-cart__ico {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.btn-add-cart .ico-svg,
.btn-add-cart__svg {
  color: #fff;
}

.btn-add-cart__label {
  display: block;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    opacity 0.26s ease 0.05s,
    max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-add-cart:hover,
  .btn-add-cart:focus-visible {
    max-width: 200px;
    gap: 8px;
    padding: 0 14px 0 11px;
    justify-content: flex-start;
    box-shadow: 0 10px 30px rgba(245, 124, 0, 0.58);
    transform: translateY(-1px);
  }

  .btn-add-cart:hover .btn-add-cart__label,
  .btn-add-cart:focus-visible .btn-add-cart__label {
    max-width: 120px;
    opacity: 1;
  }
}

/* Сенсор: подпись всегда видна */
@media (hover: none) {
  .btn-add-cart {
    max-width: 200px;
    gap: 8px;
    padding: 0 14px 0 11px;
    justify-content: flex-start;
  }

  .btn-add-cart__label {
    max-width: 120px;
    opacity: 1;
  }
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 26, 0.45);
  z-index: 120;
  backdrop-filter: blur(3px);
}

html.theme-dark .cart-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(920px, 100%);
  height: 100%;
  max-height: 100dvh;
  background: var(--surface);
  z-index: 130;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  min-height: 0;
}

.cart-drawer.open {
  transform: translateX(0);
}

/* Телефоны: корзина на весь экран, без «щели» под панелью и без лишних отступов */
@media (max-width: 959px) {
  html.gg-cart-open {
    overflow: hidden;
    touch-action: none;
  }

  .cart-backdrop {
    background: rgba(15, 17, 26, 0.72);
  }

  html.theme-dark .cart-backdrop {
    background: rgba(0, 0, 0, 0.78);
  }

  .cart-drawer {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transform: translateY(100%);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .cart-drawer::before {
    display: none;
  }

  .cart-drawer.open {
    transform: translateY(0);
  }

  .cart-drawer-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .cart-drawer-col--items {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
  }

  #cart-drawer[data-cart-ui-step="2"] .cart-drawer-col--items,
  #cart-drawer[data-cart-ui-step="3"] .cart-drawer-col--items {
    display: none;
  }

  #cart-drawer[data-cart-ui-step="1"] .cart-drawer-col--checkout {
    display: none;
  }

  #cart-drawer[data-cart-ui-step="2"] .cart-drawer-col--checkout,
  #cart-drawer[data-cart-ui-step="3"] .cart-drawer-col--checkout {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
  }

  .cart-step-foot--items {
    display: block;
    flex-shrink: 0;
    padding: 10px 12px max(12px, env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .cart-step-foot--details,
  .cart-step-foot--pay {
    flex-shrink: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .cart-step-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .cart-checkout-pane {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
  }

  .cart-pane-lead {
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
  }

  .cart-totals-block {
    margin-bottom: 10px;
  }

  .cart-totals-block--compact .cart-total-row {
    margin-bottom: 0;
  }

  .cart-checkout-pane:not([hidden]) {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
  }

  .cart-checkout-pane:not([hidden]) .pay-methods {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cart-checkout-pane:not([hidden]) .cart-step-foot--details,
  .cart-checkout-pane:not([hidden]) .cart-step-foot--pay {
    margin-top: auto;
    flex-shrink: 0;
  }

  .cart-scroll-outer {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .cart-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 12px 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }

  .cart-items-head .cart-col-title {
    padding: 4px 12px 2px;
  }

  .cart-scroll-hint {
    padding: 0 12px 4px;
  }

  .cart-drawer-col--checkout {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .cart-drawer-panel {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px 12px 0;
  }

  .cart-checkout-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }

  #cart-drawer[data-cart-ui-step="2"] .cart-step-foot--details,
  #cart-drawer[data-cart-ui-step="3"] .cart-step-foot--pay {
    flex-shrink: 0;
    padding: 10px 0 max(12px, env(safe-area-inset-bottom, 0));
    background: var(--surface);
  }

  .cart-line {
    padding: 8px 10px;
    gap: 10px;
  }

  .cart-line img {
    width: 48px;
    height: 48px;
  }

  .cart-lines {
    gap: 8px;
  }

  .cart-total-row {
    padding-bottom: 4px;
  }

  .cart-step .btn-lg {
    padding: 14px 18px;
    min-height: 48px;
  }

  .pay-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .pay-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .cart-drawer-head {
    padding: max(8px, env(safe-area-inset-top, 0)) 12px 8px;
    flex-shrink: 0;
  }

  .cart-steps {
    padding: 6px 12px;
    flex-shrink: 0;
  }

  .cart-title {
    font-size: 1.05rem;
  }
}

.cart-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top, 0)) 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-head-text {
  min-width: 0;
}

.cart-kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 25, 44, 0.02);
  flex-shrink: 0;
}

html.theme-dark .cart-steps {
  background: rgba(0, 0, 0, 0.2);
}

.cart-step-pill {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.cart-step-pill.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 148, 22, 0.12);
  transform: scale(1.05);
}

.cart-steps-line {
  flex: 1;
  max-width: 48px;
  height: 2px;
  border-radius: 2px;
  background: var(--border);
}

.cart-step-pill.is-done {
  background: rgba(232, 148, 22, 0.2);
  color: var(--accent);
  border-color: rgba(232, 148, 22, 0.35);
}

.cart-checkout-pane {
  min-height: 0;
}

.cart-checkout-pane[hidden] {
  display: none !important;
}

#cart-drawer[data-cart-ui-step="1"] .cart-drawer-col--checkout {
  display: none !important;
}

#cart-drawer[data-cart-ui-step="2"] .cart-drawer-col--items,
#cart-drawer[data-cart-ui-step="3"] .cart-drawer-col--items {
  display: none !important;
}

#cart-drawer[data-cart-ui-step="1"] .cart-step-foot--items {
  display: block;
}

#cart-drawer:not([data-cart-ui-step="1"]) .cart-step-foot--items {
  display: none;
}

#cart-drawer[data-cart-ui-step="2"] .cart-drawer-col--checkout,
#cart-drawer[data-cart-ui-step="3"] .cart-drawer-col--checkout {
  flex: 1 1 100%;
  max-width: none;
}

#cart-drawer[data-cart-ui-step="2"] .cart-drawer-panel,
#cart-drawer[data-cart-ui-step="3"] .cart-drawer-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#cart-drawer[data-cart-ui-step="2"] .cart-checkout-pane:not([hidden]),
#cart-drawer[data-cart-ui-step="3"] .cart-checkout-pane:not([hidden]) {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#cart-drawer[data-cart-ui-step="2"] .cart-checkout-scroll,
#cart-drawer[data-cart-ui-step="3"] .cart-checkout-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cart-pane-lead {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.cart-totals-block {
  margin-bottom: 12px;
}

.cart-step-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-step-foot--details,
.cart-step-foot--pay {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}


.cart-drawer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 720px) {
  .cart-drawer-body {
    flex-direction: row;
    align-items: stretch;
  }
}

.cart-drawer-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cart-drawer-col--items {
  flex: 1 1 52%;
  border-bottom: 1px solid var(--border);
}

.cart-items-head {
  flex-shrink: 0;
}

.cart-scroll-hint {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 20px 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.cart-scroll-hint__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 8px;
  background: rgba(232, 148, 22, 0.12);
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.cart-scroll-outer {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-scroll-outer::after {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: linear-gradient(to top, var(--surface) 18%, transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 1;
}

.cart-scroll-outer.is-scroll-fade::after {
  opacity: 1;
}

html.theme-dark .cart-scroll-outer::after {
  background: linear-gradient(to top, var(--surface) 22%, transparent);
}

@media (max-width: 959px) {
  .cart-scroll-hint:not([hidden]) {
    display: flex;
  }
}

@media (min-width: 720px) {
  .cart-drawer-col--items {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}

.cart-col-title {
  margin: 0;
  padding: 12px 20px 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-drawer-col--checkout {
  flex: 1 1 48%;
  max-height: none;
}

@media (min-width: 720px) {
  .cart-drawer-col--checkout {
    flex: 0 0 min(380px, 42%);
    max-height: none;
  }
}

.cart-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 20px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.cart-drawer-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0));
  border-top: none;
  background: var(--surface);
  box-shadow: none;
}

@media (min-width: 720px) {
  .cart-drawer-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), var(--surface));
  }

  html.theme-dark .cart-drawer-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), var(--surface));
  }
}

.cart-title {
  margin: 0;
  font-size: 1.2rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.cart-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cart-close:hover {
  background: var(--bg);
  color: var(--text);
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.cart-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

.cart-line img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-line-mid {
  flex: 1;
  min-width: 0;
}

.cart-line-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.cart-line-price {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
}

.cart-line-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.theme-dark .cart-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.cart-pill--price {
  flex: 1 1 120px;
  min-width: min(160px, 42%);
}

.cart-pill--qty {
  flex: 1 1 120px;
  min-width: min(160px, 42%);
}

.cart-pill__val {
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.02em;
}

.cart-pill__suffix {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
}

.cart-pill__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 3.5rem;
  max-width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  padding: 0;
  margin: 0;
  text-align: left;
  -moz-appearance: textfield;
}

.cart-pill__input::-webkit-outer-spin-button,
.cart-pill__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-pill__input:focus {
  outline: none;
}

.cart-pill--qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-left: 4px;
  padding-right: 6px;
}

.cart-pill--qty-stepper .cart-pill__input {
  width: 2.75rem;
  min-width: 2.75rem;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.cart-qty-step {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(18, 25, 44, 0.06);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-step:hover {
  background: rgba(232, 148, 22, 0.2);
  color: var(--accent);
}

html.theme-dark .cart-qty-step {
  background: rgba(255, 255, 255, 0.08);
}

html.theme-dark .cart-qty-step:hover {
  background: rgba(244, 160, 32, 0.22);
}

.cart-pill--qty:focus-within {
  border-color: rgba(232, 137, 14, 0.45);
  box-shadow: 0 0 0 2px rgba(232, 137, 14, 0.12);
}

html.theme-dark .cart-pill--qty:focus-within {
  border-color: rgba(244, 160, 32, 0.45);
  box-shadow: 0 0 0 2px rgba(244, 160, 32, 0.12);
}

.cart-qty-hint {
  margin-top: 8px;
  margin-bottom: 0;
}

.cart-line-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  align-self: center;
}

.cart-promo-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 4px 0 2px;
}

.cart-promo-compact-lbl {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.cart-promo-input {
  flex: 1 1 56px;
  min-width: 56px;
  max-width: 9rem;
  font-size: 0.82rem !important;
  padding: 5px 8px !important;
  line-height: 1.25;
}

.cart-promo-apply {
  flex: 0 0 auto;
  padding: 5px 10px !important;
  font-size: 0.75rem !important;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.cart-promo-clear {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-promo-clear:hover {
  color: var(--text);
  background: rgba(18, 25, 44, 0.06);
}

html.theme-dark .cart-promo-clear:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cart-promo-msg {
  margin: 2px 0 10px !important;
  min-height: 1em;
  font-size: 0.72rem !important;
}

.cart-total-break {
  font-size: 0.85rem;
  margin-bottom: 10px;
  padding: 0 4px;
}

.cart-total-break-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.cart-total-break-row--promo .cart-promo-discount {
  color: #c2410c;
  font-weight: 700;
}

html.theme-dark .cart-total-break-row--promo .cart-promo-discount {
  color: #fdba74;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(18, 25, 44, 0.04);
  border: 1px solid rgba(228, 232, 237, 0.9);
}

.cart-total-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.cart-total-sum {
  font-size: 1.25rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--text);
}

html.theme-dark .cart-total-row {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--border);
}

.cart-step .field {
  display: block;
  margin-bottom: 6px;
}

.field-hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.req {
  color: var(--accent);
  font-weight: 700;
}

.cart-pay-lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.cart-step .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.cart-step .check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.cart-step .check a {
  color: var(--accent);
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pay-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 22px rgba(245, 166, 35, 0.2);
}

.pay-ico {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(18, 25, 44, 0.05), rgba(18, 25, 44, 0.02));
  border: 1px solid var(--border);
  color: var(--accent);
}

.pay-ico-svg {
  color: inherit;
}

.pay-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-txt small {
  color: var(--muted);
  font-weight: 400;
}

.small {
  font-size: 0.88rem;
}

.cart-empty {
  text-align: center;
  padding: 1rem 0;
}

.cart-empty-card {
  text-align: center;
  padding: 28px 20px 32px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

html.theme-dark .cart-empty-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.15));
  border-color: rgba(255, 255, 255, 0.12);
}

.cart-empty-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--accent-muted);
  color: var(--accent);
}

.cart-empty-ico .ico-svg {
  opacity: 0.9;
}

.cart-empty-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.cart-empty-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 260px;
  margin-inline: auto;
}

.cart-pill--solo {
  flex: 1 1 100%;
  max-width: 220px;
}

.cart-pill--sum {
  flex: 1 1 120px;
  min-width: min(160px, 42%);
}

.cart-pill--rill-qty {
  flex: 1 1 120px;
  min-width: min(160px, 42%);
}

.cart-pill--rill-qty:focus-within {
  border-color: rgba(232, 137, 14, 0.45);
  box-shadow: 0 0 0 2px rgba(232, 137, 14, 0.12);
}

html.theme-dark .cart-pill--rill-qty:focus-within {
  border-color: rgba(244, 160, 32, 0.45);
  box-shadow: 0 0 0 2px rgba(244, 160, 32, 0.12);
}

.cart-pill--sum:focus-within {
  border-color: rgba(232, 137, 14, 0.45);
  box-shadow: 0 0 0 2px rgba(232, 137, 14, 0.12);
}

html.theme-dark .cart-pill--sum:focus-within {
  border-color: rgba(244, 160, 32, 0.45);
  box-shadow: 0 0 0 2px rgba(244, 160, 32, 0.12);
}

/* SVG-иконки (Lucide-подобные) */
.ico-svg {
  display: block;
  flex-shrink: 0;
}

.ico-svg--brand {
  color: var(--accent);
}

.ico-svg--muted {
  opacity: 0.55;
}

.ico-svg--on-accent {
  color: #141210;
}

.footer-social-ico {
  stroke: none;
}

.user-ico {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
}

.copy-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  color: var(--muted);
}

.ip-pill:hover .copy-ico {
  opacity: 1;
  color: var(--accent);
}

/* Доступность и полировка */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.35), var(--shadow);
}

.btn-add-cart:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.65),
    0 0 0 4px rgba(245, 124, 0, 0.45),
    0 10px 30px rgba(245, 124, 0, 0.5);
}

.btn:focus-visible,
.select:focus-visible,
.input:focus-visible,
.cat-pill:focus-visible,
.pay-card:focus-visible,
.cart-close:focus-visible,
.icon-btn:focus-visible,
.topbar-social-link:focus-visible,
.cart-btn:focus-visible,
.ip-pill:focus-visible,
.skip-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .cart-drawer,
  .btn-add-cart,
  .btn-add-cart__label,
  .card-product,
  .cat-pill,
  .pay-card,
  .card-img-wrap img {
    transition: none !important;
  }

  .cart-scroll-outer::after {
    transition: none !important;
  }

  .card-product:hover {
    transform: none;
  }

  .card-product:hover .card-img-wrap img {
    transform: none;
  }

  .btn-add-cart:hover {
    transform: none;
  }
}

/* ——— Карточка товара (SEO), каталог, текстовые страницы ——— */
.muted-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.muted-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.card-product-permalink {
  color: inherit;
  text-decoration: none;
}
.card-product-permalink:hover {
  color: var(--accent);
  text-decoration: underline;
}

.product-back {
  margin: 0 0 1rem;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr min(320px, 100%);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

.product-hero {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 24px 28px;
  align-items: flex-start;
}

.product-hero-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface-2);
}

.product-hero-text {
  flex: 1 1 0;
  min-width: 0;
  align-self: center;
}

@media (max-width: 560px) {
  .product-hero {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 20px;
  }

  .product-hero-visual {
    width: 100%;
    max-width: 280px;
  }

  .product-hero-text {
    align-self: flex-start;
  }
}

.product-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.15;
}

.product-catline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.product-catline-sep {
  user-select: none;
}

.product-desc-lead strong {
  color: var(--text);
  font-weight: 700;
}

.product-similar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.product-similar-head > div:first-child {
  flex: 1 1 200px;
  min-width: 0;
}

.product-similar-meta {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  max-width: 36rem;
}

.product-similar-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

a.product-similar-all:hover {
  border-color: rgba(232, 137, 14, 0.5);
  background: var(--surface-2);
  color: var(--accent);
}

a.product-similar-all:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.product-similar-solo-text {
  margin: 0 0 12px;
  line-height: 1.5;
  max-width: 42rem;
}

.product-similar-solo-actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.product-facts {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.product-facts li {
  margin-bottom: 6px;
}

.product-fact-label {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--muted);
}

.prose-muted {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.product-similar {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.product-similar-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text);
}

.product-similar-head .product-similar-title {
  margin: 0 0 4px;
}

/* minmax(0,1fr): средняя колонка сжимается, иначе flex/grid «раздувает» блок на всю ширину — карточки в столбик */
.product-similar-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  padding: 12px 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.product-similar-scroller {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 8px;
  overscroll-behavior-x: contain;
  padding: 6px 4px 12px;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 137, 14, 0.35) transparent;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 10px,
    #000 calc(100% - 10px),
    transparent 100%
  );
}

.product-similar-scroller:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
  border-radius: var(--radius-sm);
}

.product-similar-scroller::-webkit-scrollbar {
  height: 7px;
}

.product-similar-scroller::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.product-similar-scroller::-webkit-scrollbar-thumb {
  background: rgba(232, 137, 14, 0.45);
  border-radius: 4px;
}

.product-similar-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  max-width: none;
}

.product-similar-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.product-similar-nav:hover:not(:disabled) {
  border-color: rgba(232, 137, 14, 0.55);
  background: var(--surface-2);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.18);
}

.product-similar-nav:active:not(:disabled) {
  transform: scale(0.96);
}

.product-similar-nav:disabled {
  opacity: 0.28;
  cursor: default;
  box-shadow: none;
}

.product-similar-nav-ico {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  margin-top: -1px;
}

@media (max-width: 520px) {
  .product-similar-carousel {
    gap: 8px;
    padding: 10px 6px 12px;
  }

  .product-similar-nav {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 380px) {
  .product-sim-card {
    width: 142px;
    min-width: 142px;
    max-width: 142px;
  }
}

.product-sim-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  flex: 0 0 auto;
  width: 156px;
  min-width: 156px;
  max-width: 156px;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.product-sim-card:hover {
  border-color: rgba(232, 137, 14, 0.55);
  box-shadow: 0 10px 28px rgba(245, 166, 35, 0.15);
  transform: translateY(-2px);
}

.product-sim-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.product-sim-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-sim-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
  min-height: 0;
}

.product-sim-title {
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
  color: var(--text);
}

.product-sim-price {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
  .product-sim-card,
  .product-similar-nav {
    transition: none;
  }

  .product-sim-card:hover {
    transform: none;
  }

  .product-similar-nav:active:not(:disabled) {
    transform: none;
  }
}

.product-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.product-buy-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.product-buy-price {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.product-buy-card .btn .cart-ico {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 8px;
}

.product-info-block {
  padding: 4px 0;
}

.product-aside-h {
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.88rem;
  font-weight: 600;
}

.product-trust {
  margin: 12px 0 0;
  font-size: 0.85rem;
}

.catalog-h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 8px;
}

.catalog-lead {
  margin: 0 0 1.75rem;
}

.catalog-section {
  margin-bottom: 2rem;
}

.catalog-cat {
  font-size: 1.1rem;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

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

.catalog-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(128, 128, 128, 0.25);
}

.catalog-list a {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.catalog-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.catalog-back {
  margin-top: 2rem;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.legal-doc {
  max-width: 52rem;
}

.legal-lead {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.55;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0 0 1.5rem;
}

.legal-actions--bottom {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.legal-toc {
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.legal-toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.legal-toc-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.65;
  font-size: 0.92rem;
}

.legal-toc-list a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.legal-toc-list a:hover {
  text-decoration: underline;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section > h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(232, 137, 14, 0.35);
  color: var(--text);
}

.legal-subheading {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 10px;
  color: var(--text);
}

.legal-rules,
.legal-subrules,
.legal-rules--flat {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem;
  max-width: none;
  line-height: 1.65;
}

.legal-rules > li,
.legal-rules--flat > li {
  margin-bottom: 12px;
  padding-left: 0;
}

.legal-rules--tight > li {
  margin-bottom: 8px;
}

.legal-subrules {
  margin: 10px 0 4px;
  padding: 10px 12px 10px 16px;
  border-left: 3px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.legal-subrules > li {
  margin-bottom: 8px;
}

.legal-subrules > li:last-child {
  margin-bottom: 0;
}

.legal-server-list {
  margin: 10px 0 10px;
  padding-left: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.legal-server-list li {
  margin-bottom: 4px;
}

.legal-mono-block {
  margin: 10px 0 0;
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.legal-callout {
  margin: 0 0 1.75rem;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  line-height: 1.55;
  font-size: 0.95rem;
}

.legal-callout--warn {
  border-color: rgba(220, 38, 38, 0.45);
  background: var(--surface-2);
  box-shadow: inset 4px 0 0 #dc2626;
}

.legal-callout a {
  font-weight: 600;
}

.legal-steps {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  line-height: 1.65;
}

.legal-steps > li {
  margin-bottom: 12px;
}

.legal-steps > li::marker {
  font-weight: 700;
  color: var(--accent);
}

.legal-note {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

.legal-strings {
  margin: 1rem 0 0;
  word-break: break-all;
}

.legal-strings a {
  font-weight: 600;
}

.legal-table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.legal-tools-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
}

.legal-tools-table th,
.legal-tools-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-tools-table th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.legal-tools-table tr:last-child td {
  border-bottom: none;
}

.legal-tools-table a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.legal-tools-table a:hover {
  text-decoration: underline;
}

.legal-tools-table td:last-child {
  white-space: normal;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.8em;
  font-family: ui-monospace, monospace;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  box-shadow: 0 1px 0 var(--border);
}

.legal-list {
  line-height: 1.65;
  padding-left: 1.25rem;
  max-width: 52rem;
}
.legal-list li {
  margin-bottom: 10px;
}

/* ——— Админ-панель ——— */
.admin-app {
  min-height: 100vh;
  background: var(--surface);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
}

.admin-topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.admin-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.admin-topbar-ico {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-muted);
  overflow: hidden;
  flex-shrink: 0;
}

.admin-topbar-ico .ico-svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.admin-topbar-ico .brand-favicon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.admin-topbar-name {
  font-size: 1.05rem;
}

.admin-app .admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.admin-app .admin-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.admin-app .admin-nav a:hover {
  color: var(--text);
  border-color: rgba(232, 137, 14, 0.35);
}

.admin-app .admin-nav a.active {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.95), rgba(232, 137, 14, 0.88));
  color: #1a1410;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.25);
}

@media (max-width: 900px) {
  .admin-app .admin-topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-app .admin-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .admin-app .admin-nav a {
    flex-shrink: 0;
  }
}

.admin-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.admin-topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-topbar-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
}

.admin-topbar-link:hover {
  color: var(--accent);
  background: rgba(245, 166, 35, 0.08);
}

.admin-topbar-link--out {
  border: 1px solid var(--border);
}

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.admin-lead {
  max-width: 42rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

.admin-subtitle {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--text);
  margin-bottom: 16px;
}

.admin-flash--err {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

.admin-form-grid {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.admin-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.admin-card--table {
  padding: 0;
  overflow: hidden;
}

.admin-card .admin-table {
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(18, 25, 44, 0.02);
}

html.theme-dark .admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.admin-table img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.admin-table-input {
  width: 100%;
  max-width: 100%;
  font: inherit;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.admin-table-input--icon {
  width: 4.5rem;
  text-align: center;
}

.admin-table-input--num {
  width: 5rem;
}

.admin-inline-form {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 999px;
}

.admin-form-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-form.admin-card {
  max-width: 680px;
  padding: 24px 26px 28px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  font: inherit;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.admin-form input:focus-visible,
.admin-form textarea:focus-visible,
.admin-form select:focus-visible {
  outline: none;
  border-color: rgba(232, 137, 14, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

.admin-check {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
}

.admin-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.admin-preview-wrap {
  margin: 0;
}

.admin-preview-img {
  max-width: 220px;
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid var(--border);
}

.admin-msg {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
  font-size: 0.9rem;
}

.admin-msg.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.admin-msg.err {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

/* Вход в админку */
.admin-login-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  font-family: var(--font);
}

.admin-login-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(245, 166, 35, 0.35), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(232, 137, 14, 0.12), transparent 50%),
    var(--surface);
  z-index: 0;
}

html.theme-dark .admin-login-bg {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(244, 160, 32, 0.2), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(244, 160, 32, 0.08), transparent 50%),
    var(--surface);
}

.admin-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 24px 60px rgba(18, 25, 44, 0.12);
}

html.theme-dark .admin-login-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.admin-login-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.admin-login-flame {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-muted);
  overflow: hidden;
  flex-shrink: 0;
}

.admin-login-flame .ico-svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.admin-login-flame .brand-favicon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.admin-login-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.admin-login-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.admin-login-err {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #b91c1c;
  font-size: 0.88rem;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-login-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-login-input {
  margin-bottom: 6px;
}

.admin-login-submit {
  width: 100%;
  margin-top: 6px;
}

.admin-login-hint {
  margin: 18px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.admin-login-hint code {
  font-size: 0.78em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
}

.admin-login-back {
  margin: 20px 0 0;
  text-align: center;
}

.admin-login-back a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.admin-login-back a:hover {
  color: var(--accent);
}

/* —— Быстрое оформление: всплывающее окно (1 товар, qty для кейсов/рилликов) —— */
.checkout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 17, 26, 0.72);
  backdrop-filter: blur(4px);
}

html.theme-dark .checkout-backdrop {
  background: rgba(0, 0, 0, 0.78);
}

html.gg-cart-open {
  overflow: hidden;
  touch-action: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#cart-drawer.checkout-modal {
  position: fixed;
  z-index: 130;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(440px, calc(100vw - 24px));
  height: auto;
  max-height: min(92dvh, 720px);
  min-height: 0;
  isolation: isolate;
  margin: 0;
  padding: 0;
  border-left: none;
  transform: translate(-50%, -48%) scale(0.96);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s;
}

#cart-drawer.checkout-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.checkout-modal-head {
  position: relative;
  z-index: 5;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  padding: max(14px, env(safe-area-inset-top, 0)) 14px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 3vw, 14px);
  margin: 0;
  padding: 0 48px 0 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.checkout-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0));
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.checkout-close:hover {
  background: var(--bg);
  color: var(--text);
}

.checkout-step-pill {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--muted);
  background: var(--surface);
}

.checkout-step-pill.is-active {
  border-color: var(--accent);
  color: #fff;
  background: linear-gradient(145deg, #f59e0b, #ea580c);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.checkout-step-pill.is-done {
  border-color: rgba(232, 148, 22, 0.45);
  color: var(--accent);
  background: rgba(232, 148, 22, 0.12);
}

.checkout-steps-line {
  flex: 0 1 clamp(32px, 12vw, 56px);
  width: clamp(32px, 12vw, 56px);
  min-width: 24px;
  height: 0;
  border-top: 2px dashed var(--border);
}

.checkout-modal-inner {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom, 0));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.checkout-modal-inner::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .checkout-modal-inner {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
  }

  .checkout-modal-inner::-webkit-scrollbar {
    display: block;
    width: 6px;
  }

  .checkout-modal-inner::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
  }

  .checkout-modal-inner::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 999px;
  }

  .checkout-modal-inner::-webkit-scrollbar-button,
  .checkout-modal-inner::-webkit-scrollbar-corner {
    display: none;
    width: 0;
    height: 0;
  }
}

.checkout-pane {
  min-width: 0;
}

.checkout-pane[hidden] {
  display: none !important;
}

.checkout-product-card {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-width: 0;
}

.checkout-product-card .checkout-qty-block {
  margin-top: 12px;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.checkout-product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.checkout-product-list .checkout-product-hero {
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.checkout-product-hero {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
  min-width: 0;
}

.checkout-product-hero img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.checkout-product-body {
  min-width: 0;
  flex: 1;
}

.checkout-product-title {
  margin: 0 0 6px;
  font-size: clamp(0.92rem, 4vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  word-break: break-word;
}

.checkout-product-desc {
  margin: 0 0 6px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
}

.checkout-product-price {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--muted);
}

.checkout-qty-block {
  margin-bottom: 0;
  min-width: 0;
}

.checkout-qty-label {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.checkout-qty-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.checkout-qty-stepper .checkout-qty-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  touch-action: manipulation;
}

.checkout-qty-stepper .checkout-qty-input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 12px 8px;
  border-radius: 12px;
}

.checkout-qty-stepper .checkout-qty-suffix {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.checkout-modal input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.checkout-modal input[type="number"]::-webkit-outer-spin-button,
.checkout-modal input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.checkout-qty-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

/* Риллики: тёмные «пилюли», число слева — ₽ / рил. справа */
.checkout-qty-pills--rilliki .checkout-qty-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 48px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a1d26;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.checkout-qty-pills--rilliki .checkout-qty-pill:focus-within {
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.18);
}

.checkout-qty-pill-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #f4f5f8;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left;
  line-height: 1.2;
  outline: none;
  box-shadow: none;
}

.checkout-qty-pill-input:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

.checkout-qty-pill-input::selection {
  background: rgba(232, 148, 22, 0.45);
  color: #fff;
}

.checkout-qty-pill-unit {
  flex: 0 0 auto;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1;
  user-select: none;
}

html.theme-light .checkout-qty-pills--rilliki .checkout-qty-pill {
  background: #23262f;
  border-color: rgba(0, 0, 0, 0.14);
}

html.theme-light .checkout-qty-pill-input {
  color: #f0f2f6;
}

html.theme-light .checkout-qty-pill-unit {
  color: rgba(255, 255, 255, 0.45);
}

.checkout-form-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.checkout-field {
  display: block;
  margin-bottom: 10px;
}

.checkout-field--icon {
  position: relative;
}

.checkout-field-cart-ico {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.9;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-field--icon .checkout-input {
  padding-left: 56px;
  padding-right: 46px;
}

.checkout-input {
  width: 100%;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.checkout-promo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.checkout-promo-row .checkout-input {
  flex: 1 1 140px;
  min-width: 0;
}

.checkout-promo-apply {
  flex-shrink: 0;
  padding: 12px 16px;
}

.checkout-promo-clear {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.checkout-check {
  margin: 12px 0;
  font-size: 0.85rem;
}

.checkout-legal {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 14px;
  font-size: 0.72rem;
  line-height: 1.45;
}

.checkout-legal-ico {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.2);
  color: #ca8a04;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkout-legal a {
  color: var(--accent);
}

.checkout-order-foot {
  margin-top: 4px;
  padding-top: 4px;
}

.btn-checkout-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  border: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-height: 52px;
  background: linear-gradient(90deg, #f97316 0%, #fb923c 45%, #fdba74 100%);
  box-shadow: 0 8px 28px rgba(249, 115, 22, 0.4);
  touch-action: manipulation;
}

.btn-checkout-pay-text {
  flex: 1 1 auto;
  text-align: center;
}

.btn-checkout-pay:hover {
  filter: brightness(1.05);
}

.checkout-pay-sum {
  font-weight: 800;
  opacity: 0.95;
}

.checkout-pay-lead {
  margin: 0 0 12px;
  font-weight: 600;
}

.checkout-pay-methods {
  margin-bottom: 14px;
}

.checkout-back {
  margin-top: 8px;
}

.checkout-empty {
  text-align: center;
  padding: 24px 12px;
  margin-bottom: 12px;
}

.checkout-empty-title {
  margin: 0 0 6px;
  font-weight: 700;
}

@media (max-width: 640px) {
  #cart-drawer.checkout-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    max-height: min(96dvh, 100%);
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
  }

  #cart-drawer.checkout-modal.open {
    transform: translateY(0);
  }

  .checkout-modal-inner {
    padding-left: max(14px, env(safe-area-inset-left, 0));
    padding-right: max(14px, env(safe-area-inset-right, 0));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0));
  }

  .checkout-steps {
    padding: 0 44px 0 4px;
  }

  .checkout-qty-pills {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .checkout-product-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .checkout-product-hero img {
    width: 80px;
    height: 80px;
  }

  .checkout-qty-stepper {
    grid-template-columns: 44px 1fr 44px;
  }

  .checkout-qty-stepper .checkout-qty-suffix {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .btn-checkout-pay {
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .checkout-pay-sum {
    font-size: 1.05rem;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  #cart-drawer.checkout-modal {
    width: min(480px, calc(100vw - 32px));
  }
}

@media (min-height: 500px) and (max-height: 700px) and (orientation: landscape) {
  #cart-drawer.checkout-modal {
    max-height: 96dvh;
  }

  .checkout-modal-inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .checkout-product-card {
    margin-bottom: 10px;
    padding: 10px;
  }
}

/* ============================================================
   Премиум-блок «Последние покупки игроков»
   ============================================================ */
.recent-block {
  --lp-font: "Manrope", "DM Sans", system-ui, -apple-system, sans-serif;
  position: relative;
  width: min(1180px, calc(100% - 24px));
  margin-inline: auto;
  margin-bottom: 72px;
  border-radius: 28px;
  padding: 34px 22px 40px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 50px rgba(15, 23, 42, 0.06);
}

.recent-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 26px;
}

.recent-head-title {
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

.recent-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 4px 0 10px;
}

.recent-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.recent-track {
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: max-content;
  will-change: transform;
}

.recent-grid .lp-card {
  width: 268px;
  flex: 0 0 268px;
}

.recent-nav {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.recent-nav:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

.recent-nav:active {
  transform: scale(0.92);
}

.recent-nav svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .recent-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .recent-nav {
    display: none;
  }

  .recent-grid .lp-card {
    width: min(268px, 74vw);
    flex-basis: min(268px, 74vw);
  }
}

/* ---- Карточка ---- */
.lp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 20px;
  padding: 16px 14px 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 26px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  will-change: transform;
}

.lp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 20px 40px rgba(15, 23, 42, 0.1);
}

.lp-card--enter {
  animation: lpCardIn 0.5s cubic-bezier(0.22, 0.68, 0, 1.12) both;
}

@keyframes lpCardIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- Визуал товара ---- */
.lp-visual {
  display: flex;
  justify-content: center;
  margin: 8px 0 14px;
}

.lp-frame {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(165deg, #f1f5f9, #e2e8f0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 12px rgba(15, 23, 42, 0.07);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.lp-card:hover .lp-frame {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(15, 23, 42, 0.1);
}

.lp-img {
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
  display: block;
}

/* ---- Контент карточки ---- */
.lp-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.lp-title {
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lp-player {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 8px;
  min-width: 0;
}

.lp-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffffff, 0 3px 8px rgba(15, 23, 42, 0.18);
  image-rendering: pixelated;
  object-fit: cover;
  background: #e2e8f0;
}

.lp-player-name {
  font-family: var(--lp-font);
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.lp-time-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.lp-time-dot--now {
  background: #22c55e;
  animation: lpPulse 1.6s ease-in-out infinite;
}

.lp-time-dot--minutes {
  background: #f59e0b;
}

.lp-time-dot--day {
  background: #3b82f6;
}

.lp-time-txt {
  font-family: var(--lp-font);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

@keyframes lpPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }
}

/* ---- Цена ---- */
.lp-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lp-price {
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lp-old {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.55);
}

.lp-discount {
  font-family: var(--lp-font);
  font-size: 0.7rem;
  font-weight: 800;
  color: #059669;
  background: rgba(5, 150, 105, 0.12);
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 2px 7px;
  border-radius: 999px;
}

/* ---- Тёмная тема ---- */
html.theme-dark .recent-block {
  background: #17181f;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

html.theme-dark .lp-card {
  background: #1e1f28;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 10px 26px rgba(0, 0, 0, 0.3);
}

html.theme-dark .lp-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 20px 40px rgba(0, 0, 0, 0.45);
}

html.theme-dark .lp-frame {
  background: linear-gradient(165deg, #282a35, #1c1d25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

html.theme-dark .lp-player-name {
  color: #cbd5e1;
}

html.theme-dark .lp-avatar {
  box-shadow: 0 0 0 2px #1e1f28, 0 3px 8px rgba(0, 0, 0, 0.4);
  background: #282a35;
}

html.theme-dark .lp-discount {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

html.theme-dark .recent-nav {
  background: #1e1f28;
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

html.theme-dark .recent-nav:hover {
  background: #272836;
  border-color: rgba(255, 255, 255, 0.22);
  color: #f1f5f9;
}

/* ---- Адаптив ---- */
@media (max-width: 640px) {
  .recent-block {
    padding: 24px 14px 30px;
    border-radius: 20px;
    margin-bottom: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-card,
  .lp-card--enter {
    animation: none;
  }

  .lp-card:hover,
  .lp-frame,
  .lp-card:hover .lp-frame {
    transform: none;
  }

  .lp-time-dot--now {
    animation: none;
  }
}

/* ============================================================
   Премиальный блок покупки игровой валюты «Риллики»
   ============================================================ */
.currency-block {
  --lp-font: "Manrope", "DM Sans", system-ui, -apple-system, sans-serif;
  --fill: 0%;
  --track-bg: rgba(15, 23, 42, 0.12);
  --orange-a: #ffa31a;
  --orange-b: #ff6a00;
  --orange-soft: rgba(255, 138, 0, 0.2);
  width: min(1180px, calc(100% - 24px));
  margin-inline: auto;
  margin-bottom: 72px;
  border-radius: 28px;
  padding: 30px 30px 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.currency-block-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
}

/* ---- Левая часть: иконка + название ---- */
.currency-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-width: 0;
}

.currency-ico {
  position: relative;
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  margin-bottom: 6px;
  border-radius: 22px;
  overflow: visible;
}

.currency-ico::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange-soft), transparent 68%);
  filter: blur(6px);
  z-index: -1;
  animation: currencyGlow 3.2s ease-in-out infinite;
}

.currency-ico img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 14px 30px -8px rgba(255, 138, 0, 0.45),
    0 4px 14px rgba(15, 23, 42, 0.1);
}

@keyframes currencyGlow {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.currency-title {
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

.currency-sub {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.currency-rate {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.currency-rate strong {
  color: var(--accent);
  font-weight: 700;
}

.currency-mode {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.currency-mode strong {
  color: var(--text);
  font-weight: 700;
}

.currency-sale {
  margin-top: 10px;
  font-family: var(--lp-font);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-a), var(--orange-b));
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 6px 18px -4px var(--orange-soft);
}

/* ---- Центр: калькулятор ---- */
.currency-calc {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.currency-calc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.currency-calc-label {
  font-family: var(--lp-font);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.currency-calc-max {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.currency-slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 14px;
  margin: 6px 0 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent) var(--fill, 0%),
    var(--track-bg) var(--fill, 0%),
    var(--track-bg) 100%
  );
  outline: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.currency-slider:focus-visible {
  box-shadow: 0 0 0 5px var(--ring);
}

.currency-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--accent);
  box-shadow:
    0 0 0 5px var(--orange-soft),
    0 8px 18px -4px rgba(255, 138, 0, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.currency-slider:hover::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow:
    0 0 0 7px var(--orange-soft),
    0 10px 22px -4px rgba(255, 138, 0, 0.6);
}

.currency-slider::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: var(--track-bg);
}

.currency-slider::-moz-range-progress {
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
}

.currency-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--accent);
  box-shadow:
    0 0 0 5px var(--orange-soft),
    0 8px 18px -4px rgba(255, 138, 0, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.currency-slider:hover::-moz-range-thumb {
  transform: scale(1.12);
  box-shadow:
    0 0 0 7px var(--orange-soft),
    0 10px 22px -4px rgba(255, 138, 0, 0.6);
}

.currency-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.currency-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.currency-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.currency-card-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.currency-card-value {
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.currency-card-num {
  color: var(--accent);
}

/* ---- Правая часть: кнопка ---- */
.currency-buy-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 18px 26px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-a), var(--orange-b));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 14px 32px -8px rgba(255, 138, 0, 0.55),
    0 6px 16px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.22s cubic-bezier(0.22, 0.68, 0, 1.12),
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.currency-buy-btn:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 22px 46px -10px rgba(255, 138, 0, 0.7),
    0 10px 24px rgba(15, 23, 42, 0.16);
}

.currency-buy-btn:active {
  transform: translateY(0) scale(0.98);
}

.currency-buy-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 5px var(--ring),
    0 22px 46px -10px rgba(255, 138, 0, 0.7);
}

.currency-buy-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  white-space: nowrap;
}

.currency-buy-label {
  font-family: var(--lp-font);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.85;
}

.currency-buy-price {
  font-family: var(--lp-font);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.currency-buy-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: transform 0.22s ease, background 0.22s ease;
}

.currency-buy-btn:hover .currency-buy-arrow {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.3);
}

/* ---- Тёмная тема ---- */
html.theme-dark .currency-block {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

html.theme-dark .currency-ico img {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px -8px rgba(255, 138, 0, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.45);
}

html.theme-dark .currency-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ---- Адаптив ---- */
@media (max-width: 980px) {
  .currency-block-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .currency-info {
    gap: 4px;
  }

  .currency-ico {
    margin-bottom: 4px;
  }

  .currency-buy-col {
    justify-content: stretch;
  }

  .currency-buy-btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .currency-block {
    padding: 24px 14px 28px;
    border-radius: 20px;
    margin-bottom: 52px;
  }

  .currency-buy-btn {
    padding: 16px 18px 16px 22px;
  }

  .currency-buy-price {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .currency-ico::before {
    animation: none;
  }

  .currency-buy-btn:hover,
  .currency-slider:hover::-webkit-slider-thumb,
  .currency-slider:hover::-moz-range-thumb,
  .currency-buy-btn:hover .currency-buy-arrow,
  .currency-card:hover {
    transform: none;
  }
}

/* ---- Специальная корзина блока валюты ---- */
#currency-drawer.checkout-modal {
  --lp-font: "Manrope", "DM Sans", system-ui, -apple-system, sans-serif;
  --orange-soft: rgba(255, 138, 0, 0.2);
  position: fixed;
  z-index: 131;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(440px, calc(100vw - 24px));
  height: auto;
  max-height: min(92dvh, 720px);
  min-height: 0;
  isolation: isolate;
  margin: 0;
  padding: 0;
  border-left: none;
  transform: translate(-50%, -48%) scale(0.96);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s;
}

#currency-drawer.checkout-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.currency-checkout-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 16px;
}

.currency-checkout-ico {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 4px var(--orange-soft);
}

.currency-checkout-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.currency-checkout-info {
  min-width: 0;
}

.currency-checkout-name {
  margin: 0;
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.currency-checkout-meta {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.currency-checkout-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.currency-checkout-sum {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.currency-checkout-sum-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.currency-checkout-sum-value {
  font-family: var(--lp-font);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.currency-checkout-sum--price .currency-checkout-sum-value {
  color: var(--accent);
}

@media (max-width: 640px) {
  #currency-drawer.checkout-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    max-height: min(96dvh, 100%);
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
  }

  #currency-drawer.checkout-modal.open {
    transform: translateY(0);
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  #currency-drawer.checkout-modal {
    width: min(480px, calc(100vw - 32px));
  }
}

@media (prefers-reduced-motion: reduce) {
  #currency-drawer.checkout-modal {
    transition: none;
  }
}

/* ---- Аватар головы Minecraft в поле ника ---- */
.checkout-player-avatar {
  --avatar-shimmer: rgba(255, 255, 255, 0.55);
  position: absolute;
  left: 12px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 12px rgba(15, 23, 42, 0.16);
  pointer-events: none;
  z-index: 1;
}

.checkout-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.checkout-player-avatar.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, var(--avatar-shimmer) 50%, transparent 70%);
  animation: avatarShimmer 1.15s linear infinite;
}

@keyframes avatarShimmer {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

.checkout-player-avatar.is-shown {
  animation: avatarPop 0.32s cubic-bezier(0.22, 0.68, 0, 1.12);
}

@keyframes avatarPop {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.55);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}



html.theme-dark .checkout-player-avatar {
  --avatar-shimmer: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .checkout-player-avatar.is-loading::before,
  .checkout-player-avatar.is-shown {
    animation: none;
  }
}



/* ============================================================
   Блок «Недавно купили» — бегущая лента покупок (стиль магазина)
   ============================================================ */
.rp-block {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
}
.rp-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.rp-label {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}
.rp-empty {
  font-size: 14px;
  color: #6b7280;
}
.rp-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 48px), transparent);
}
.rp-track {
  display: flex;
  width: max-content;
  animation: rp-scroll var(--rp-dur, 30s) linear infinite;
}
.rp-viewport:hover .rp-track {
  animation-play-state: paused;
}
.rp-set {
  display: flex;
  gap: 10px;
  padding-right: 10px;
}
.rp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  background: #f1f2f6;
  color: #1f2937;
  font-size: 14px;
  white-space: nowrap;
}
.rp-av {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  image-rendering: pixelated;
}
.rp-nick {
  font-weight: 700;
}
.rp-sep {
  color: #9ca3af;
}
.rp-what {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6b7280;
}
@keyframes rp-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
html.theme-dark .rp-label,
html.theme-dark .rp-empty,
html.theme-dark .rp-what {
  color: #9ca3af;
}
html.theme-dark .rp-pill {
  background: #262a36;
  color: #f3f4f6;
}
html.theme-dark .rp-sep {
  color: #6b7280;
}
@media (max-width: 640px) {
  .rp-label {
    font-size: 13px;
  }
  .rp-pill {
    height: 32px;
    font-size: 13px;
  }
  .rp-what {
    max-width: 150px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp-track {
    animation: none;
  }
  .rp-viewport {
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* ============================================================
   Полировка карточек товаров (каталог)
   ============================================================ */
.grid-products {
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 18px;
}

.card-product {
  border-radius: 18px;
  border: 1px solid rgba(18, 25, 44, 0.06);
  box-shadow: 0 1px 2px rgba(18, 25, 44, 0.04), 0 8px 24px rgba(18, 25, 44, 0.06);
}

.card-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(18, 25, 44, 0.04), 0 16px 36px rgba(18, 25, 44, 0.12);
}

.card-img-wrap {
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #f6f7fb 0%, #eceef5 100%);
}

.card-img-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(18, 25, 44, 0.18));
  pointer-events: none;
}

.card-title {
  margin: 14px 16px 6px;
  font-size: 0.98rem;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price-block {
  margin: 0 16px 16px;
}

.card-price-block .card-price,
.card-price {
  margin: 0 16px 16px;
  align-self: flex-start;
  padding: 7px 14px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.card-price-block .card-price {
  margin: 0;
}

.card-price--sale {
  font-size: 1.2rem;
}

.btn-add-cart {
  bottom: 12px;
  right: 12px;
  box-shadow: 0 8px 22px rgba(245, 124, 0, 0.42);
}

html.theme-dark .card-product {
  border-color: rgba(255, 255, 255, 0.06);
}

html.theme-dark .card-img-wrap {
  background: linear-gradient(180deg, #1c2030 0%, #151923 100%);
}

@media (max-width: 640px) {
  .grid-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card-title {
    font-size: 0.9rem;
    margin: 10px 12px 4px;
  }
  .card-price-block {
    margin: 0 12px 12px;
  }
  .card-price-block .card-price,
  .card-price-block .card-price--sale {
    margin: 0;
  }
  .card-price {
    font-size: 0.92rem;
    padding: 6px 11px;
  }
}

/* ============================================================
   Шапка и лого без подложки; картинка валюты без фона
   ============================================================ */
.topbar {
  width: min(1180px, calc(100% - 32px));
}

.brand-ico:has(.brand-favicon--nobg),
html.theme-dark .brand-ico:has(.brand-favicon--nobg) {
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

.brand-favicon--nobg {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.legal-doc {
  margin-inline: auto;
}

.currency-ico::before {
  display: none;
}

.currency-ico img,
html.theme-dark .currency-ico img {
  width: 96px;
  height: 96px;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  object-fit: contain;
}

/* ============================================================
   Страница контактов (карточки в стиле соцсетей)
   ============================================================ */
.ct-page {
  padding: 8px 0 48px;
}

.ct-head {
  margin-bottom: 22px;
}

.ct-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ct-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.ct-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(200px, auto);
  gap: 16px;
}

.ct-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 26px 26px 84px;
  border-radius: 22px;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  background: #1c1d24;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.ct-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.ct-card:focus-visible {
  outline: 3px solid rgba(232, 148, 22, 0.55);
  outline-offset: 3px;
}

.ct-card-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.ct-card-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  max-width: 30ch;
}

.ct-btn {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.2s ease;
}

.ct-card:hover .ct-btn {
  background: rgba(255, 255, 255, 0.26);
}

.ct-ico {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.ct-ico svg {
  width: 100%;
  height: 100%;
}

.ct-ico--big {
  right: 22px;
  bottom: 22px;
  width: 96px;
  height: 96px;
  padding: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.ct-card--support {
  grid-row: span 2;
  background:
    radial-gradient(120% 80% at 100% 100%, rgba(232, 148, 22, 0.35), transparent 60%),
    linear-gradient(180deg, #23242c 0%, #15161b 100%);
}

.ct-card--discord {
  background:
    radial-gradient(90% 90% at 100% 100%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #8b5cf6 0%, #6d45ee 100%);
}

.ct-card--telegram {
  background:
    radial-gradient(70% 90% at 100% 50%, rgba(56, 189, 248, 0.35), transparent 65%),
    linear-gradient(135deg, #1f2433 0%, #2a2f48 100%);
}

.ct-card--vk {
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(135deg, #3b82f6 0%, #1d63e0 100%);
}

.ct-card--partner {
  background:
    radial-gradient(90% 90% at 100% 100%, rgba(74, 222, 128, 0.22), transparent 60%),
    linear-gradient(180deg, #23252c 0%, #17181d 100%);
}

@media (max-width: 860px) {
  .ct-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ct-card--support {
    grid-column: span 2;
    grid-row: auto;
  }
  .ct-card--vk {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .ct-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ct-card--support,
  .ct-card--vk {
    grid-column: auto;
  }
  .ct-card {
    min-height: 170px;
    padding: 20px 20px 74px;
  }
  .ct-card-title {
    font-size: 1.15rem;
  }
  .ct-ico--big {
    width: 72px;
    height: 72px;
    right: 16px;
    bottom: 16px;
    padding: 14px;
  }
  .ct-btn {
    left: 18px;
    bottom: 18px;
  }
}

.ct-card-body {
  max-width: 62%;
}

.ct-card--support .ct-card-body {
  max-width: 100%;
}

@media (max-width: 560px) {
  .ct-card-body {
    max-width: 70%;
  }
  .ct-card--support .ct-card-body {
    max-width: 100%;
  }
}

.ct-card-body {
  max-width: 74%;
}

.ct-ico--big {
  width: 64px;
  height: 64px;
  right: 20px;
  bottom: 20px;
  padding: 14px;
}

.ct-card-title {
  font-size: 1.2rem;
  max-width: none;
}

/* ---- Контакты: иконки, карточки, шапка (полировка) ---- */
.ct-ico--big {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ct-ico--big svg,
.ct-ico--big .footer-social-ico {
  width: 30px;
  height: 30px;
  color: #fff !important;
}

.ct-ico--support {
  top: 26px;
  right: 26px;
  bottom: auto;
  width: 72px;
  height: 72px;
  padding: 0;
  background: linear-gradient(145deg, rgba(232, 148, 22, 0.9), rgba(232, 148, 22, 0.35));
  box-shadow: 0 12px 30px rgba(232, 148, 22, 0.35);
}

.ct-ico--support svg {
  width: 34px;
  height: 34px;
}

.ct-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.ct-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  left: 22px;
  bottom: 22px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.ct-card:hover .ct-btn {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.3);
}

.ct-btn {
  transition: background 0.2s ease, transform 0.2s ease;
}

.ct-card-body {
  max-width: 100%;
}

.ct-card--support .ct-card-body {
  max-width: 62%;
}

.ct-card--support .ct-card-text {
  max-width: 34ch;
}

.ct-card--support .ct-card-title {
  margin-top: 0;
}

.ct-card-text {
  font-size: 0.95rem;
}

.ct-card--discord .ct-card-body,
.ct-card--telegram .ct-card-body,
.ct-card--vk .ct-card-body {
  max-width: 68%;
}

.ct-card--partner .ct-card-body {
  max-width: 80%;
}

/* ---- Шапка сайта (полировка, как на страницах) ---- */
.topbar-inner {
  padding: 10px 14px 10px 18px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html.theme-dark .topbar-inner {
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 800;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: rgba(232, 148, 22, 0.12);
}

html.theme-dark .nav-links a:hover {
  background: rgba(244, 160, 32, 0.14);
}

.topbar-social-link {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.topbar-actions {
  gap: 8px;
}

.ct-ico--support {
  top: auto;
  bottom: 22px;
  right: 22px;
}

.ct-card--support .ct-card-body {
  max-width: 100%;
}

.ct-card--support .ct-card-text {
  max-width: 30ch;
}

/* ============================================================
   Блок покупки валюты (двухколоночный, в стиле референса)
   ============================================================ */
.cb-section {
  width: min(1180px, calc(100% - 32px));
  margin: 8px auto 28px;
  padding: 30px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.cb-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 36px;
  align-items: center;
}

.cb-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.cb-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffa726, #f57c00);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 8px 18px rgba(245, 124, 0, 0.3);
}

.cb-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.cb-ip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
}

.cb-ip-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(180deg, #ffa726, #f57c00);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(245, 124, 0, 0.35);
  transition: transform 0.15s ease;
}

.cb-ip-copy:hover {
  transform: translateY(-1px);
}

.cb-sale {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(232, 148, 22, 0.14);
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 700;
}

.cb-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.cb-title-ico {
  display: inline-flex;
  color: #f57c00;
}

.cb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cb-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.cb-amount-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.cb-amount-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
}

.cb-slider {
  --fill: 0%;
  width: 100%;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #f57c00 0, #f57c00 var(--fill), var(--surface-2) var(--fill), var(--surface-2) 100%);
  outline: none;
  cursor: pointer;
}

.cb-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #fff;
  border: 3px solid #f57c00;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.35);
  cursor: pointer;
}

.cb-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #fff;
  border: 3px solid #f57c00;
  cursor: pointer;
}

.cb-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.cb-chip {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cb-chip:hover {
  border-color: #f57c00;
}

.cb-exchange {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cb-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.cb-box-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cb-box-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.cb-swap {
  display: inline-flex;
  color: var(--muted);
}

.cb-buy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 22px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(180deg, #ffa726 0%, #f57c00 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(245, 124, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.cb-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(245, 124, 0, 0.45);
}

.cb-buy-ico {
  display: inline-flex;
}

@media (max-width: 860px) {
  .cb-section {
    padding: 22px;
  }
  .cb-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .cb-buy {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* ---- Блок валюты: полировка ---- */
.cb-section {
  padding: 0;
  overflow: hidden;
}

.cb-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 0;
  align-items: stretch;
}

.cb-left {
  position: relative;
  padding: 36px 32px;
  gap: 18px;
  min-height: 360px;
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(160deg, #ffb13b 0%, #f57c00 60%, #e56a00 100%);
  color: #fff;
  overflow: hidden;
}

.cb-badge {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
  backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
}

.cb-heading {
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  max-width: 14ch;
}

.cb-ip {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  box-shadow: 0 10px 24px rgba(120, 50, 0, 0.25);
  color: #1f2937;
}

.cb-ip-copy {
  background: linear-gradient(180deg, #1f2937, #111827);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.35);
}

.cb-sale {
  background: #fff;
  color: #b45309;
}

.cb-art {
  position: absolute;
  right: -18px;
  bottom: -26px;
  width: 200px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(120, 50, 0, 0.35));
  transform: rotate(-6deg);
}

.cb-right {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cb-title-row {
  margin-bottom: 22px;
}

.cb-amount-value {
  color: #f57c00;
  font-size: 1.9rem;
}

.cb-slider {
  height: 12px;
}

.cb-slider::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 34%, #f57c00 36%);
  border: none;
  box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.22), 0 6px 14px rgba(245, 124, 0, 0.35);
}

.cb-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 34%, #f57c00 36%);
  border: none;
}

.cb-quick {
  margin: 18px 0 22px;
  gap: 8px;
}

.cb-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  border-color: var(--border-strong);
}

.cb-chip:hover {
  background: rgba(245, 124, 0, 0.1);
  border-color: #f57c00;
  color: #b45309;
}

.cb-exchange {
  flex-wrap: nowrap;
  gap: 10px;
}

.cb-box {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
}

.cb-box-value {
  font-size: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb-buy {
  flex: 0 0 auto;
  margin-left: 4px;
  height: 62px;
  padding: 0 22px;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .cb-left {
    min-height: 0;
    padding: 26px 22px 120px;
  }
  .cb-art {
    width: 150px;
    right: -10px;
    bottom: -18px;
  }
  .cb-right {
    padding: 24px 20px 26px;
  }
  .cb-exchange {
    flex-wrap: wrap;
  }
  .cb-box {
    flex: 1 1 140px;
  }
  .cb-buy {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
}

.cb-exchange .cb-box:nth-child(3) {
  flex: 1.5 1 0;
}

.cb-exchange .cb-box:first-child {
  flex: 0.8 1 0;
}

.cb-box-value span {
  white-space: nowrap;
}

.cb-exchange .cb-box:nth-child(3) .cb-box-value {
  font-size: 1.05rem;
}

.cb-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
}

.cb-box-value {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.cb-exchange .cb-box:nth-child(3) {
  padding: 14px 12px;
}

.cb-exchange .cb-box:nth-child(3) .cb-box-value {
  font-size: 1rem;
}

/* ---- Блок валюты: компактный вариант ---- */
.cb-section {
  width: min(940px, calc(100% - 32px));
  border-radius: 20px;
}

.cb-left {
  min-height: 0;
  padding: 26px 24px;
  gap: 12px;
}

.cb-heading {
  font-size: 1.3rem;
  max-width: none;
}

.cb-ip {
  padding: 4px 4px 4px 14px;
  font-size: 0.92rem;
}

.cb-ip-copy {
  width: 36px;
  height: 36px;
}

.cb-art {
  width: 130px;
  right: -8px;
  bottom: -14px;
}

.cb-right {
  padding: 24px 24px 22px;
}

.cb-title-row {
  margin-bottom: 14px;
}

.cb-title {
  font-size: 1.1rem;
}

.cb-amount-value {
  font-size: 1.4rem;
}

.cb-amount-label {
  font-size: 0.88rem;
}

.cb-slider {
  height: 10px;
}

.cb-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
}

.cb-quick {
  margin: 12px 0 14px;
  gap: 6px;
}

.cb-chip {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.cb-exchange {
  gap: 8px;
}

.cb-box {
  padding: 10px 12px;
  border-radius: 12px;
}

.cb-box-value {
  font-size: 1rem;
}

.cb-exchange .cb-box:nth-child(3) .cb-box-value {
  font-size: 0.92rem;
}

.cb-buy {
  height: 50px;
  padding: 0 16px;
  font-size: 0.92rem;
  border-radius: 13px;
}

@media (max-width: 860px) {
  .cb-left {
    padding: 20px 18px 96px;
  }
  .cb-art {
    width: 96px;
  }
  .cb-right {
    padding: 18px 16px 18px;
  }
}

.cb-section {
  width: min(1180px, calc(100% - 32px));
}

/* Внутренняя полоса шапки занимает всю ширину topbar (раньше .shell сжимал её на 16px с каждой стороны) */
.topbar .topbar-inner.shell {
  width: 100%;
  margin-inline: 0;
}

/* ============================================================
   Выбор срока привилегии (30 дней / 90 дней / навсегда)
   ============================================================ */
.term-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 14, 24, 0.55);
  backdrop-filter: blur(4px);
}

.term-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.term-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--surface-2);
}

.term-head-img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.term-head-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.term-head-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.term-head-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.term-head-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.term-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.term-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 12px 14px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.term-card:hover {
  transform: translateY(-2px);
}

.term-card.is-selected {
  border-color: #f57c00;
  box-shadow: 0 10px 26px rgba(245, 124, 0, 0.22);
}

.term-card--best {
  background: linear-gradient(180deg, #ffb13b 0%, #f57c00 100%);
  color: #fff;
  border-color: transparent;
}

.term-card--best.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px #f57c00, 0 12px 28px rgba(245, 124, 0, 0.4);
}

.term-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.term-days {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.term-sub {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 2.4em;
}

.term-card--best .term-sub {
  color: rgba(255, 255, 255, 0.9);
}

.term-pct {
  margin-left: 4px;
  font-weight: 700;
  color: #16a34a;
}

.term-card--best .term-pct {
  color: #fff;
}

.term-price {
  font-size: 1.15rem;
  font-weight: 800;
}

.term-bonus {
  font-size: 0.78rem;
  font-weight: 600;
  color: #16a34a;
  line-height: 1.3;
}

.term-card--best .term-bonus {
  color: #fff;
}

.term-next {
  margin-top: 18px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffa726 0%, #f57c00 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(245, 124, 0, 0.35);
}

.checkout-term {
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 620px) {
  .term-grid {
    grid-template-columns: 1fr;
  }
  .term-card {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
    padding: 16px 16px;
  }
  .term-days,
  .term-price {
    flex: 0 0 auto;
  }
  .term-sub,
  .term-bonus {
    flex: 1 1 100%;
    min-height: 0;
  }
  .term-badge {
    top: -10px;
    left: 14px;
    transform: none;
  }
}

/* Цены привилегий в карточке: от X ₽ / мес и навсегда Y ₽ */
.card-price-block--terms { display: flex; flex-direction: column; gap: 2px; }
.card-terms-from { margin: 0; font-size: 0.85rem; color: var(--muted); }
.card-terms-from strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--text); }
.card-terms-forever { margin: 0; font-size: 0.82rem; color: var(--muted); }
.card-terms-forever strong { color: var(--text); font-weight: 700; }

/* Бонус рилликов в окне срока — заметная плашка */
.term-bonus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.25);
}

.term-card--best .term-bonus {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

html.theme-dark .term-bonus {
  color: #4ade80;
}

html.theme-dark .term-card--best .term-bonus {
  color: #fff;
}

/* Бонус: аккуратная плашка + подпись «в подарок» */
.term-bonus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  max-width: 100%;
}
.term-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.25);
}
.term-bonus-pill b {
  font-weight: 800;
}
.term-bonus-note {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}
.term-card--best .term-bonus-pill {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.term-card--best .term-bonus-note {
  color: rgba(255, 255, 255, 0.9);
}
html.theme-dark .term-bonus-pill {
  color: #4ade80;
}
html.theme-dark .term-card--best .term-bonus-pill {
  color: #fff;
}

/* Внешний контейнер бонуса без собственного фона (фон только у плашки) */
.term-bonus {
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  font-size: 1rem;
}

.term-card--best .term-bonus {
  background: none;
  box-shadow: none;
  color: inherit;
}

/* Бонус: одна строка — плашка «+N рилликов в подарок» */
.term-bonus {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
}
.term-bonus-pill {
  padding: 7px 12px;
  font-size: 0.8rem;
  border-radius: 999px;
  gap: 5px;
}
.term-bonus-note-inline {
  font-weight: 600;
  opacity: 0.9;
}
.term-bonus-note {
  display: none;
}

/* Бонус: плашка с суммой и подпись «в подарок» под ней (в одну строку не влезает в узкую карточку) */
.term-bonus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 6px;
}
.term-bonus-pill {
  padding: 7px 12px;
  font-size: 0.84rem;
  border-radius: 12px;
  gap: 6px;
}
.term-bonus-note {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #15803d;
  line-height: 1;
}
.term-bonus-note-inline {
  display: none;
}
.term-card--best .term-bonus-note {
  color: #fff;
}
html.theme-dark .term-bonus-note {
  color: #4ade80;
}
html.theme-dark .term-card--best .term-bonus-note {
  color: #fff;
}

/* Бонус: только плашка с текстом «+N рилликов», без подписи и без жирного шрифта */
.term-bonus-pill {
  font-weight: 500;
}
.term-bonus-pill span {
  font-weight: 500;
}
.term-bonus-note {
  display: none;
}

/* Компактный бонус рилликов рядом с названием привилегии в оформлении заказа */
.checkout-bonus {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
  white-space: nowrap;
}
html.theme-dark .checkout-bonus {
  color: #4ade80;
}

/* Карточка «Навсегда»: без двойной рамки, аккуратное выделение */
.term-card--best,
.term-card--best.is-selected {
  border: 2px solid #f57c00;
  background: linear-gradient(180deg, #ffb13b 0%, #f57c00 100%);
  box-shadow: 0 12px 28px rgba(245, 124, 0, 0.35);
}
.term-card--best .term-badge {
  background: #1f2937;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Цены привилегии на странице товара */
.product-terms-from { margin: 0 0 4px; font-size: 0.95rem; color: var(--muted); }
.product-terms-from strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--text); margin-right: 4px; }
.product-terms-forever { margin: 0 0 16px; font-size: 0.95rem; color: var(--muted); }
.product-terms-forever strong { color: var(--text); font-weight: 700; }

/* Выбранный срок — хорошо видно: оранжевая карточка, галочка, остальные серые.
   «Выгоднее всего» без выбора больше не выглядит выбранной. */
.term-card.term-card--best:not(.is-selected) {
  background: var(--surface-2);
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: none;
}
.term-card.term-card--best:not(.is-selected) .term-sub,
.term-card.term-card--best:not(.is-selected) .term-bonus-pill {
  color: var(--muted);
}
.term-card.term-card--best:not(.is-selected) .term-bonus-pill {
  color: #15803d;
}
.term-card.is-selected {
  background: linear-gradient(180deg, #ffb13b 0%, #f57c00 100%);
  color: #fff;
  border: 2px solid #f57c00;
  box-shadow: 0 12px 26px rgba(245, 124, 0, 0.35);
}
.term-card.is-selected .term-sub,
.term-card.is-selected .term-pct,
.term-card.is-selected .term-price,
.term-card.is-selected .term-days {
  color: #fff;
}
.term-card.is-selected .term-bonus-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.term-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #f57c00;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

/* ---- Собери пакет со скидкой (окно выбора срока) ---- */
.term-bundle {
  margin-top: 16px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.term-bundle[hidden] {
  display: none;
}
.term-bundle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}
.term-bundle-off {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f57c00;
  color: #fff;
  font-size: 0.85rem;
}
.term-bundle-row {
  display: grid;
  grid-template-columns: auto 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.term-bundle-row.is-on {
  border-color: #f57c00;
}
.term-bundle-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}
.term-bundle-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.term-bundle-txt strong {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-bundle-cat {
  font-size: 0.78rem;
  color: var(--muted);
}
.term-bundle-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}
.term-bundle-qty input {
  width: 72px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.term-bundle-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.term-bundle-price strong {
  color: #16a34a;
  font-size: 0.95rem;
}
.term-bundle-total {
  margin-top: 6px;
  text-align: right;
  font-size: 0.95rem;
}
.checkout-bundle {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #15803d;
  line-height: 1.4;
}
@media (max-width: 620px) {
  .term-bundle-row {
    grid-template-columns: auto 40px minmax(0, 1fr);
  }
  .term-bundle-qty,
  .term-bundle-price {
    grid-column: 2 / -1;
    align-items: flex-start;
  }
}

.term-bundle-qty {
  gap: 6px;
}
.term-bundle-qty .tb-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.term-bundle-qty .tb-step:disabled {
  opacity: 0.4;
  cursor: default;
}
.term-bundle-qty .tb-val {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  color: var(--text);
}
.term-bundle-qty.is-off .tb-val {
  color: var(--muted);
}

/* ============================================================
   Собери пакет со скидкой — плитки без прокрутки, красивые галочки
   ============================================================ */
.term-bundle {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7ed 0%, var(--surface-2) 100%);
  border: 1px solid rgba(245, 124, 0, 0.18);
}
.term-bundle[hidden] {
  display: none;
}
.tb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}
.tb-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.tb-badge {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb13b, #f57c00);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 6px 14px rgba(245, 124, 0, 0.3);
}
.tb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.tb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 8px 9px;
  border-radius: 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
  min-width: 0;
}
.tb-card:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 124, 0, 0.5);
}
.tb-card:focus-visible {
  outline: 3px solid rgba(245, 124, 0, 0.45);
  outline-offset: 2px;
}
.tb-card.is-on {
  border-color: #f57c00;
  background: #fffaf3;
  box-shadow: 0 8px 20px rgba(245, 124, 0, 0.18);
}
.tb-top {
  position: relative;
  display: flex;
  justify-content: center;
}
.tb-img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}
.tb-img--empty {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}
.tb-check {
  position: absolute;
  top: -6px;
  right: calc(50% - 30px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  background: var(--surface);
  color: var(--muted);
  border: 2px solid var(--border-strong);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tb-card.is-on .tb-check {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.45);
  transform: scale(1.08);
}
.tb-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-cat {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
}
.tb-off {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
  border-radius: 8px;
  background: var(--surface-2);
}
.tb-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px;
  border-radius: 10px;
  background: var(--surface-2);
}
.tb-step {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(180deg, #ffa726, #f57c00);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(245, 124, 0, 0.3);
}
.tb-val {
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  white-space: nowrap;
}
.tb-val small {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.7rem;
}
.tb-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.tb-price s {
  font-size: 0.7rem;
  color: var(--muted);
}
.tb-price strong {
  font-size: 0.92rem;
  color: #16a34a;
}
.tb-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px dashed rgba(245, 124, 0, 0.35);
}
.tb-sum-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tb-sum-count {
  font-size: 0.85rem;
  color: var(--muted);
}
.tb-sum-save {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 700;
}
.tb-sum-total {
  font-size: 0.95rem;
}
.tb-sum-total strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.tb-sum-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Компактно, чтобы окно не прокручивалось */
.term-modal {
  padding: 18px;
}
.term-head {
  margin-bottom: 12px;
  padding: 10px 12px;
}
.term-card {
  padding: 20px 10px 12px;
}
.term-next {
  margin-top: 12px;
  height: 48px;
}

@media (max-width: 620px) {
  .tb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .term-modal {
    max-height: calc(100vh - 16px);
    padding: 14px;
  }
  .term-card {
    padding: 16px 12px;
  }
}

.tb-stepper {
  gap: 2px;
  padding: 2px;
}
.tb-step {
  width: 24px;
  height: 24px;
  font-size: 0.95rem;
}
.tb-val {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-sum-total,
.tb-sum-save {
  flex: 0 0 auto;
}

/* Докупка прав в окне срока: единая сетка, ровные карточки, понятная сводка */
.term-bundle {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fffaf4;
  border: 1px solid rgba(245, 124, 0, 0.2);
}
.tb-head {
  display: block;
  margin: 0 0 12px;
}
.tb-title {
  font-size: 1.05rem;
}
.tb-sub {
  margin-top: 3px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.tb-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.tb-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  justify-items: center;
  gap: 6px;
  padding: 14px 10px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  text-align: center;
}
.tb-card.is-on {
  border-color: #f57c00;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.14);
}
.tb-top {
  width: 56px;
  margin: 0 auto;
}
.tb-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}
.tb-check {
  top: 50%;
  left: 50%;
  right: auto;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.tb-card.is-on .tb-check {
  transform: translate(-50%, -50%) scale(1.08);
}
.tb-name {
  font-size: 0.88rem;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: normal;
  overflow-wrap: anywhere;
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-cat {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.7rem;
}
.tb-off,
.tb-stepper,
.tb-price {
  width: 100%;
  align-self: end;
}
.tb-off {
  padding: 7px 0;
  border-radius: 10px;
  border: 0;
  background: #fff1e0;
  color: #c2410c;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 0.15s ease;
}
.tb-card:not(.is-on):hover .tb-off {
  background: #ffe2c2;
}
.tb-off svg,
.tb-check svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tb-off {
  gap: 5px;
}
.tb-check svg {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
  stroke-width: 3;
}
.tb-check {
  display: inline-flex;
}
.tb-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 2.5em;
}
.tb-info {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
}
.tb-info:hover {
  color: var(--text);
  border-color: var(--muted);
}
.tb-info svg {
  width: 12px !important;
  height: 12px !important;
  max-width: 12px;
  max-height: 12px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tb-off,
.tb-stepper {
  box-sizing: border-box;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-off--on {
  background: #e8f8ee;
  color: #15803d;
}
.tb-stepper {
  height: 32px;
  justify-content: space-between;
}
.tb-step {
  width: 28px;
  height: 28px;
  font-size: 1.05rem;
}
.tb-val {
  font-size: 0.85rem;
}
.tb-price {
  flex-direction: row;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.tb-price strong {
  font-size: 0.98rem;
}
.tb-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.tb-sum-count,
.tb-sum-hint {
  font-size: 0.85rem;
  color: var(--muted);
}
.tb-sum-total {
  font-size: 0.9rem;
}
.tb-sum-total strong {
  font-size: 1.05rem;
}

/* Докупка прав: список строк как «Собери пакет» (галочка, иконка, название, цена со скидкой) */
.tb-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tb-row {
  display: grid;
  grid-template-columns: 22px 46px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tb-row:hover {
  border-color: rgba(245, 124, 0, 0.5);
}
.tb-row:focus-visible {
  outline: 3px solid rgba(245, 124, 0, 0.45);
  outline-offset: 2px;
}
.tb-row.is-on {
  border-color: #f57c00;
  background: #fffaf3;
}
.tb-box {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tb-row.is-on .tb-box {
  background: #f57c00;
  border-color: #f57c00;
  color: #fff;
}
.tb-box svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tb-row .tb-img {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  border-radius: 10px;
}
.tb-main {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  text-align: left;
}
.tb-row .tb-name {
  text-align: left;
}
.tb-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  width: auto;
  text-align: left;
}
.tb-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.tb-row .tb-info {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  position: static;
}
.tb-stepper {
  justify-self: start;
  height: 30px;
  width: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px;
  border-radius: 10px;
  background: var(--surface-2);
}
.tb-row .tb-price {
  grid-column: 4;
  grid-row: 1 / span 2;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
  padding-top: 0;
  border-top: 0;
  margin-top: 0;
  line-height: 1.15;
}
.tb-price s {
  font-size: 0.8rem;
  color: var(--muted);
}
.tb-price strong {
  font-size: 1rem;
  color: #16a34a;
  white-space: nowrap;
}
.tb-sum {
  margin-top: 10px;
}

/* Пакет в оформлении заказа — аккуратный список */
.cbb {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff7ed 0%, #fffdf9 100%);
  border: 1px solid rgba(245, 124, 0, 0.22);
}
.cbb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cbb-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text);
}
.cbb-pct {
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb13b, #f57c00);
  color: #fff;
  font-size: 0.75rem;
}
.cbb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cbb-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.8rem;
}
.cbb-qty {
  min-width: 46px;
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(245, 124, 0, 0.14);
  color: #b45309;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.cbb-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.cbb-price {
  font-weight: 700;
  color: #15803d;
  white-space: nowrap;
}

/* ---- Карточка покупки на странице товара (привилегии) ---- */
.product-buy-card {
  border-radius: 22px;
  padding: 22px;
}
.product-terms-from {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
}
.product-terms-from strong {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.product-terms-forever {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 124, 0, 0.1);
  color: #92400e;
  font-size: 0.9rem;
}
.product-terms-forever strong {
  font-weight: 800;
  color: #b45309;
}
#product-quick-buy[data-product-terms='1'] {
  height: 56px;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffa726 0%, #f57c00 100%);
  border: none;
  box-shadow: 0 12px 26px rgba(245, 124, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
#product-quick-buy[data-product-terms='1']:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(245, 124, 0, 0.45);
}
#product-quick-buy[data-product-terms='1']:active {
  transform: translateY(0);
}

/* Белая иконка корзины на кнопке «Купить» (страница товара) */
#product-quick-buy[data-product-terms='1'] .cart-ico,
#product-quick-buy[data-product-terms='1'] .cart-ico svg {
  color: #fff;
  stroke: #fff;
}

/* Итог пакета — компактнее */
.tb-sum-total {
  font-size: 0.85rem;
  color: var(--muted);
}
.tb-sum-total strong {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-left: 4px;
}

/* Пакет в оформлении: кнопка «Товары пакета», по клику — список товаров */
.cbb {
  margin-top: 8px;
}
.cbb-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid rgba(245, 124, 0, 0.3);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cbb-btn::-webkit-details-marker {
  display: none;
}
.cbb-btn-txt em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
}
.cbb-btn-pct {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb13b, #f57c00);
  color: #fff;
  font-size: 0.75rem;
}
.cbb-btn-arrow {
  color: #f57c00;
  transition: transform 0.2s ease;
}
.cbb[open] .cbb-btn-arrow {
  transform: rotate(180deg);
}
.cbb[open] .cbb-btn {
  border-radius: 12px 12px 0 0;
}
.cbb-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(245, 124, 0, 0.3);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cbb-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.82rem;
}
.cbb-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
}
.cbb-img--empty {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}
.cbb-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}
.cbb-qty {
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(245, 124, 0, 0.14);
  color: #b45309;
  font-weight: 800;
  white-space: nowrap;
}
.cbb-price {
  font-weight: 800;
  color: #15803d;
  white-space: nowrap;
}

/* Оформление: картинка и название сверху, пакет на всю ширину, итог справа внизу */
.checkout-product-hero {
  flex-wrap: wrap;
  align-items: flex-start;
}
.checkout-product-hero > .cbb {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 12px;
}
.checkout-product-hero > .checkout-product-price {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 12px;
  text-align: right;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  font-size: 0.9rem;
}
.checkout-product-hero > .checkout-product-price strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

/* Картинки товаров пакета: не наследуют крупные стили картинки товара */
.checkout-product-hero .cbb-img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
  object-fit: cover;
}
.checkout-product-hero .cbb-item {
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
}
.checkout-product-hero .cbb-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Окно загрузки сроков — появляется сразу по клику */
.term-modal--loading {
  width: min(360px, 100%);
  padding: 28px 22px;
  text-align: center;
}
.term-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--muted);
}
.term-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(245, 124, 0, 0.2);
  border-top-color: #f57c00;
  animation: term-spin 0.7s linear infinite;
}
@keyframes term-spin {
  to { transform: rotate(360deg); }
}

/* ---- Блок валюты на телефоне: в один столбец, без обрезки ---- */
@media (max-width: 760px) {
  .cb-section {
    width: calc(100% - 24px);
    border-radius: 18px;
  }
  .cb-grid {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
  .cb-left {
    min-height: 0;
    padding: 20px 18px 110px;
    gap: 10px;
  }
  .cb-heading {
    font-size: 1.2rem;
    max-width: none;
  }
  .cb-art {
    width: 92px;
    right: -6px;
    bottom: -10px;
  }
  .cb-right {
    padding: 18px 16px 18px;
  }
  .cb-title-row {
    margin-bottom: 10px;
  }
  .cb-title {
    font-size: 1rem;
  }
  .cb-amount-row {
    align-items: center;
  }
  .cb-amount-value {
    font-size: 1.3rem;
  }
  .cb-quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 10px 0 12px;
  }
  .cb-quick::-webkit-scrollbar {
    display: none;
  }
  .cb-chip {
    flex: 0 0 auto;
  }
  .cb-exchange {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .cb-box {
    min-width: 0;
    padding: 9px 10px;
  }
  .cb-box-label {
    font-size: 0.66rem;
  }
  .cb-box-value {
    font-size: 0.95rem;
  }
  .cb-exchange .cb-box:nth-child(3) .cb-box-value {
    font-size: 0.9rem;
  }
  .cb-unit {
    font-size: 0.72rem;
    display: inline-block;
    margin-left: 2px;
  }
  .cb-buy {
    margin: 10px 0 0;
    width: 100%;
    justify-content: center;
    height: 50px;
  }
}

@media (max-width: 760px) {
  .cb-exchange {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .cb-exchange .cb-box:first-child,
  .cb-exchange .cb-box:nth-child(3) {
    flex: 1 1 0;
  }
  .cb-swap {
    align-self: center;
  }
  .cb-buy {
    flex: 0 0 100%;
  }
}

/* Оформление: без пустого места под названием, когда пакета нет */
.checkout-product-hero {
  align-items: center;
}
.checkout-product-hero > .checkout-product-price {
  margin-top: 8px;
  padding-top: 8px;
}
.checkout-product-hero > .checkout-product-price:first-of-type {
  margin-top: 6px;
}
.checkout-product-hero:not(:has(.cbb)) > .checkout-product-price {
  margin-top: 4px;
}

/* Иконки категорий: аккуратные, одного размера */
.cat-ico {
  border-radius: 12px;
}
.cat-ico svg.ico-svg {
  width: 20px;
  height: 20px;
}

/* Поля «Отдаёте» / «Получаете» — можно вписать своё количество */
.cb-box-input {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cb-input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: inherit;
  padding: 0;
  outline: none;
}
.cb-box:focus-within {
  border-color: #f57c00;
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}
.cb-input-unit {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85em;
}
.cb-exchange .cb-box:nth-child(3) .cb-input {
  width: 6ch;
}

/* Лента «Недавно купили»: прокрутку ведёт JS (работает и при уменьшении анимации) */
.rp-track {
  animation: none !important;
  will-change: transform;
}
.rp-viewport {
  overflow: hidden !important;
  scrollbar-width: none;
}

/* Кнопка «i» и описание привилегии в окне выбора срока */
.term-info-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.term-info-btn:hover,
.term-info-btn.is-on {
  background: #f57c00;
  border-color: #f57c00;
  color: #fff;
}
.term-desc {
  margin: -6px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
}
.term-desc[hidden] {
  display: none;
}

/* Название привилегии и кнопка-иконка «i» в одну строку */
.term-head-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.term-head-row .term-info-btn {
  width: 26px;
  height: 26px;
  font-family: inherit;
  font-style: normal;
  font-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-color: rgba(245, 124, 0, 0.35);
  color: #f57c00;
}
.term-head-row .term-info-btn:hover,
.term-head-row .term-info-btn.is-on {
  color: #fff;
}

/* Всплывающее окно описания привилегии */
.info-pop {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 14, 24, 0.5);
  backdrop-filter: blur(3px);
}
.info-pop-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 26px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.info-pop-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.info-pop-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 52px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.info-pop-img {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--surface-2);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.info-pop-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.info-pop-title {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.info-pop-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.info-pop-body span {
  display: block;
}
.info-pop-h {
  display: block;
  margin-top: 12px;
  font-weight: 800;
}
@media (max-width: 520px) {
  .info-pop-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .info-pop-img {
    width: 96px;
    height: 96px;
  }
  .info-pop-title {
    font-size: 1.6rem;
  }
}

/* Описание привилегии: разделы, пункты с оранжевой чертой */
.info-pop-body {
  font-size: 0.95rem;
  line-height: 1.6;
}
.info-pop-body .info-pop-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  text-transform: none;
}
.info-pop-body .info-pop-h::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffb13b, #f57c00);
}
.info-pop-body .info-pop-h:first-child {
  margin-top: 0;
}
.info-pop-body .info-pop-p {
  margin: 0 0 6px;
  color: var(--muted);
}
.info-pop-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-pop-list li {
  position: relative;
  padding: 8px 12px 8px 30px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.92rem;
}
.info-pop-list li::before {
  content: "―";
  position: absolute;
  left: 12px;
  top: 7px;
  color: #f57c00;
  font-weight: 800;
}

.info-pop-list li::before {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  line-height: 1;
}

/* Пункты описания: черта и текст в одну строку, по центру */
.info-pop-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
}
.info-pop-list li::before {
  content: "―";
  position: static;
  transform: none;
  flex: 0 0 auto;
  color: #f57c00;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

/* Черта у пунктов — ровная линия по центру строки */
.info-pop-list li::before {
  content: "";
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: #f57c00;
  font-size: 0;
  line-height: 0;
}

/* ===== Страница «Как зайти» (play.php) ===== */
.pl-page { max-width: 1100px; margin: 0 auto; padding: 32px 16px 56px; color: inherit; }
.pl-step { color: #1d1d1d; }
.pl-head { text-align: center; margin-bottom: 32px; }
.pl-eyebrow { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: 8px; background: #f39513; color: #fff; font-weight: 600; font-size: .95rem; }
.cb-version { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cb-version-badge { display: inline-block; padding: 8px 14px; border-radius: 8px; background: #f39513; color: #fff; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.cb-version-link { font-size: 1rem; color: #fff; text-decoration: none !important; }
.cb-version-link:hover, .cb-version-link:focus { text-decoration: none !important; }
.pl-title { font-size: 2.2rem; font-weight: 700; margin: 0 0 10px; }
.pl-lead { font-size: 1.1rem; margin: 0; opacity: .75; }
.pl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pl-step { position: relative; background: #fff; border: 1px solid #e6e6ea; border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.05); }
.pl-step-badge { align-self: flex-start; background: #f39513; color: #fff; font-weight: 600; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.pl-step-title { font-size: 1.35rem; font-weight: 700; margin: 4px 0 0; }
.pl-step-text { margin: 0; line-height: 1.5; }
.pl-step-art { position: absolute; top: 20px; right: 20px; color: #f39513; opacity: .35; }
.pl-step-img { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 10px; margin-top: 6px; }
.pl-ip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; background: #1c1f27; color: #fff; border-radius: 14px; padding: 12px 14px; }
.pl-ip-col { display: flex; flex-direction: column; min-width: 0; }
.pl-ip-label { font-size: .8rem; opacity: .6; }
.pl-ip-value { font-weight: 600; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ip-copy { flex: 0 0 40px; height: 40px; border: 0; border-radius: 10px; background: #fff; color: #1c1f27; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pl-video { margin-top: 32px; background: #fff; border: 1px solid #e6e6ea; border-radius: 18px; padding: 28px; text-align: center; }
.pl-video-title { font-size: 1.5rem; margin: 0 0 8px; }
.pl-video-desc { margin: 0 0 16px; opacity: .75; }
.pl-video-btn { display: inline-block; background: #f39513; color: #fff; padding: 12px 22px; border-radius: 10px; text-decoration: none; font-weight: 600; }
@media (max-width: 760px) {
  .pl-steps { grid-template-columns: 1fr; }
  .pl-title { font-size: 1.7rem; }
}

/* play.php: адрес выше, примечание внизу карточки */
.pl-step .pl-ip { margin-top: 14px; }
.pl-note { margin: auto 0 0; padding-top: 16px; font-size: .9rem; color: #8a8a96; }

/* play.php: примечание сразу под адресом сервера */
.pl-step .pl-note { margin: 12px 0 0; padding-top: 0; }

/* Отступ от шапки: контент страниц ниже плавающей шапки */
main.page {
  padding-top: 36px;
}

@media (max-width: 768px) {
  main.page {
    padding-top: 28px;
  }
}

/* Главная: баннер чуть ближе к шапке */
main.page > .hero {
  margin-top: 4px;
}

/* Один срок «навсегда» (например, CUSTOM): текст под названием вместо карточки срока */
.term-grid--hidden {
  display: none;
}

.term-forever {
  margin: -8px 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.term-forever-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(243, 149, 19, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
}

/* Докупка прав: полное название, без обрезки */
.tb-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

/* Кнопка «Назад в магазин» со SVG-стрелкой */
.product-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-back-link svg {
  flex: 0 0 18px;
}

.product-back-link,
.product-back-link:hover,
.product-back-link:focus {
  text-decoration: none !important;
}

/* Докупка прав: тёмная тема */
html.theme-dark .term-bundle {
  background: linear-gradient(180deg, rgba(243, 149, 19, 0.08) 0%, var(--surface-2) 100%);
  border-color: rgba(243, 149, 19, 0.22);
}
html.theme-dark .tb-title {
  color: #f2f2f7;
}
html.theme-dark .tb-sub {
  color: #9da3b4;
}

/* Карточка «Купить» на странице товара: белая (в тёмной теме — цвет поверхности) */
.product-buy-card {
  background: #fff;
}
html.theme-dark .product-buy-card {
  background: var(--surface);
}

/* Кнопка «Купить» на странице товара: белая с тёмным текстом */
.product-buy-card .btn-primary {
  background: #fff;
  color: #1c1f27;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(18, 25, 44, 0.08);
}
.product-buy-card .btn-primary:hover,
.product-buy-card .btn-primary:focus-visible {
  background: #f7f8fb;
  color: #1c1f27;
}
html.theme-dark .product-buy-card .btn-primary {
  background: var(--surface-2);
  color: #f2f2f7;
}

/* Кнопка «Купить»: тёмная (не оранжевая), иконка корзины белая */
.product-buy-card .btn-primary {
  background: #1c1f27;
  color: #fff;
  border: 0;
  box-shadow: 0 6px 18px rgba(18, 25, 44, 0.18);
}
.product-buy-card .btn-primary:hover,
.product-buy-card .btn-primary:focus-visible {
  background: #2a2f3b;
  color: #fff;
}
.product-buy-card .btn-primary .cart-ico svg,
.product-buy-card .btn-primary .cart-ico svg * {
  stroke: #fff;
}
html.theme-dark .product-buy-card .btn-primary {
  background: #f2f2f7;
  color: #1c1f27;
}
html.theme-dark .product-buy-card .btn-primary .cart-ico svg,
html.theme-dark .product-buy-card .btn-primary .cart-ico svg * {
  stroke: #1c1f27;
}

/* Кнопка «Купить» снова оранжевая, иконка корзины белая */
.product-buy-card .btn-primary {
  background: #f39513;
  color: #fff;
  border: 0;
  box-shadow: none;
}
.product-buy-card .btn-primary:hover,
.product-buy-card .btn-primary:focus-visible {
  background: #eb8a02;
  color: #fff;
}
.product-buy-card .btn-primary .cart-ico svg,
.product-buy-card .btn-primary .cart-ico svg * {
  stroke: #fff;
}
html.theme-dark .product-buy-card .btn-primary {
  background: #f39513;
  color: #fff;
}
html.theme-dark .product-buy-card .btn-primary .cart-ico svg,
html.theme-dark .product-buy-card .btn-primary .cart-ico svg * {
  stroke: #fff;
}


/* Окно срока: все сроки видны без прокрутки — три карточки в ряд на любом экране */
.term-modal {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
.term-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.term-card {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  text-align: center !important;
  align-items: center;
  gap: 4px !important;
  padding: 14px 6px 10px !important;
  min-width: 0;
}
.term-days {
  font-size: 0.95rem;
}
.term-price {
  font-size: 0.95rem;
}
.term-sub {
  font-size: 0.72rem;
  line-height: 1.25;
}
.term-bonus-pill {
  white-space: normal;
  text-align: center;
  font-size: 0.7rem;
  padding: 4px 6px;
  line-height: 1.2;
}
.term-head {
  padding: 8px 10px;
  margin-bottom: 8px;
}
.term-next {
  height: 44px;
  margin-top: 8px;
}
.term-grid--hidden {
  display: none !important;
}
@media (max-width: 380px) {
  .term-card {
    padding: 10px 4px 8px !important;
  }
  .term-bonus-pill {
    font-size: 0.62rem;
  }
}

/* Окно срока: место под плашки «Популярный выбор» / «Выгоднее всего» и галочку не перекрывают текст */
.term-grid {
  margin-top: 14px;
}
.term-card {
  padding-top: 24px !important;
}
.term-badge {
  top: -13px;
  white-space: nowrap;
}
.term-card.is-selected::after {
  top: -9px;
  right: -9px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Окно срока на телефоне: без перекрытий и переносов бонуса */
.term-bonus-word {
  display: inline;
}
@media (max-width: 620px) {
  .term-bonus-word {
    display: none;
  }
  .term-bonus-pill {
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 4px 5px;
    gap: 3px;
  }
  .term-bonus-pill svg {
    width: 11px;
    height: 11px;
  }
  .term-card.is-selected::after {
    top: auto;
    bottom: -9px;
    right: -9px;
  }
  .term-badge {
    font-size: 0.66rem;
    padding: 3px 8px;
    top: -12px;
  }
  .term-card:first-child .term-badge {
    left: 0;
    transform: none;
  }
}

/* Окно срока на телефоне: галочка внутри карточки, отступ до кнопки «Далее» */
@media (max-width: 620px) {
  .term-card.is-selected::after {
    top: 6px;
    right: 6px;
    bottom: auto;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 0.62rem;
    box-shadow: none;
  }
  .term-grid {
    margin-bottom: 10px;
  }
  .term-card {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

/* Плашки «Популярный выбор» / «Выгоднее всего» и галочка: одинаково на всех экранах, без перекрытий */
.term-badge {
  top: -11px;
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1.2;
}
.term-card.is-selected::after {
  top: 7px;
  right: 7px;
  bottom: auto;
  width: 18px;
  height: 18px;
  line-height: 18px;
  font-size: 0.6rem;
  box-shadow: none;
}

/* Галочка выбранного срока — в правом нижнем углу карточки, верх свободен под плашку */
.term-card.is-selected::after {
  top: auto;
  bottom: 7px;
  right: 7px;
}

/* Плашки срока всегда строго по центру карточки */
.term-card .term-badge {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* Галочка выбранного срока — в правом верхнем углу карточки */
.term-card.is-selected::after {
  top: 7px;
  bottom: auto;
  right: 7px;
}

/* Иконка валюты в плашке бонуса рилликов */
.term-bonus-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 16px;
}

/* Иконка валюты рядом с количеством в «Получаете» */
.riliki-ico {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  object-fit: contain;
}

/* Иконка валюты в плашке бонуса: аккуратно и на выбранной оранжевой карточке */
.term-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.term-bonus-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Крупная иконка валюты рядом с количеством в «Покупка игровой валюты» */
.cb-amount-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cb-amount-ico {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
  filter: drop-shadow(0 4px 10px rgba(243, 149, 19, 0.35));
}

/* Иконка валюты 10×7 px: целочисленное увеличение без свечения и размытия */
.cb-amount-ico {
  width: 30px;
  height: 21px;
  flex: 0 0 30px;
  filter: none;
  image-rendering: pixelated;
}
.riliki-ico {
  width: 20px;
  height: 14px;
  image-rendering: pixelated;
}
.term-bonus-ico {
  width: 20px;
  height: 14px;
  flex: 0 0 20px;
  border-radius: 0;
  background: none;
  padding: 0;
  box-shadow: none;
  image-rendering: pixelated;
}

/* Сумма и иконка валюты рядом, с адаптацией под большие числа */
.cb-amount-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.cb-amount-value {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  min-width: 0;
}
.cb-amount-row {
  gap: 12px;
  flex-wrap: wrap;
}
.cb-amount-row > .cb-amount-label {
  min-width: 0;
  flex: 1 1 auto;
}

/* Докупка прав, тёмная тема: выбранная карточка тёмная, текст читается */
html.theme-dark .tb-card {
  background: rgba(255, 255, 255, 0.04);
  color: #f2f2f7;
}
html.theme-dark .tb-card.is-on {
  background: rgba(243, 149, 19, 0.14);
  border-color: #f39513;
  color: #f2f2f7;
}
html.theme-dark .tb-card .tb-name,
html.theme-dark .tb-card .tb-price strong {
  color: #f2f2f7;
}
html.theme-dark .tb-card .tb-cat,
html.theme-dark .tb-card .tb-off {
  color: #9da3b4;
}

/* Блок «Товары пакета» в оформлении: без «−0%», читаемо в тёмной теме */
html.theme-dark .cbb-btn {
  background: rgba(243, 149, 19, 0.12);
  border-color: rgba(243, 149, 19, 0.35);
}
html.theme-dark .cbb-btn-txt,
html.theme-dark .cbb-btn-txt em,
html.theme-dark .cbb-btn-arrow {
  color: #f2f2f7;
}

/* Товары пакета в оформлении, тёмная тема: тёмный фон, светлый текст */
html.theme-dark .cbb {
  background: linear-gradient(180deg, rgba(243, 149, 19, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(243, 149, 19, 0.25);
}
html.theme-dark .cbb-btn {
  background: #22201d;
  border-color: rgba(243, 149, 19, 0.35);
}
html.theme-dark .cbb-btn-txt em {
  color: #c9ccd6;
}

/* Блок валюты на телефоне: меньше пустого места в оранжевой карточке */
@media (max-width: 620px) {
  .cb-left {
    padding: 16px 16px 14px !important;
    min-height: 0 !important;
  }
  .cb-art {
    display: none;
  }
  .cb-heading {
    font-size: 1.25rem;
    margin-bottom: 10px;
  }
  .cb-version {
    margin-bottom: 10px;
  }
  .cb-ip {
    margin-top: 0;
  }
}

/* Блок валюты в одну колонку (планшет и телефон): компактнее */
@media (max-width: 900px) {
  .cb-left {
    padding: 16px 16px 14px !important;
    min-height: 0 !important;
  }
  .cb-art {
    display: none;
  }
  .cb-heading {
    font-size: 1.25rem;
    margin-bottom: 10px;
  }
  .cb-version {
    margin-bottom: 10px;
  }
}

/* Категории в магазине: без полосы прокрутки под кнопками */
.sidebar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar {
  display: none;
  height: 0;
}

/* Сумма «Получаете» и иконка валюты — ровно по центру строки */
.currency-checkout-sum-value {
  display: inline-flex;
  align-items: center;
}
.currency-checkout-sum-value .riliki-ico {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

/* Блок валюты на сервере без валюты (BoxPvP): остаётся только оранжевая карточка и расширяется на всю ширину */
.cb-section {
  transition: opacity 0.3s ease;
}
.cb-section.cb-off .cb-right {
  display: none;
}
.cb-section.cb-off .cb-grid {
  grid-template-columns: 1fr !important;
}
.cb-section.cb-off .cb-left {
  animation: cbExpand 0.35s ease;
}
@keyframes cbExpand {
  from {
    opacity: 0.4;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* На сервере без валюты (BoxPvP) убираем картинку с монетами */
.cb-section.cb-off .cb-art {
  display: none;
}

/* Бонус рилликов рядом с названием привилегии в каталоге */
.card-bonus {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(46, 170, 92, 0.14);
  color: #1e7c40;
  font-size: 0.78rem;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}
.card-bonus .riliki-ico {
  width: 14px;
  height: 10px;
  image-rendering: pixelated;
}
html.theme-dark .card-bonus {
  color: #5fd08a;
}

/* Название привилегии и плашка бонуса — на одной линии */
.card-title.has-bonus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.card-title .card-bonus {
  margin-left: 0;
  line-height: 1;
  height: 22px;
  align-self: center;
}

/* Плашки на карточках товара: красная «СКИДКА», процент — как в готовом стиле проекта */
.card-sale-badge--hot {
  top: 10px;
  right: 10px;
  background: #ff3337;
  color: #fff;
  border-radius: 16px;
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(255, 51, 55, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.card-sale-badge--pct {
  border-radius: 16px;
  padding: 7px 14px;
  background: rgba(18, 25, 44, 0.7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Плашка «ХИТ» (зелёная), сейчас для CUSTOM — слева сверху */
.card-hit-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 7px 14px;
  border-radius: 16px;
  background: #188647;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(24, 134, 71, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
}

/* Две плашки на карточке: «СКИДКА» слева, «ХИТ» справа; процент на картинке скрываем */
.card-hit-badge {
  left: auto;
  right: 10px;
  top: 10px;
}
.card-sale-badges.has-hit .card-sale-badge--pct {
  display: none;
}
.card-sale-badges.has-hit .card-sale-badge--hot {
  left: 10px;
  right: auto;
  top: 10px;
}

/* Плашки в «вырезе» картинки: под каждой белая вкладка с закруглённым углом, как в образце */
.card-sale-badge--hot::before,
.card-hit-badge::before {
  content: "";
  position: absolute;
  top: -10px;
  bottom: -12px;
  left: -10px;
  right: -10px;
  background: var(--surface, #fff);
  border-radius: 0 0 20px 0;
  z-index: -1;
}
.card-hit-badge::before {
  border-radius: 0 0 0 20px;
}
.card-sale-badges.has-hit .card-sale-badge--hot::before {
  border-radius: 0 0 20px 0;
}
.card-sale-badge--hot,
.card-hit-badge {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Белые вкладки-«вырезы» под плашками убраны: плашки стоят прямо на картинке */
.card-sale-badge--hot::before,
.card-hit-badge::before {
  display: none;
}

/* Карточки товаров — как на gamegrief.easydonate.ru: без рамки и фона, картинка-квадрат со скруглением, крупная цена */
.card-product {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
.card-product .card-img-wrap {
  border-radius: 28px;
  border: 1px solid #e8e8e8;
  box-shadow: none;
}
.card-product .card-img-wrap img {
  border-radius: 28px;
}
.card-product .card-title {
  font-family: "Golos Text", var(--font, sans-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.75);
  text-transform: none;
  margin: 14px 0 6px;
  line-height: 1.25;
}
html.theme-dark .card-product .card-title {
  color: rgba(255, 255, 255, 0.85);
}
.card-product .card-price-block {
  margin: 0;
}
.card-product .card-price-block .card-price,
.card-product .card-price-block p {
  font-size: 1.6rem;
  font-weight: 500;
  color: #111;
  margin: 0;
}
html.theme-dark .card-product .card-price-block .card-price {
  color: #fff;
}

/* Карточки — точная копия логики easydonate: прозрачная карточка, при наведении — фон и тень, картинка увеличивается */
.card-product {
  padding: 12px;
  border-radius: 42px;
  transition: 0.2s ease all;
}
.card-product:hover {
  background: #fff;
  box-shadow: 0 4px 45px 0 rgba(0, 0, 0, 0.1);
}
html.theme-dark .card-product:hover {
  background: var(--surface);
}
.card-product .card-img-wrap {
  border-radius: 33px;
  border: 1px solid #ececf2;
  transition: 0.2s ease all;
}
.card-product .card-img-wrap img {
  transition: 0.2s ease all;
  object-fit: contain;
}
.card-product:hover .card-img-wrap img {
  transform: scale(1.1);
}
.card-product .card-body {
  padding: 20px 10px 10px 10px;
}
.card-product .card-title {
  font-size: 20px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.55);
  margin: 0 0 10px;
}
.card-product:hover .card-title {
  color: #f39513;
}
.card-product .card-price-block .card-price,
.card-product .card-price-block p {
  transition: 0.2s ease all;
}
.card-product:hover .card-price-block .card-price,
.card-product:hover .card-price-block p {
  color: #f39513;
}

/* Цена на карточках — без фона-«таблетки», крупным текстом, как на easydonate */
.card-product .card-price,
.card-product .card-price-block p,
.card-product .card-price-block .card-price--sale {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: block;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.1;
}
.card-product .card-price-meta {
  margin: 4px 0 0;
}

/* Шрифт карточек — Golos Text, как на easydonate */
.card-product,
.card-product .card-title,
.card-product .card-price,
.card-product .card-price-block p {
  font-family: "Golos Text", sans-serif !important;
}

/* Карточка как на easydonate: кнопка корзины появляется только при наведении, компактные отступы */
.card-product .btn-add-cart {
  opacity: 0;
  transition: 0.2s ease opacity;
}
.card-product:hover .btn-add-cart {
  opacity: 1;
}
@media (hover: none) {
  .card-product .btn-add-cart {
    opacity: 1;
  }
}
.card-product .card-body {
  padding: 14px 10px 10px 10px;
}
.card-product .card-title {
  margin: 0 0 6px;
}
.card-product .card-price-block {
  margin-top: 6px;
}

/* Точные значения с easydonate: название 20px/400, цена ~27px/400, картинка contain на светлом фоне */
.card-product {
  width: 100%;
}
.card-product .card-img-wrap {
  background: #fefefe;
  border: 0.8px solid #e8e8e8;
}
.card-product .card-img-wrap img {
  object-fit: contain;
}
.card-product .card-body {
  padding: 20px 10px 10px 10px;
}
.card-product .card-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.43;
  color: rgba(0, 0, 0, 0.75);
  margin: 0 0 10px;
}
.card-product .card-price,
.card-product .card-price-block p {
  font-size: 1.71rem;
  font-weight: 400;
  color: #000;
}
html.theme-dark .card-product .card-title {
  color: rgba(255, 255, 255, 0.75);
}
html.theme-dark .card-product .card-price,
html.theme-dark .card-product .card-price-block p {
  color: #fff;
}

/* Убираем лишний пустой отступ между названием и ценой (как на easydonate) */
.card-product .card-title {
  min-height: 0;
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.card-product .card-body {
  padding-bottom: 14px;
}

/* Лёгкая полировка карточек: мягкая тень у картинки, аккуратные отступы */
.card-product .card-img-wrap {
  box-shadow: 0 8px 22px rgba(18, 25, 44, 0.07);
}
.card-product .card-title {
  letter-spacing: 0.01em;
  margin-top: 12px;
}
.card-product .card-price,
.card-product .card-price-block p {
  letter-spacing: -0.01em;
  margin-top: 4px;
}
html.theme-dark .card-product .card-img-wrap {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

/* Выбор сервера в каталоге — как на easydonate: крупные пункты с иконкой, выбранный — оранжевая рамка */
.sel-list {
  border-radius: 22px;
  padding: 8px;
  border: 1px solid #ececf2;
  box-shadow: 0 16px 40px rgba(18, 25, 44, 0.14);
}
.sel-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 8px 14px 8px 64px;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.sel-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f1f1f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='6' rx='2'/%3E%3Crect x='3' y='14' width='18' height='6' rx='2'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.sel-item:hover {
  background: rgba(243, 149, 19, 0.05);
}
.sel-item.is-active {
  border-color: #f39513;
  background: rgba(243, 149, 19, 0.06);
  color: #111;
}
html.theme-dark .sel-item::before {
  background-color: #2a2d36;
}
html.theme-dark .sel-item.is-active {
  color: #fff;
}

/* Выбор сервера 1 в 1 как на easydonate: слово «Сервер» крупно слева, справа выбранный сервер подчёркнутым оранжевым текстом */
.toolbar-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.toolbar-field .field-label {
  font-family: "Golos Text", sans-serif;
  font-size: 1.71rem;
  font-weight: 400;
  color: #000;
  margin: 0;
  letter-spacing: 0;
}
html.theme-dark .toolbar-field .field-label {
  color: #fff;
}
.select-wrap {
  max-width: none;
  position: relative;
}
.sel-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Golos Text", sans-serif;
  font-size: 1.71rem;
  font-weight: 400;
  color: #f5b759;
  text-decoration: underline;
  text-underline-offset: 4px;
  line-height: 1.2;
  white-space: nowrap;
}
.sel-btn::before {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  position: static;
  transform: none;
  border-radius: 12px;
}
.sel-btn::after {
  position: static;
  width: 8px;
  height: 8px;
  border-right: 2px solid #f5b759;
  border-bottom: 2px solid #f5b759;
  transform: translateY(-4px) rotate(-135deg);
  margin-left: 4px;
  right: auto;
  top: auto;
}
.select-wrap.is-open .sel-btn::after {
  transform: translateY(2px) rotate(45deg);
}
.sel-btn:focus-visible {
  outline: none;
  box-shadow: none;
}
.sel-list {
  left: 0;
  right: auto;
  min-width: 260px;
  top: calc(100% + 10px);
  padding: 2px;
  border-radius: 32px;
  border: 0.8px solid #e8e8e8;
  box-shadow: 0 10px 30px rgba(18, 25, 44, 0.12);
}
.sel-item {
  min-height: 64px;
  padding: 10px 18px 10px 66px;
  border-radius: 30px;
  font-size: 1.35rem;
  font-weight: 500;
  color: #000;
}
.sel-item::before {
  left: 13px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.sel-item.is-active {
  border: 0.8px solid #f5b759;
  background: #fff;
}
.sel-item:hover {
  background: rgba(245, 183, 89, 0.06);
}

/* Выбор сервера: без рамок у кнопки (ни в покое, ни при открытии/фокусе), аккуратная стрелка, пункты без жирного */
.sel-btn,
.sel-btn:hover,
.sel-btn:focus,
.sel-btn:focus-visible,
.select-wrap.is-open .sel-btn {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}
.sel-btn::after {
  width: 9px;
  height: 9px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  align-self: center;
  flex: 0 0 auto;
  display: inline-block;
}
.sel-item.is-active {
  font-weight: 500;
  color: #000;
}

/* ===== Выбор сервера 1 в 1 с easydonate (значения из их style.css и замеров) ===== */
.toolbar-field {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.toolbar-field .field-label {
  font-family: "Golos Text", sans-serif;
  font-size: 27.41px;
  font-weight: 400;
  line-height: 1.24;
  color: #000;
  margin: 0;
}
html.theme-dark .toolbar-field .field-label {
  color: #fff;
}
.select-wrap {
  max-width: none;
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}
.sel-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font-family: "Golos Text", sans-serif;
  font-size: 27.41px;
  font-weight: 400;
  line-height: 1;
  color: #f5b759;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
  cursor: pointer;
}
/* Иконка сервера: серый квадрат 40px */
.sel-btn::before {
  content: "";
  position: static;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: #f1f1f1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='6' rx='2'/%3E%3Crect x='3' y='14' width='18' height='6' rx='2'/%3E%3C/svg%3E") center / 20px no-repeat;
  transform: none;
}
/* Стрелка-шеврон 24px */
.sel-btn::after {
  content: "";
  position: static;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 0;
  transform: none;
  margin: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f5b759' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 24px no-repeat;
  transition: transform 0.2s ease;
}
.select-wrap.is-open .sel-btn::after {
  transform: rotate(180deg);
}
/* Выпадающий список */
.sel-list {
  position: absolute;
  top: 56px;
  left: 0;
  right: auto;
  min-width: 325px;
  padding: 2px;
  margin: 0;
  list-style: none;
  border: 1px solid #ececf2;
  border-radius: 32px;
  background: #fff;
  box-shadow: none;
  max-height: none;
  overflow: visible;
}
html.theme-dark .sel-list {
  background: var(--surface);
}
.sel-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 0;
  padding: 15px 16px 15px 16px;
  margin: 0 0 2px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: transparent;
  font-family: "Golos Text", sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #000;
  transition: 0.2s ease all;
}
.sel-item:last-child {
  margin-bottom: 0;
}
.sel-item::before {
  position: static;
  transform: none;
  left: auto;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background-color: #f1f1f1;
}
.sel-item:hover {
  background: #f7f7f9;
  border-color: #f7f7f9;
}
.sel-item:active {
  opacity: 0.5;
}
.sel-item.is-active {
  border-color: #f5b759;
  font-weight: 400;
  color: #000;
}
html.theme-dark .sel-item {
  color: #fff;
}
html.theme-dark .sel-btn::before {
  background-color: #2a2d36;
}

/* Выбор сервера: адаптив — на планшете и телефоне текст и иконка меньше */
@media (max-width: 768px) {
  .toolbar-field {
    gap: 14px;
  }
  .toolbar-field .field-label {
    font-size: 1.4rem;
  }
  .sel-btn {
    font-size: 1.4rem;
    gap: 10px;
  }
  .sel-btn::before {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
  }
  .sel-btn::after {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    background-size: 20px;
  }
  .sel-list {
    min-width: 260px;
  }
  .sel-item {
    font-size: 1.1rem;
    padding: 12px 14px;
  }
}
@media (max-width: 420px) {
  .toolbar-field .field-label {
    font-size: 1.2rem;
  }
  .sel-btn {
    font-size: 1.2rem;
  }
  .sel-btn::before {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

/* Выбор сервера: ещё немного меньше на всех экранах */
.toolbar-field .field-label {
  font-size: 1.3rem;
}
.sel-btn {
  font-size: 1.3rem;
  gap: 10px;
}
.sel-btn::before {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}
.sel-btn::after {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  background-size: 20px;
}
@media (max-width: 768px) {
  .toolbar-field .field-label,
  .sel-btn {
    font-size: 1.15rem;
  }
  .sel-btn::before {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

/* Шрифт выбора сервера — Golos Text, как на easydonate (во всех состояниях) */
.toolbar-field,
.toolbar-field .field-label,
.select-wrap,
.sel-btn,
.sel-list,
.sel-item {
  font-family: "Golos Text", sans-serif !important;
  letter-spacing: 0;
  text-transform: none;
}
.sel-item {
  font-weight: 400 !important;
}

/* Пункты списка серверов — как на easydonate: Golos Text 27.4px, вес 500 */
.sel-item {
  font-family: "Golos Text", sans-serif !important;
  font-size: 27.41px !important;
  font-weight: 500 !important;
  line-height: 34.41px;
  color: #000;
}
html.theme-dark .sel-item {
  color: #fff;
}
@media (max-width: 768px) {
  .sel-item {
    font-size: 1.3rem !important;
  }
}

/* Список серверов: чуть меньше текст и пункты */
.sel-item {
  font-size: 1.45rem !important;
  min-height: 0;
  padding: 11px 14px;
}
.sel-item::before {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

/* Иконка сервера — точная SVG с easydonate (серый квадрат + значок) */
.sel-btn::before,
.sel-item::before {
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 51 50' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.5' width='50' height='50' rx='19' fill='%23F1F1F1'/%3E%3Cpath d='M31.5 25C32.2956 25 33.0587 24.6839 33.6213 24.1213C34.1839 23.5587 34.5 22.7957 34.5 22V20C34.5 19.2044 34.1839 18.4413 33.6213 17.8787C33.0587 17.3161 32.2956 17 31.5 17H19.5C18.7044 17 17.9413 17.3161 17.3787 17.8787C16.8161 18.4413 16.5 19.2044 16.5 20V22C16.5 22.7957 16.8161 23.5587 17.3787 24.1213C17.9413 24.6839 18.7044 25 19.5 25M31.5 25H19.5M31.5 25C32.2956 25 33.0587 25.3161 33.6213 25.8787C34.1839 26.4413 34.5 27.2044 34.5 28V30C34.5 30.7957 34.1839 31.5587 33.6213 32.1213C33.0587 32.6839 32.2956 33 31.5 33H19.5C18.7044 33 17.9413 32.6839 17.3787 32.1213C16.8161 31.5587 16.5 30.7957 16.5 30V28C16.5 27.2044 16.8161 26.4413 17.3787 25.8787C17.9413 25.3161 18.7044 25 19.5 25M20.5 21V21.01M20.5 29V29.01M24.5 21H30.5M24.5 29H30.5' stroke='black' stroke-opacity='0.5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}

/* ===== Корзина (список товаров) — в стиле easydonate ===== */
.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cart-title {
  font-family: "Golos Text", sans-serif;
  font-size: 27.41px;
  font-weight: 400;
  color: #000;
  margin: 0 0 6px;
}
html.theme-dark .cart-title {
  color: #fff;
}
.cart-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ececf2;
}
.cart-line-main {
  flex: 1 1 auto;
  min-width: 0;
}
.cart-line-main > img {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  float: left;
  margin-right: 14px;
}
.cart-line-main .checkout-product-body {
  overflow: hidden;
}
.cart-line-main .checkout-product-title {
  font-family: "Golos Text", sans-serif;
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
  margin: 0 0 6px;
}
.cart-line-main .checkout-product-price {
  font-family: "Golos Text", sans-serif;
  font-size: 27.41px;
  font-weight: 500;
  color: #000;
  margin: 8px 0 0;
  text-align: right;
}
.cart-line-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.cart-line-remove {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #ffe3e3;
  color: #e5484d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cart-line-remove:hover {
  background: #ffd0d0;
}
.cart-line-qty .checkout-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid #f5b759;
}
.cart-line-qty .checkout-qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #f1f1f1;
  color: #000;
  font-size: 20px;
  cursor: pointer;
}
.cart-line-qty .checkout-qty-input {
  width: 56px;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: 18px;
}
.cart-line-qty .checkout-qty-suffix {
  display: none;
}
.cart-line-qty .checkout-qty-label {
  display: none;
}

/* Кнопка корзины в шапке — иконка с бейджем количества и сумма, как в easydonate */
.topbar-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #000;
  font-family: "Golos Text", sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.topbar-cart-ico {
  position: relative;
  display: inline-flex;
}
.topbar-cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f5b759;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
html.theme-dark .topbar-cart {
  color: #fff;
}

/* Вход / личный кабинет в шапке */
.topbar-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-family: "Golos Text", sans-serif;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 180px;
}
.topbar-login:hover {
  background: rgba(127, 127, 127, 0.12);
}
.topbar-login-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-login {
  color: #4a5366;
  font-weight: 500;
  gap: 7px;
  padding: 0 12px;
}
.topbar-login-ico {
  display: inline-flex;
  color: #4a5366;
}
.topbar-login:hover {
  color: #111;
}
html.theme-dark .topbar-login,
html.theme-dark .topbar-login-ico {
  color: #c5cbd8;
}
html.theme-dark .topbar-login:hover {
  color: #fff;
}
@media (max-width: 720px) {
  .topbar-login { padding: 0 6px; max-width: none; }
  .topbar-login-text { display: none; }
}
.gg-skin3d-canvas {
  display: block;
}

/* Корзина: горизонтальная карточка товара как в easydonate — картинка, название, цена справа, количество справа */
.cart-lines {
  gap: 12px;
}
.cart-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  background: #f3f3f5;
  border: 0;
  border-radius: 24px;
}
html.theme-dark .cart-line {
  background: var(--surface-2);
}
.cart-line-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 260px;
  min-width: 0;
  flex-wrap: wrap;
}
.cart-line-main > img {
  float: none !important;
  width: 88px !important;
  height: 88px !important;
  margin: 0 !important;
  border-radius: 20px;
  object-fit: cover;
  flex: 0 0 88px;
}
.cart-line-main .checkout-product-body {
  flex: 1 1 140px;
  min-width: 0;
  overflow: visible;
}
.cart-line-main .checkout-product-title {
  font-family: "Golos Text", sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
  margin: 0;
  line-height: 1.25;
}
html.theme-dark .cart-line-main .checkout-product-title {
  color: #fff;
}
.cart-line-main .checkout-product-price {
  margin: 0 0 0 auto !important;
  font-family: "Golos Text", sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #000;
  text-align: right;
  white-space: nowrap;
}
html.theme-dark .cart-line-main .checkout-product-price {
  color: #fff;
}
.cart-line-main .checkout-product-desc,
.cart-line-main .checkout-term {
  display: none;
}
.cart-line-side {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.cart-line-remove {
  width: 48px;
  height: 48px;
}
.cart-line-qty .checkout-qty-stepper {
  padding: 5px;
  background: #fff;
  border: 1px solid #f5b759;
  border-radius: 999px;
  gap: 6px;
}
html.theme-dark .cart-line-qty .checkout-qty-stepper {
  background: var(--surface);
}
.cart-line-qty .checkout-qty-btn {
  width: 42px;
  height: 42px;
  background: #f1f1f4;
  font-size: 22px;
  font-weight: 500;
}
.cart-line-qty .checkout-qty-input {
  width: 44px;
  font-size: 20px;
  font-weight: 600;
  color: #000;
}
html.theme-dark .cart-line-qty .checkout-qty-input {
  color: #fff;
}
.cart-line-main .cbb {
  flex: 1 1 100%;
}
@media (max-width: 480px) {
  .cart-line-main > img {
    width: 72px !important;
    height: 72px !important;
    flex-basis: 72px;
  }
  .cart-line-main .checkout-product-price {
    font-size: 20px;
  }
  .cart-line-side {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Корзина — боковая панель справа на всю высоту, 775 px, скругление слева, как на easydonate (на телефоне — шторка снизу) */
@media (min-width: 769px) {
  #cart-drawer.checkout-modal {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(775px, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 55px 0 0 55px;
    background: #fefefe;
    box-shadow: 0 8px 16px 0 rgba(17, 17, 17, 0.5);
    transform: translateX(105%);
  }
  #cart-drawer.checkout-modal.open {
    transform: translateX(0) !important;
  }
  html.theme-dark #cart-drawer.checkout-modal {
    background: var(--surface);
  }
}

/* Шрифт корзины и оформления — Golos Text, как на easydonate (везде, включая поля и кнопки) */
#cart-drawer,
#cart-drawer *,
#cart-drawer input,
#cart-drawer button,
#cart-drawer select,
#cart-drawer textarea {
  font-family: "Golos Text", sans-serif !important;
}

/* Шрифт всех окон оформления (включая заголовки шагов и подписи полей) — Golos Text */
.checkout-modal,
.checkout-modal *,
.checkout-pane,
.checkout-pane *,
.checkout-modal-head,
.checkout-modal-head * {
  font-family: "Golos Text", sans-serif !important;
}

/* Корзина: заголовок и список без лишней рамки и фона, как на easydonate */
#checkout-pane-order .checkout-product-card {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
#checkout-pane-order .cart-lines {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Корзина на всю высоту: кнопка «К оформлению» прижата к низу панели, пустого места нет */
@media (min-width: 769px) {
  #cart-drawer .checkout-modal-inner {
    display: flex;
    flex-direction: column;
  }
  #cart-drawer .checkout-modal-inner > .checkout-pane:not([hidden]) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100%;
  }
  #cart-drawer #checkout-pane-order .checkout-order-foot {
    margin-top: auto;
    padding-top: 16px;
  }
}

/* Поля данных — как на easydonate: серая панель, поля со скруглением, подпись сверху внутри поля */
#cart-drawer #checkout-pane-order .checkout-form-title {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0 0 12px;
}
#cart-drawer .checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding: 10px 20px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 24px;
  background: #fff;
  margin-bottom: 12px;
}
#cart-drawer .checkout-field[data-label]::before {
  content: attr(data-label);
  font-size: 13px;
  color: #666;
  line-height: 1.2;
}
#cart-drawer .checkout-field--icon {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
}
#cart-drawer .checkout-field--icon::before {
  flex: 0 0 100%;
  order: 0;
}
#cart-drawer .checkout-field .checkout-input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  height: auto;
  font-size: 18px;
  color: #000;
  width: 100%;
  outline: none;
}
#cart-drawer .checkout-field .checkout-input::placeholder {
  color: #9aa0ab;
}
#cart-drawer .checkout-field:focus-within {
  border-color: #f5b759;
}

/* Серая панель «Введите данные» — как на easydonate */
#cart-drawer .checkout-form-panel {
  background: #f5f5f5;
  border-radius: 36px;
  padding: 24px 22px 18px;
  margin: 8px 0 14px;
}
html.theme-dark #cart-drawer .checkout-form-panel {
  background: #22252e;
}
#cart-drawer .checkout-form-panel .checkout-form-title {
  margin-bottom: 16px;
}

/* Никнейм: аватар стоит рядом с полем, а не поверх текста */
#cart-drawer .checkout-field--icon .checkout-player-avatar {
  position: static !important;
  transform: none !important;
  flex: 0 0 auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
}
#cart-drawer .checkout-field--icon .checkout-input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

/* Корзина помещается без прокрутки на невысоких экранах: всё компактнее по высоте */
@media (min-width: 769px) and (max-height: 960px) {
  #cart-drawer .cart-title {
    font-size: 22px;
    margin: 0 0 2px;
  }
  #cart-drawer .cart-lines {
    gap: 8px;
  }
  #cart-drawer .cart-line {
    padding: 10px;
    border-radius: 20px;
  }
  #cart-drawer .cart-line-main > img,
  #cart-drawer .cart-line-main > img {
    width: 66px !important;
    height: 66px !important;
    flex-basis: 66px !important;
    border-radius: 16px;
  }
  #cart-drawer .cart-line-main .checkout-product-title {
    font-size: 15px;
  }
  #cart-drawer .cart-line-main .checkout-product-price {
    font-size: 19px;
  }
  #cart-drawer .cart-line-remove {
    width: 40px;
    height: 40px;
  }
  #cart-drawer .cart-line-qty .checkout-qty-btn {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  #cart-drawer .cart-line-qty .checkout-qty-input {
    font-size: 16px;
  }
  #cart-drawer .checkout-form-panel {
    padding: 14px 16px 10px;
    margin: 4px 0 8px;
    border-radius: 28px;
  }
  #cart-drawer .checkout-form-panel .checkout-form-title {
    margin-bottom: 10px;
    font-size: 15px;
  }
  #cart-drawer .checkout-field {
    padding: 6px 16px 8px;
    margin-bottom: 8px;
  }
  #cart-drawer .checkout-field .checkout-input {
    font-size: 16px;
  }
  #cart-drawer .field-hint,
  #cart-drawer .checkout-legal {
    font-size: 12px;
    line-height: 1.35;
    margin: 4px 0;
  }
  #cart-drawer .btn-checkout-pay {
    height: 48px;
    min-height: 48px;
  }
}

/* Корзина без прокрутки на узких и низких экранах: умеренное сжатие, текст остаётся читаемым */
@media (max-width: 768px) and (max-height: 860px) {
  #cart-drawer .cart-line-main > img {
    width: 60px !important; height: 60px !important; flex-basis: 60px !important;
  }
  #cart-drawer .checkout-form-panel { padding: 12px 14px 8px; margin: 4px 0 8px; }
  #cart-drawer .checkout-field { padding: 4px 16px 6px; margin-bottom: 6px; }
}

/* Карточка товара в корзине: картинка слева, название и цена колонкой, удаление справа */
#cart-drawer .cart-line {
  flex-wrap: nowrap;
  align-items: center;
}
#cart-drawer .cart-line-main {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
}
#cart-drawer .cart-line-main .checkout-product-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
#cart-drawer .cart-line-main .checkout-product-price {
  margin: 0 !important;
  text-align: left;
  font-size: 20px;
}
#cart-drawer .cart-line-remove {
  flex: 0 0 auto;
}

/* Иконки способов оплаты без рамки и фона */
.pay-ico {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Логотипы способов оплаты (МИР, Visa, Mastercard, СБП) из архива */
.pay-logos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pay-ico img {
  display: block;
  width: auto;
}

/* Пустая корзина: только текст «Корзина пуста», без полей и кнопок */
#cart-drawer #checkout-pane-order:has(#checkout-empty:not([hidden])) .checkout-form-panel,
#cart-drawer #checkout-pane-order:has(#checkout-empty:not([hidden])) .checkout-form-title,
#cart-drawer #checkout-pane-order:has(#checkout-empty:not([hidden])) .checkout-legal,
#cart-drawer #checkout-pane-order:has(#checkout-empty:not([hidden])) .checkout-order-foot,
#cart-drawer #checkout-pane-order:has(#checkout-empty:not([hidden])) .checkout-product-card {
  display: none !important;
}

/* Тёмная тема: иконка сервера тёмная, карточки и цены читаются */
html.theme-dark .sel-btn::before,
html.theme-dark .sel-item::before {
  filter: invert(1) hue-rotate(180deg);
}
html.theme-dark .card-product {
  background: transparent;
}
html.theme-dark .card-product:hover {
  background: var(--surface);
  box-shadow: 0 4px 45px 0 rgba(0, 0, 0, 0.5);
}
html.theme-dark .card-product .card-title {
  color: rgba(255, 255, 255, 0.75);
}
html.theme-dark .card-product .card-price-block .card-price,
html.theme-dark .card-product .card-price-block p {
  color: #fff;
}
html.theme-dark .card-product .card-img-wrap {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Тёмная тема: выбранный сервер в списке — тёмный фон и светлый текст (раньше текст был белым на белом) */
html.theme-dark .sel-item.is-active {
  background: rgba(243, 149, 19, 0.1);
  border-color: #f5b759;
  color: #fff;
}
html.theme-dark .sel-item {
  background: transparent;
  color: #fff;
}
html.theme-dark .sel-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Тёмная тема: иконка сервера у заголовка выбора — видна на тёмном фоне */
html.theme-dark .sel-btn::before {
  filter: invert(0.88);
}

/* Тёмная тема: убираем белую рамку у списка серверов */
html.theme-dark .sel-list {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Корзина и оформление в тёмной теме: заголовки, поля и подписи читаются */
html.theme-dark #cart-drawer .checkout-form-title {
  color: #f2f2f7;
}
html.theme-dark #cart-drawer .checkout-field {
  background: #17191f;
  border-color: rgba(255, 255, 255, 0.14);
}
html.theme-dark #cart-drawer .checkout-field[data-label]::before {
  color: #9aa0ab;
}
html.theme-dark #cart-drawer .checkout-field .checkout-input {
  color: #f2f2f7;
}
html.theme-dark #cart-drawer .checkout-field .checkout-input::placeholder {
  color: #6b7080;
}
html.theme-dark #cart-drawer .checkout-field:focus-within {
  border-color: #f5b759;
}
html.theme-dark #cart-drawer .checkout-form-panel {
  background: #1e2129;
}
html.theme-dark #cart-drawer .cart-line {
  background: #1e2129;
}
html.theme-dark #cart-drawer .cart-line-qty .checkout-qty-stepper {
  background: #17191f;
}
html.theme-dark #cart-drawer .cart-line-qty .checkout-qty-btn {
  background: #2a2d36;
  color: #f2f2f7;
}
html.theme-dark #cart-drawer .cart-line-qty .checkout-qty-input {
  color: #f2f2f7;
}
html.theme-dark #cart-drawer .cart-line-main .checkout-product-title,
html.theme-dark #cart-drawer .cart-line-main .checkout-product-price {
  color: #f2f2f7;
}
html.theme-dark #cart-drawer .cart-title {
  color: #f2f2f7;
}

/* Тёмная тема: заголовок «Введите данные» светлый (перебиваем светлый текст из светлой темы) */
html.theme-dark #cart-drawer #checkout-pane-order .checkout-form-title,
html.theme-dark #cart-drawer .checkout-form-panel .checkout-form-title {
  color: #f2f2f7 !important;
}

/* Кнопка «Назад» — круглая иконка-стрелка, как в корзине easydonate (раньше была широкая кнопка с текстом) */
#checkout-back-order.checkout-back {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-color-default, #e0e0e6);
  background: transparent;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
}
#checkout-back-order.checkout-back:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}
html.theme-dark #checkout-back-order.checkout-back {
  color: #f2f2f7;
  border-color: rgba(255, 255, 255, 0.2);
}
html.theme-dark #checkout-back-order.checkout-back:hover {
  background: #f2f2f7;
  color: #111;
}

/* Назад — в строке заголовка оплаты, слева от «Выберите способ оплаты» (как в easydonate) */
.checkout-pay-head {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.checkout-pay-head .checkout-pay-lead {
  margin: 0;
}
.checkout-pay-head .checkout-back {
  margin: 0;
}

/* Адаптив: строка «Назад + Выберите способ оплаты» компактнее на телефоне */
@media (max-width: 768px) {
  .checkout-pay-head {
    gap: 14px;
    margin-bottom: 16px;
  }
  .checkout-pay-head .checkout-back {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .checkout-pay-head .checkout-back svg {
    width: 20px;
    height: 20px;
  }
  .checkout-pay-head .checkout-pay-lead {
    font-size: 16px;
  }
}

/* ПК: кнопка закрытия корзины полностью видна, не уезжает за правый край */
@media (min-width: 769px) {
  #cart-drawer .checkout-modal-head {
    padding-left: 32px !important;
    padding-right: 24px !important;
    box-sizing: border-box;
    width: 100%;
  }
  #cart-drawer #cart-close {
    position: static !important;
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* ПК: кнопка закрытия в той же строке, что и шаги (справа), не переносится на новую строку */
@media (min-width: 769px) {
  #cart-drawer .checkout-modal-head {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    min-height: 72px;
  }
  #cart-drawer #cart-close {
    position: absolute !important;
    top: 50% !important;
    right: 24px !important;
    transform: translateY(-50%);
    margin: 0 !important;
  }
}

/* Оплата: заголовок как у easydonate («Оформление»: 27px, обычный вес), кнопка «назад» и заголовок выровнены по центру */
#cart-drawer .checkout-pay-head {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  margin: 0 0 24px !important;
  min-height: 48px;
}
#cart-drawer .checkout-pay-head .checkout-pay-lead {
  font-family: "Golos Text", sans-serif !important;
  font-size: 27.41px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  color: #000;
  margin: 0 !important;
  padding: 0 !important;
}
html.theme-dark #cart-drawer .checkout-pay-head .checkout-pay-lead {
  color: #f2f2f7;
}
#cart-drawer #checkout-back-order.checkout-back {
  flex: 0 0 48px;
  margin: 0 !important;
}

/* Бонус рилликов в подарок на странице товара */
.product-bonus-note {
  margin: 4px 0 16px;
  font-size: 15px;
  color: #1e7c40;
}
.product-bonus-note strong {
  font-weight: 700;
}
html.theme-dark .product-bonus-note {
  color: #5fd08a;
}

/* Бонус в подарок: иконка валюты ровно по центру строки с текстом */
.product-bonus-note {
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-bonus-note strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product-bonus-note .riliki-ico {
  width: 20px;
  height: 14px;
  vertical-align: middle;
  margin: 0;
}

/* Карточка «Хочешь стать медиа партнёром?» — персонажи справа снизу */
.ct-card--partner {
  position: relative;
  overflow: hidden;
}
.ct-card-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}
.ct-card--partner > *:not(.ct-card-art) {
  position: relative;
  z-index: 1;
}

/* Карточка медиа партнёров: стрелка на своём месте (внизу слева), текст не перекрывается картинкой */
.ct-card--partner .ct-btn {
  position: absolute !important;
  left: 22px;
  bottom: 22px;
  z-index: 2;
}
.ct-card--partner .ct-card-body {
  position: relative;
  z-index: 1;
  max-width: 58%;
}
.ct-card-art {
  width: 46% !important;
  right: 6px !important;
  bottom: 6px !important;
}

/* Картинка медиа партнёров ниже, чтобы персонажи стояли на нижнем краю карточки */
.ct-card-art {
  bottom: -14px !important;
  right: 4px !important;
}

/* Картинка медиа партнёров поднята выше */
.ct-card-art {
  bottom: 26px !important;
  right: 8px !important;
}

/* Картинка медиа партнёров — чуть ниже, между прежним и поднятым положением */
.ct-card-art {
  bottom: 12px !important;
  right: 8px !important;
}

/* Картинка медиа партнёров — ещё немного ниже, до нижнего края карточки */
.ct-card-art {
  bottom: 0 !important;
  right: 8px !important;
}

/* Кнопка «Купить» на странице товара — обычная, как на «Все или ничего»: плоская оранжевая, без градиента и свечения */
#product-quick-buy.btn-primary {
  background: #f39513 !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
}
#product-quick-buy.btn-primary:hover,
#product-quick-buy.btn-primary:focus-visible {
  background: #eb8a02 !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Кнопка «Купить» 1 в 1 как на обычной странице товара: DM Sans 16px, вес 600, те же отступы и высота */
#product-quick-buy.btn-primary {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 24.8px !important;
  padding: 14px 26px !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  min-height: 52.8px;
}

/* Докупки прав: заметная плашка «Нужна привилегия CUSTOM» над кнопкой */
.product-req-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 16px;
  padding: 10px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(243, 149, 19, 0.16), rgba(243, 149, 19, 0.06));
  border: 1px solid rgba(243, 149, 19, 0.45);
  color: #7a4a06;
  font-size: 15px;
  line-height: 1.3;
}
.product-req-note strong {
  color: #f39513;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.product-req-ico {
  font-size: 16px;
  line-height: 1;
}
html.theme-dark .product-req-note {
  color: #f2d3a0;
}

/* ===== Шапка 1 в 1 как на easydonate: стеклянная пилюля, пункты с подчёркиванием при наведении ===== */
.topbar {
  margin: 15px auto 0;
  width: min(1180px, calc(100% - 30px));
}
.topbar-inner {
  border-radius: 35px;
  border: 1px solid var(--border-color-default, #e6e6ea);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 17px;
  box-shadow: none;
  transition: 0.2s ease all;
}
html.theme-dark .topbar-inner {
  background: rgba(22, 24, 30, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}
@media (min-width: 576px) {
  .topbar {
    margin-top: 24px;
    width: min(1180px, calc(100% - 48px));
  }
  .topbar-inner {
    border-radius: 55px;
    padding: 20px 24px;
  }
}
.topbar-nav,
#topbar-nav {
  gap: 36px;
}
.topbar-nav a,
#topbar-nav a {
  position: relative;
  font-size: 16px;
  color: #565673;
  text-decoration: none;
  transition: 0.2s ease opacity;
}
.topbar-nav a::after,
#topbar-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: #f39513;
  opacity: 0;
  transition: 0.2s ease opacity;
}
.topbar-nav a:hover::after,
#topbar-nav a:hover::after,
.topbar-nav a.active::after {
  opacity: 1;
}
.topbar-nav a:active,
#topbar-nav a:active {
  opacity: 0.6;
}
html.theme-dark .topbar-nav a,
html.theme-dark #topbar-nav a {
  color: #c9ccd6;
}

/* ===== Шапка 1 в 1 с easydonate: размеры, отступы и логика (соцсети убраны из шапки, как у них) ===== */
.topbar-inner {
  min-height: 99px;
  padding: 20px 16px;
  gap: 0;
  border-radius: 55px;
  background: #fff;
  border: 0.8px solid #e8e8e8;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html.theme-dark .topbar-inner {
  background: #16181e;
  border-color: rgba(255, 255, 255, 0.08);
}
.topbar-actions .topbar-social {
  display: inline-flex;
  gap: 8px;
  margin-right: 8px;
}
.topbar-nav .nav-ext svg,
.nav-links .nav-ext svg {
  margin-left: 6px;
  vertical-align: middle;
  display: inline-block;
}
.nav-links a {
  color: #000;
  font-size: 16px;
  font-weight: 400;
}
.topbar-cart-sum {
  margin-left: 8px;
  color: #000;
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
}
.topbar-inner > .topbar-brand,
.topbar-inner > .brand {
  margin-right: 72px;
}
.topbar-actions {
  gap: 6px;
  margin-left: auto;
}
.topbar-cart {
  height: 57px;
  padding: 15px 20px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 400;
  gap: 8px;
  background: transparent;
}
.topbar-cart-badge {
  top: -6px;
  right: -10px;
  min-width: 0;
  height: 18px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f5b759;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
}
.icon-btn--theme {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
}
.icon-btn--theme svg {
  width: 24px;
  height: 24px;
}

/* Шапка в одну строку: пункты не переносятся, соцсети и корзина на месте */
.topbar-inner {
  flex-wrap: nowrap !important;
  align-items: center;
}
.topbar-inner .brand {
  flex: 0 0 auto;
  white-space: nowrap;
}
.topbar-inner .nav-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 36px;
  white-space: nowrap;
  min-width: 0;
}
.topbar-inner .nav-links a {
  white-space: nowrap;
  font-size: 16px;
}
.topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .topbar-inner .nav-links {
    gap: 20px;
  }
  .topbar-inner .nav-links a {
    font-size: 15px;
  }
  .topbar-actions .topbar-social {
    display: none !important;
  }
}

/* Логотип и меню рядом, как на easydonate: между логотипом и первым пунктом 72px, справа — соцсети, тема и корзина */
.topbar-inner > .brand,
.topbar-inner > .brand.brand {
  margin-right: 0 !important;
}
.topbar-inner .nav-links {
  margin-left: 72px;
  flex: 0 1 auto;
}
.topbar-actions {
  margin-left: auto;
}

/* Размеры шапки как на easydonate: логотип 41px, пункты меню 24px по высоте, соцсети видны */
.topbar-inner .brand-ico {
  width: 41px;
  height: 41px;
  flex: 0 0 41px;
}
.topbar-inner .brand-ico img,
.topbar-inner .brand-ico svg {
  width: 41px;
  height: 41px;
}
.topbar-inner .brand-name {
  font-size: 16px;
}
.topbar-inner .nav-links a {
  display: inline-flex;
  align-items: center;
  height: 24px;
  line-height: 24px;
  padding: 0;
}
@media (max-width: 1100px) {
  .topbar-actions .topbar-social {
    display: inline-flex !important;
  }
}

/* Шрифт шапки — Golos Text, как на easydonate (логотип, меню, корзина, кнопки) */
.topbar,
.topbar *,
.topbar-inner,
.topbar-inner *,
.nav-links a,
.topbar-cart,
.topbar-cart-sum,
.topbar-cart-badge,
.brand-name {
  font-family: "Golos Text", sans-serif !important;
}
.nav-links a {
  font-weight: 400 !important;
  color: #000;
}
.brand-name {
  font-weight: 500 !important;
}

/* Соцсети: вместо «Альтернативный сайт» — кнопка «Соц сети», по клику выпадает список. Иконки в шапке скрыты */
.topbar-actions .topbar-social {
  display: none !important;
}
.nav-social {
  position: relative;
  display: inline-flex;
}
.nav-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-family: "Golos Text", sans-serif;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s ease opacity;
}
.nav-social-btn:hover {
  opacity: 0.75;
}
.nav-social-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  min-width: 200px;
  padding: 8px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e8e8e8;
  box-shadow: 0 16px 40px rgba(18, 25, 44, 0.12);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-social-menu[hidden] {
  display: none;
}
.nav-social-menu a {
  padding: 10px 14px;
  border-radius: 16px;
  font-family: "Golos Text", sans-serif;
  font-size: 15px;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.nav-social-menu a:hover {
  background: rgba(243, 149, 19, 0.1);
}
html.theme-dark .nav-social-btn,
html.theme-dark .nav-social-menu a {
  color: #f2f2f7;
}
html.theme-dark .nav-social-menu {
  background: #1b1d24;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Список соцсетей: свои отступы и значки цветом сети (не наследуем высоту пунктов меню) */
.topbar-inner .nav-social-menu a {
  height: auto;
  line-height: 1.3;
  padding: 11px 16px 11px 34px !important;
  display: flex;
  align-items: center;
  position: relative;
  font-size: 15px;
  font-weight: 400;
  border-radius: 16px;
}
.topbar-inner .nav-social-menu a::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #999;
}
.topbar-inner .nav-social-menu a[data-net="vk"]::before { background: #0077ff; }
.topbar-inner .nav-social-menu a[data-net="tg"]::before { background: #2aabee; }
.topbar-inner .nav-social-menu a[data-net="ds"]::before { background: #5865f2; }
.topbar-inner .nav-social-menu {
  min-width: 220px;
  top: calc(100% + 14px);
  padding: 8px;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(18, 25, 44, 0.14);
}

/* Шапка в тёмной теме: пункты меню, корзина и сумма светлые (раньше были чёрными на тёмном фоне) */
html.theme-dark .topbar-inner .nav-links a,
html.theme-dark .nav-links a {
  color: #d9dbe3 !important;
}
html.theme-dark .topbar-inner .brand-name {
  color: #f2f2f7;
}
html.theme-dark .topbar-cart,
html.theme-dark .topbar-cart-sum {
  color: #f2f2f7 !important;
}
html.theme-dark .nav-social-btn {
  color: #f2f2f7 !important;
}
html.theme-dark .icon-btn--theme {
  color: #f2f2f7;
}

/* Логотип в шапке как на easydonate: иконка 41px, название 18px/500, отступ 12px */
.topbar-inner .brand {
  gap: 12px;
  display: inline-flex;
  align-items: center;
}
.topbar-inner .brand-name {
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: normal;
}
.topbar-inner .nav-links {
  margin-left: 72px;
}

/* Подгонка под easydonate (1024px): меню начинается на 223px, корзина компактнее */
.topbar-inner .nav-links {
  margin-left: 42px;
}
.topbar-cart {
  padding: 15px 14px;
  gap: 6px;
}

/* Соцсети: настоящие логотипы вместо точек; при наведении — пункт подсвечивается */
.topbar-inner .nav-social-menu a::before {
  display: none;
}
.topbar-inner .nav-social-menu a {
  padding-left: 14px !important;
}
.nav-social-ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  flex: 0 0 22px;
}
.nav-social-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Меню: подчёркивание при наведении, как на easydonate */
.topbar-inner .nav-links a {
  position: relative;
}
.topbar-inner .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: #f5b759;
  opacity: 0;
  transition: 0.2s ease opacity;
}
.topbar-inner .nav-links a:hover::after,
.topbar-inner .nav-links a:focus-visible::after {
  opacity: 1;
}

/* Меню: при наведении без фоновой подкраски текста, только подчёркивание */
.topbar-inner .nav-links a:hover,
.topbar-inner .nav-links a:focus,
.topbar-inner .nav-links a:focus-visible,
.topbar-inner .nav-links a:active {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: inherit;
}

/* Иконки соцсетей: принудительный размер (чтобы не схлопывались) */
.topbar-inner .nav-social-menu .nav-social-ico {
  display: inline-flex !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  margin-right: 12px !important;
}
.topbar-inner .nav-social-menu .nav-social-ico svg {
  display: block !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  fill: none;
}

/* Меню: текст при наведении остаётся чёрным (не серым) */
.topbar-inner .nav-links a:hover,
.topbar-inner .nav-links a:focus,
.topbar-inner .nav-links a:focus-visible,
.topbar-inner .nav-links a:active {
  color: #000 !important;
}
html.theme-dark .topbar-inner .nav-links a:hover,
html.theme-dark .topbar-inner .nav-links a:focus,
html.theme-dark .topbar-inner .nav-links a:focus-visible,
html.theme-dark .topbar-inner .nav-links a:active {
  color: #fff !important;
}

/* Список «Соц сети»: крупнее и аккуратнее — как у easydonate */
.topbar-inner .nav-social-menu {
  min-width: 240px;
  padding: 12px;
  border-radius: 30px;
  gap: 4px;
  top: calc(100% + 14px);
}
.topbar-inner .nav-social-menu a {
  padding: 13px 18px 13px 16px !important;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  gap: 0;
}
.topbar-inner .nav-social-menu .nav-social-ico {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  margin-right: 14px !important;
}
.topbar-inner .nav-social-menu .nav-social-ico svg {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
}
.topbar-inner .nav-social-menu a:hover {
  background: #fff4e6 !important;
}

/* Шапка чуть компактнее: меньше высота и шрифт меню */
.topbar-inner {
  min-height: 84px;
  padding: 16px 16px;
}
.topbar-inner .nav-links a,
.nav-social-btn {
  font-size: 15px !important;
}
.topbar-inner .brand-name {
  font-size: 17px !important;
}
.topbar-inner .brand-ico {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.topbar-cart {
  height: 50px;
  padding: 12px 12px;
}
.topbar-cart-sum {
  font-size: 17px !important;
}

/* Окно соцсетей: аккуратная карточка, иконки 24px в цвете сети */
.topbar-inner .nav-social-menu {
  min-width: 230px;
  padding: 10px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #ececf2;
  box-shadow: 0 14px 36px rgba(18, 25, 44, 0.12);
  gap: 2px;
}
.topbar-inner .nav-social-menu a {
  padding: 12px 16px !important;
  border-radius: 16px;
  font-size: 16px;
  color: #000;
}
.topbar-inner .nav-social-menu .nav-social-ico {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  margin-right: 12px !important;
}
.topbar-inner .nav-social-menu .nav-social-ico svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  fill: none;
}

/* Иконки соцсетей: видны (фирменный цвет задаём явно), подчёркивание меню в списке не нужно */
.topbar-inner .nav-social-menu .nav-social-ico svg {
  fill: inherit !important;
}
.topbar-inner .nav-social-menu a[data-net="vk"] .nav-social-ico svg { fill: #0077ff !important; }
.topbar-inner .nav-social-menu a[data-net="tg"] .nav-social-ico svg { fill: #2aabee !important; }
.topbar-inner .nav-social-menu a[data-net="ds"] .nav-social-ico svg { fill: #5865f2 !important; }
.topbar-inner .nav-social-menu a::after {
  display: none !important;
}

/* Соц сети: красивое окно — иконка, название и число подписчиков справа */
.topbar-inner .nav-social-menu {
  min-width: 260px;
  padding: 10px;
  border-radius: 26px;
}
.topbar-inner .nav-social-menu a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px !important;
  border-radius: 18px;
  font-size: 16px;
  color: #000;
}
.topbar-inner .nav-social-menu a .nav-social-ico {
  margin-right: 0 !important;
  margin-left: 0;
}
.topbar-inner .nav-social-menu a > span:not(.nav-social-ico):first-of-type {
  flex: 1 1 auto;
}
.nav-social-count {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f1f5;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.topbar-inner .nav-social-menu a:hover .nav-social-count {
  background: #fff;
}
html.theme-dark .nav-social-count {
  background: rgba(255, 255, 255, 0.08);
  color: #c9ccd6;
}

/* Соц сети: иконка, название и число подписчиков идут подряд слева, без больших пропусков */
.topbar-inner .nav-social-menu a {
  justify-content: flex-start !important;
  gap: 12px;
}
.topbar-inner .nav-social-menu a > span:not(.nav-social-ico):first-of-type {
  flex: 0 0 auto !important;
}
.nav-social-count {
  margin-left: 6px;
}

/* Соц сети в тёмной теме: при наведении тёмный фон и светлый текст (раньше светлый фон с белым текстом) */
html.theme-dark .topbar-inner .nav-social-menu a:hover {
  background: rgba(243, 149, 19, 0.14) !important;
  color: #f2f2f7 !important;
}
html.theme-dark .topbar-inner .nav-social-menu a:hover .nav-social-count {
  background: rgba(255, 255, 255, 0.12);
  color: #f2f2f7;
}
html.theme-dark .topbar-inner .nav-social-menu a {
  color: #f2f2f7;
}

/* Мобильная шапка: пункты меню открываются кнопкой-бургером в карточке под шапкой */
@media (max-width: 1199px) {
  .topbar-inner .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #000;
    cursor: pointer;
    flex: 0 0 40px;
    margin-right: 6px;
  }
  html.theme-dark .topbar-inner .nav-toggle {
    background: #1b1d24;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f2f2f7;
  }
  .topbar-inner .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border: 1px solid #ececf2;
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(18, 25, 44, 0.14);
    z-index: 60;
  }
  html.theme-dark .topbar-inner .nav-links {
    background: #16181e;
    border-color: rgba(255, 255, 255, 0.08);
  }
  .topbar-inner.nav-open .nav-links {
    display: flex;
  }
  .topbar-inner .nav-links a {
    display: flex;
    align-items: center;
    height: auto;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.3;
    white-space: normal;
  }
  .topbar-inner .nav-links a::after {
    display: none !important;
  }
  .topbar-inner .nav-links a:hover {
    background: rgba(243, 149, 19, 0.08);
  }
  .topbar-inner .nav-social-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0;
    min-width: 0;
    background: transparent;
  }
  .topbar-inner .nav-social-btn {
    padding: 14px 16px;
    height: auto;
    font-size: 16px;
  }
  .topbar-inner .brand-name {
    display: none;
  }
  .topbar-inner {
    position: relative;
    padding: 12px 14px;
    min-height: 0;
  }
}

/* Мобильное меню как на easydonate: бургер без рамки (слева от логотипа), карточка 35px с пунктами */
@media (max-width: 1199px) {
  .topbar-inner {
    padding: 14px 18px;
    border-radius: 35px;
    gap: 12px;
  }
  .topbar-inner .brand {
    order: 1;
  }
  .topbar-inner .nav-toggle {
    order: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0;
    color: #000;
    flex: 0 0 40px;
  }
  html.theme-dark .topbar-inner .nav-toggle {
    color: #f2f2f7;
  }
  .topbar-inner .nav-toggle .ico-close { display: none; }
  .topbar-inner.nav-open .nav-toggle .ico-burger { display: none; }
  .topbar-inner.nav-open .nav-toggle .ico-close { display: block; }
  .topbar-inner .nav-links {
    top: calc(100% + 15px);
    left: -1px;
    right: -1px;
    padding: 30px;
    border-radius: 35px;
    gap: 36px;
    border: 1px solid #e8e8e8;
    background: #fff;
    box-shadow: none;
  }
  .topbar-inner .nav-links a {
    padding: 0 !important;
    border-radius: 0;
    font-size: 16px;
    height: auto;
    background: transparent !important;
    justify-content: flex-start;
  }
  .topbar-inner .nav-links a:hover {
    opacity: .75;
  }
  .topbar-inner .nav-social-btn {
    padding: 0;
  }
  .topbar-inner .nav-social-menu {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
  }
  .topbar-inner .nav-social-menu a {
    display: flex !important;
    padding: 0 !important;
    gap: 10px;
  }
  .topbar-inner .nav-social-menu .nav-social-count {
    display: none;
  }
}

/* Мобильная шапка: бургер — логотип слева, справа тема и корзина */
@media (max-width: 1199px) {
  .topbar-inner .topbar-actions {
    order: 2;
    margin-left: auto;
  }
  .topbar-inner .brand {
    order: 1;
    margin-right: 0;
  }
}

/* Мобильное меню: все пункты в одну колонку по левому краю, одинаковый цвет и размер, соцсети списком ниже */
@media (max-width: 1199px) {
  .topbar-inner .nav-links {
    align-items: stretch;
  }
  .topbar-inner .nav-links a,
  .topbar-inner .nav-social-btn {
    color: #000 !important;
    font-size: 16px !important;
    font-weight: 400;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }
  html.theme-dark .topbar-inner .nav-links a,
  html.theme-dark .topbar-inner .nav-social-btn {
    color: #f2f2f7 !important;
  }
  .topbar-inner .nav-social {
    display: block;
    width: 100%;
    position: static;
  }
  .topbar-inner .nav-social-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    height: auto;
    padding: 0;
  }
  .topbar-inner .nav-social-menu {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 22px;
    padding: 0;
    padding-left: 0;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .topbar-inner .nav-social-menu a {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 0 !important;
    border-radius: 0;
    background: transparent !important;
  }
  .topbar-inner .nav-social-menu .nav-social-ico {
    margin-right: 0 !important;
  }
}

/* Кнопка «Соц сети»: без чёрной рамки после нажатия */
.nav-social-btn:focus,
.nav-social-btn:focus-visible,
.nav-social-btn:active {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Соц сети на телефоне открываются по нажатию: список скрыт, пока не открыт (атрибут hidden) */
.topbar-inner .nav-social-menu[hidden] {
  display: none !important;
}
.topbar-inner .nav-social-btn[aria-expanded="true"] {
  opacity: 0.8;
}

/* Пункт «Соц сети» того же цвета, что и остальные пункты меню */
.topbar-inner .nav-social-btn {
  color: #565673 !important;
}
.topbar-inner .nav-links a {
  color: #565673 !important;
}
html.theme-dark .topbar-inner .nav-social-btn,
html.theme-dark .topbar-inner .nav-links a {
  color: #d9dbe3 !important;
}

/* ===== Личный кабинет ===== */
.lk-page {
  padding: 40px 0 60px;
  max-width: 980px;
  margin: 0 auto;
}
.lk-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #ececf2;
  box-shadow: 0 14px 36px rgba(18, 25, 44, 0.08);
}
.lk-title {
  font-family: "Golos Text", sans-serif;
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #000;
}
.lk-subtitle {
  font-family: "Golos Text", sans-serif;
  font-size: 20px;
  font-weight: 500;
  margin: 28px 0 14px;
  color: #000;
}
.lk-lead {
  color: #6b6f80;
  margin: 0 0 20px;
  font-size: 15px;
}
.lk-error {
  padding: 10px 14px;
  border-radius: 14px;
  background: #fdecec;
  color: #b42318;
  font-size: 14px;
  margin: 0 0 14px;
}
.lk-note {
  font-size: 14px;
  color: #8a6d00;
  margin: 0 0 14px;
}
.lk-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #6b6f80;
}
.lk-field input {
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid #d6d8e0;
  font: inherit;
  font-size: 16px;
  color: #000;
  background: #fafafc;
}
.lk-field input:focus {
  outline: none;
  border-color: #f5b759;
}
.lk-btn {
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #f39513;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.lk-btn:hover {
  background: #eb8a02;
}
.lk-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lk-btn--ghost {
  background: transparent;
  color: #000;
  border: 1px solid #d6d8e0;
}
.lk-btn--ghost:hover {
  background: #f3f3f7;
}
.lk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.lk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.lk-stat {
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #ececf2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lk-stat span {
  font-size: 13px;
  color: #6b6f80;
}
.lk-stat strong {
  font-size: 20px;
  font-weight: 600;
  color: #000;
}
.lk-orders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lk-order {
  padding: 18px 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #ececf2;
}
.lk-order-head {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: #6b6f80;
}
.lk-order-sum {
  margin-left: auto;
  font-size: 17px;
  color: #000;
}
.lk-order-items {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 15px;
  color: #000;
}
.lk-order-items li {
  padding: 4px 0;
}
.lk-bonus {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(46, 170, 92, 0.14);
  color: #1e7c40;
  font-size: 12px;
  font-weight: 600;
}
.lk-qty {
  margin-left: 8px;
  color: #6b6f80;
  font-size: 13px;
}
@media (max-width: 760px) {
  .lk-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
html.theme-dark .lk-card,
html.theme-dark .lk-stat,
html.theme-dark .lk-order {
  background: #1b1d24;
  border-color: rgba(255, 255, 255, 0.08);
}
html.theme-dark .lk-title,
html.theme-dark .lk-subtitle,
html.theme-dark .lk-stat strong,
html.theme-dark .lk-order-items,
html.theme-dark .lk-order-sum {
  color: #f2f2f7;
}
html.theme-dark .lk-field input {
  background: #14161c;
  color: #f2f2f7;
  border-color: rgba(255, 255, 255, 0.12);
}
html.theme-dark .lk-btn--ghost {
  color: #f2f2f7;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Карточка товара: название и плашка бонуса на одной линии, мягкий объём */
.card-product .card-title.has-bonus {
  align-items: center;
  line-height: 1.2;
}
.card-product .card-title.has-bonus > .card-bonus {
  height: 24px;
  line-height: 1;
  margin: 0;
  align-self: center;
}
.card-product {
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 14px 30px rgba(0, 0, 0, 0.09);
}

/* Название и плашка бонуса: одна высота строки и центр по вертикали */
.card-product .card-title.has-bonus .card-name {
  display: inline-flex;
  align-items: center;
  height: 24px;
  line-height: 24px;
}
.card-product .card-title.has-bonus > .card-bonus {
  height: 24px;
  line-height: 24px;
  padding-top: 0;
  padding-bottom: 0;
}

/* Название и плашка бонуса: одна высота строки и центр по вертикали */
.card-product .card-title.has-bonus .card-name {
  display: inline-flex;
  align-items: center;
  height: 24px;
  line-height: 24px;
}
.card-product .card-title.has-bonus > .card-bonus {
  height: 24px;
  line-height: 24px;
  padding-top: 0;
  padding-bottom: 0;
}

/* Текст названия по центру плашки: компенсация метрик шрифта */
.card-product .card-title.has-bonus .card-name {
  position: relative;
  top: 1px;
}

/* Тонкая выверка: текст плашки чуть выше, название чуть ниже — центры совпадают */
.card-product .card-title.has-bonus .card-name {
  top: 1.5px;
}
.card-product .card-title.has-bonus > .card-bonus {
  padding-bottom: 2px;
}

/* Аватар в поле ника: один квадрат для скина и запасной картинки. */
.checkout-field .checkout-player-avatar {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.checkout-field .checkout-player-avatar > :is(img, canvas) {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.checkout-field .checkout-player-avatar > [hidden] {
  display: none;
}

.ct-card-count {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(13, 17, 36, 0.24);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.checkout-nick-dialog {
  box-sizing: border-box;
  width: min(430px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.checkout-nick-dialog::backdrop {
  background: rgba(12, 14, 24, 0.57);
  backdrop-filter: blur(3px);
}

.checkout-nick-dialog h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
}

.checkout-nick-dialog > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.checkout-nick-matches {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
}

.checkout-nick-matches p {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.checkout-nick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-nick-options button {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.checkout-nick-options button:hover,
.checkout-nick-options button:focus-visible {
  border-color: var(--accent);
}

.checkout-nick-dialog > .btn {
  margin-top: 20px;
}

@media (max-width: 480px) {
  .checkout-nick-dialog {
    padding: 20px;
  }
}

.topbar .nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

main.page.page--banlist {
  padding-top: 14px;
}

.banlist {
  padding-top: clamp(4px, 1vw, 14px);
  padding-bottom: 64px;
}

.banlist-intro {
  margin-bottom: 22px;
}

.banlist-intro h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.banlist-intro p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.banlist-toolbar, .banlist-filters {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.banlist-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
}

.banlist-tabs a {
  display: grid;
  min-width: 86px;
  min-height: 40px;
  place-items: center;
  padding: 0 14px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.banlist-tabs a[aria-current="page"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border), 0 2px 5px rgba(15, 23, 42, .08);
}

.banlist-filters {
  flex: 1;
}

.banlist-filters .input {
  min-height: 50px;
}

.banlist-search {
  position: relative;
  flex: 1;
  min-width: 0;
}

.banlist-search svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.banlist-search input {
  width: 100%;
  padding-left: 40px;
}

.banlist-meta,
.banlist-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.banlist-meta strong {
  color: var(--text);
}

.banlist-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1.12fr) minmax(140px, 1.7fr) minmax(100px, .8fr) minmax(117px, .8fr) minmax(86px, .55fr) 16px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.banlist-columns {
  padding-block: 4px 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.banlist-rows {
  display: grid;
  gap: 7px;
}

.banlist-row {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.banlist-row summary {
  min-height: 65px;
  border-radius: inherit;
  cursor: pointer;
  list-style: none;
}

.banlist-row summary::-webkit-details-marker {
  display: none;
}

.banlist-row summary:hover,
.banlist-row[open] summary {
  background: var(--surface-2);
}

.banlist-player {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.banlist-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--text);
  font-weight: 800;
  overflow: hidden;
}

.banlist-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.banlist-avatar--console {
  font-size: 0.75rem;
  font-family: monospace;
}

.banlist-moderator {
  display: flex;
  align-items: center;
  gap: 7px;
}

.banlist-moderator .banlist-avatar {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.banlist-player strong,
.banlist-player small {
  display: block;
  overflow-wrap: anywhere;
}

.banlist-player small,
.banlist-date,
.banlist-moderator {
  color: var(--muted);
  font-size: 0.82rem;
}

.banlist-reason, .banlist-moderator {
  overflow-wrap: anywhere;
}

.banlist-reason {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.banlist-status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
}

.banlist-status.is-closed {
  color: var(--muted);
  font-weight: 500;
}

.banlist-status.is-permanent {
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.banlist-period progress {
  display: block;
  width: 74px;
  height: 4px;
  margin-top: 5px;
  accent-color: var(--accent);
}

.banlist-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.banlist-row[open] .banlist-chevron {
  transform: rotate(180deg);
}

.banlist-details {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px 20px;
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.banlist-details dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.banlist-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.banlist-pagination {
  justify-content: center;
}

.banlist-pagination[hidden],
.banlist-more[hidden],
.banlist-more button[hidden] {
  display: none;
}

.banlist-more {
  min-height: 14px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.banlist-more p {
  margin: 0;
}

.banlist-more button {
  margin-top: 6px;
}

.banlist-synced {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.banlist-empty {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.banlist-empty p {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 850px) {
  .banlist-columns,
  .banlist-row summary > .banlist-date,
  .banlist-row summary > .banlist-moderator {
    display: none;
  }

  .banlist-grid {
    grid-template-columns: minmax(115px, 1fr) minmax(110px, 1.2fr) 83px 16px;
  }

  .banlist-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .banlist-toolbar {
    flex-direction: column;
  }

  .banlist-tabs a {
    flex: 1;
  }

  .banlist-search {
    flex-basis: 100%;
  }

  .banlist-grid {
    grid-template-columns: minmax(0, 1fr) 84px 16px;
    gap: 8px;
    padding: 12px;
  }

  .banlist-reason {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 44px;
  }
}

/* Public leaderboards */
.tops { max-width: 1080px; margin: 0 auto 64px; }
.tops-filters {
  display: flex;
  align-items: end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(115deg, #a14908, #c66c0b 60%, #9f4b09);
}
.tops-filters label { display: grid; gap: 6px; min-width: min(100%, 190px); font-weight: 650; }
.tops-filters select, .tops-filters button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  font: inherit;
}
.tops-filters button { font-weight: 750; cursor: pointer; }
.tops-wipe-note { flex: 0 0 100%; margin: 0; text-align: center; font-size: .875rem; }
.tops-status { color: var(--muted); }
.tops-carousel { display: grid; align-items: start; grid-template-columns: 1fr 1.32fr 1fr; gap: 16px; margin-top: 22px; }
.tops-carousel[data-motion] { animation: tops-arrive 280ms cubic-bezier(.2, .7, .2, 1) both; }
.tops-carousel[data-motion="prev"] { --tops-offset: -24px; }
.tops-carousel[data-motion="next"] { --tops-offset: 24px; }
@keyframes tops-arrive {
  from { opacity: .35; transform: translateX(var(--tops-offset, 0px)); }
  to { opacity: 1; transform: translateX(0); }
}
.tops-mobile-arrows { display: none; }
.tops-card {
  --tops-tint: color-mix(in srgb, var(--tops-accent) 15%, var(--surface));
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.tops-card.is-current { box-shadow: 0 12px 36px rgba(15, 23, 42, .1); }
.tops-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-inline-start: 3px solid var(--tops-accent);
  border-radius: 12px;
  background: var(--tops-tint);
  font-size: 1.13rem;
}
.tops-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  color: var(--text);
  background: color-mix(in srgb, var(--tops-accent) 12%, var(--surface));
}
.tops-icon img, .tops-arrow img { display: block; width: 20px; height: 20px; }
html.theme-dark :is(.tops-icon, .tops-arrow) img { filter: invert(1); }
.tops-card ol { display: grid; gap: 5px; padding: 0; margin: 0; list-style: none; }
.tops-card li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--surface-2);
}
.tops-card li:nth-child(-n+3) { background: var(--tops-tint); }
.tops-card li strong { overflow-wrap: anywhere; }
.tops-rank, .tops-score { font-size: .82rem; font-variant-numeric: tabular-nums; }
.tops-rank { color: var(--muted); }
.tops-score { background: var(--tops-tint); border-radius: 6px; padding: 3px 6px; font-weight: 700; }
.tops-card.is-preview { margin-top: 26px; }
.tops-card.is-preview :is(ol, .tops-empty) { opacity: .45; filter: blur(2px); user-select: none; }
.tops-arrow {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font: 2rem/1 system-ui;
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .14);
}
.tops-arrow:hover { color: var(--accent); }
.tops-empty { color: var(--muted); padding: 16px 4px; }
@media (max-width: 860px) {
  .tops-content { overflow-x: clip; }
  .tops-carousel, .tops-mobile-arrows { touch-action: pan-y; }
  .tops-carousel { grid-template-columns: minmax(0, 510px); justify-content: center; margin-top: 10px; }
  .tops-card.is-preview { display: none; }
  .tops-mobile-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 510px;
    margin: 16px auto 0;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .08);
  }
  .tops-mobile-arrows .tops-arrow {
    position: static;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    transform: none;
    box-shadow: none;
    border-color: transparent;
    background: var(--surface-2);
  }
  .tops-mobile-label {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--font-display);
    white-space: nowrap;
  }
  .tops-mobile-label .tops-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .tops-card.is-current h2 { display: none; }
}
@media (max-width: 480px) {
  .tops-filters { align-items: stretch; flex-direction: column; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tops-carousel[data-motion] { animation: none; }
}

.lk-approval { display:flex; gap:14px; align-items:flex-start; margin:20px 0 4px; padding:16px; border-radius:18px; border:1px solid var(--border); background:var(--surface-2); }
.lk-approval-icon { display:grid; place-items:center; flex:0 0 44px; height:44px; border-radius:13px; color:var(--accent); background:var(--accent-muted); }
.lk-approval strong { display:block; margin:1px 0 5px; font-size:1rem; }
.lk-approval p { margin:0; color:var(--muted); line-height:1.45; font-size:.9rem; }
.lk-approval a { color:var(--text); font-weight:650; }
.lk-approval.is-finished .lk-approval-icon { color:var(--muted); }

/* Каталог и корзина на узких экранах */
@media (max-width: 600px) {
  .card-product .card-img-wrap .btn-add-cart {
    right: 4px;
    left: 4px;
    bottom: 6px;
    width: auto;
    min-width: 0;
    max-width: none;
    justify-content: center;
    gap: 5px;
    padding: 0 3px;
    font-size: clamp(.62rem, 2.7vw, .8rem);
    opacity: 1;
    transform: none;
  }
  .card-product .card-img-wrap .btn-add-cart__ico { width: 16px; height: 16px; }
  .card-product .card-img-wrap .btn-add-cart__label { max-width: none; opacity: 1; }
  #cart-drawer .cart-line-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
  }
  #cart-drawer .cart-line-main > img { grid-row: 1 / span 2; }
  #cart-drawer .cart-line-main > .checkout-product-body,
  #cart-drawer .cart-line-main > .checkout-product-price { grid-column: 2; }
  #cart-drawer .cart-line-main > .checkout-product-price {
    white-space: normal;
    font-size: clamp(.85rem, 4vw, 1.15rem);
    line-height: 1.25;
  }
  #cart-drawer .cart-line-main .checkout-product-title { overflow-wrap: anywhere; }
  #cart-drawer .cart-line-side { flex-wrap: wrap; justify-content: flex-end; }
}

.checkout-privilege-dialog { padding: clamp(18px, 5vw, 28px); text-align: center; }
.checkout-privilege-art {
  display: block;
  width: min(160px, 42vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: 24px;
  background: radial-gradient(circle, var(--accent-muted), transparent 72%);
}
.checkout-privilege-dialog form { margin: 20px 0 0; }

/* Подтверждение минимального платежа PayHot */
.payhot-minimum-dialog {
  width: min(500px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: clamp(24px, 5vw, 34px);
  text-align: center;
  overscroll-behavior: contain;
}
.payhot-minimum-dialog h2 {
  max-width: 410px;
  margin-inline: auto;
  padding-inline: 24px;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.12;
  text-wrap: balance;
}
.payhot-minimum-dialog > p {
  max-width: 430px;
  margin-inline: auto;
  font-size: clamp(.95rem, 2.4vw, 1.1rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.payhot-minimum-dialog .checkout-dialog-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.payhot-minimum-dialog .checkout-dialog-actions .btn {
  width: 100%;
  min-height: 52px;
  margin: 0;
  white-space: normal;
  line-height: 1.2;
}
.payhot-minimum-dialog .checkout-dialog-actions .btn-checkout-pay {
  box-shadow: none;
}

@media (max-width: 480px) {
  .payhot-minimum-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 16px);
    padding: 24px 16px 18px;
    border-radius: 20px;
  }
  .payhot-minimum-dialog h2 {
    padding-inline: 28px;
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }
  .payhot-minimum-dialog > p { font-size: .96rem; }
  .payhot-minimum-dialog .checkout-dialog-actions .btn {
    min-height: 48px;
    padding-inline: 12px;
    font-size: .95rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .payhot-minimum-dialog {
    max-height: calc(100dvh - 12px);
    padding-block: 18px;
  }
  .payhot-minimum-dialog h2 { font-size: 1.35rem; }
  .payhot-minimum-dialog .checkout-dialog-actions {
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
  }
}

.card-product .card-mobile-buy { display: none; }

@media (max-width: 600px) {
  #product-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 16px;
  }
  #product-grid .card-product {
    min-width: 0;
    padding: 12px;
    border: 0;
    border-radius: 20px;
    background: var(--surface-2);
    box-shadow: none;
  }
  #product-grid .card-product-content { display: flex; flex-direction: column; height: 100%; }
  #product-grid .card-product .card-img-wrap { width: 100%; box-shadow: none; }
  #product-grid .card-product .btn-add-cart { display: none; }
  #product-grid .card-product .card-title { margin: 16px 0 6px; }
  #product-grid .card-product .card-price-block { margin-bottom: 14px; }
  #product-grid .card-product .card-mobile-buy {
    --buy-color: #f5b759;
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    min-height: 52px;
    padding: 12px 17px;
    margin-top: auto;
    gap: 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--buy-color);
    border-radius: 999px;
    background: transparent;
    color: var(--buy-color);
    font: 400 clamp(16px, calc(16px + .119vw), 18px)/normal "Golos Text", sans-serif;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease;
    cursor: pointer;
    pointer-events: auto;
  }
  .card-mobile-buy__icon {
    flex: 0 0 22px;
    height: 22px;
    background: currentColor;
    mask: url("../img/cart-plus.svg") center / contain no-repeat;
  }
  @media (hover: hover) {
    #product-grid .card-product .card-mobile-buy:hover { background: var(--buy-color); color: #fff; }
  }
  #product-grid .card-product .card-mobile-buy:active { opacity: .5; }
  #product-grid .card-product .card-mobile-buy:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
}

/* Место для имени игрока и суммы корзины в шапке */
.topbar-cart-sum {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: end;
  margin-inline-start: 4px;
}
@media (min-width: 1200px) {
  .topbar { width: min(1380px, calc(100% - 56px)); }
  .topbar .topbar-inner.shell { max-width: none; }
  .topbar-inner { column-gap: clamp(10px, 1.25vw, 22px); padding-inline: clamp(16px, 2vw, 28px); }
  .topbar-inner .nav-links { margin-left: clamp(0px, calc((100vw - 1200px) * .09), 32px); gap: clamp(16px, calc(16px + (100vw - 1200px) * .06), 36px); }
  .topbar-inner .topbar-actions { flex-shrink: 0; }
}
@media (max-width: 380px) {
  .topbar-inner { padding-inline: 10px; gap: 6px; }
  .topbar-cart { padding-inline: 7px; }
}

/* Плашка «Для кастомки» на карточках товаров кастомки */
.card-custom-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 26px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.card-custom-badge::before {
  content: "";
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c1.2 6.6 5.4 10.8 12 12-6.6 1.2-10.8 5.4-12 12-1.2-6.6-5.4-10.8-12-12 6.6-1.2 10.8-5.4 12-12z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c1.2 6.6 5.4 10.8 12 12-6.6 1.2-10.8 5.4-12 12-1.2-6.6-5.4-10.8-12-12 6.6-1.2 10.8-5.4 12-12z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Крестик в окне «привилегия выше / нужна CUSTOM» */
.checkout-dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(127, 127, 140, 0.16);
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.checkout-dialog-x:hover { background: rgba(127, 127, 140, 0.28); }
.checkout-dialog-x:focus-visible { outline: 2px solid var(--accent, #f5961a); outline-offset: 2px; }

/* Консоль: форматирование строк лога */
.cs-term { font-size: 13px; line-height: 1.45; }
.cs-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 0 8px; padding: 2px 6px; border-radius: 6px; }
.cs-row:hover { background: rgba(255, 255, 255, 0.04); }
.cs-row-plain, .cs-row-trace { display: block; color: #8b93a5; }
.cs-row-trace { padding-left: 24px; color: #7a8294; }
.cs-time { color: #5d6678; font-variant-numeric: tabular-nums; }
.cs-lvl { min-width: 34px; padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-align: center; }
.cs-lvl-info { background: rgba(110, 168, 254, 0.16); color: #8ab8ff; }
.cs-lvl-dbg { background: rgba(160, 167, 181, 0.14); color: #98a1b3; }
.cs-lvl-warn { background: rgba(245, 196, 81, 0.18); color: #f5c451; }
.cs-lvl-err { background: rgba(255, 123, 114, 0.2); color: #ff8a82; }
.cs-body { color: #d7dae0; overflow-wrap: anywhere; }
.cs-lv-dbg .cs-body { color: #99a2b3; }
.cs-lv-warn .cs-body { color: #f2d48a; }
.cs-lv-err .cs-body { color: #ffb0aa; }
.cs-chip { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.5; }
.cs-t0 { background: rgba(124, 58, 237, 0.22); color: #c4a7ff; }
.cs-t1 { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.cs-t2 { background: rgba(14, 165, 233, 0.2); color: #7dd3fc; }
.cs-t3 { background: rgba(244, 114, 182, 0.2); color: #f9a8d4; }
.cs-t4 { background: rgba(251, 146, 60, 0.2); color: #fdba74; }
.cs-t5 { background: rgba(45, 212, 191, 0.18); color: #5eead4; }
.cs-t6 { background: rgba(250, 204, 21, 0.18); color: #fde047; }
.cs-t7 { background: rgba(167, 139, 250, 0.2); color: #ddd6fe; }
.cs-t-debug { background: rgba(160, 167, 181, 0.16); color: #a8b0c0; }
.cs-uuid { padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); color: #8b93a5; font-size: 12px; cursor: help; }
.cs-ip { color: #6b7385; }
.cs-nick { color: #7dd3fc; font-weight: 700; }
.cs-cmd { padding: 1px 6px; border-radius: 6px; background: rgba(124, 58, 237, 0.2); color: #d8c7ff; font: inherit; font-weight: 700; }
.cs-ev { font-weight: 700; }
.cs-ev-in { color: #7ee2a0; }
.cs-ev-out { color: #ff9a92; }
.cs-row-join { background: rgba(34, 197, 94, 0.08); box-shadow: inset 3px 0 0 #22c55e; }
.cs-row-leave { background: rgba(255, 123, 114, 0.07); box-shadow: inset 3px 0 0 #ff7b72; }
.cs-row-cmd { box-shadow: inset 3px 0 0 #7c3aed; }
@media (max-width: 640px) {
  .cs-row { grid-template-columns: auto minmax(0, 1fr); }
  .cs-time { display: none; }
}

/* Ссылки на товары внутри описаний ([текст](product:slug)) */
.desc-link { color: var(--accent, #f5961a); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.desc-link:hover { text-decoration-thickness: 2px; }

/* Корзина на телефоне: блок удаления не должен занимать всю ширину строки и сжимать название товара */
@media (max-width: 480px) {
  #cart-drawer .cart-line { gap: 10px; }
  #cart-drawer .cart-line-main { flex: 1 1 0; min-width: 0; }
  #cart-drawer .cart-line-side { width: auto; flex: 0 0 auto; margin-left: auto; justify-content: flex-end; }
}

/* Оплата валюты: «Назад» — круглая стрелка слева от заголовка, как в обычной корзине */
#currency-drawer .checkout-pay-head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  margin: 0 0 24px;
  min-height: 48px;
}
#currency-drawer .checkout-pay-head .checkout-pay-lead {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Golos Text", sans-serif;
  font-size: clamp(17px, 4.6vw, 27.41px);
  font-weight: 400;
  line-height: 1.2;
  color: #000;
  margin: 0;
  padding: 0;
}
html.theme-dark #currency-drawer .checkout-pay-head .checkout-pay-lead { color: #f2f2f7; }
#currency-drawer #currency-back-data.checkout-back {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-color-default, #e0e0e6);
  background: transparent;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#currency-drawer #currency-back-data.checkout-back:hover { background: #000; border-color: #000; color: #fff; }
html.theme-dark #currency-drawer #currency-back-data.checkout-back { color: #f2f2f7; border-color: rgba(255, 255, 255, 0.2); }
html.theme-dark #currency-drawer #currency-back-data.checkout-back:hover { background: #f2f2f7; color: #111; }
@media (max-width: 768px) {
  #currency-drawer .checkout-pay-head { gap: 14px; margin-bottom: 16px; }
  #currency-drawer #currency-back-data.checkout-back { flex-basis: 40px; width: 40px; height: 40px; min-height: 40px; }
  #currency-drawer #currency-back-data.checkout-back svg { width: 20px; height: 20px; }
}

/* Корзина: у товара с выбором количества (кейсы, валюта) название и цена идут первой строкой, кнопки удаления и количества — под ними */
#cart-drawer .cart-line:has(.cart-line-qty .checkout-qty-stepper) {
  flex-wrap: wrap;
  row-gap: 12px;
}
#cart-drawer .cart-line:has(.cart-line-qty .checkout-qty-stepper) .cart-line-main {
  flex: 1 1 100%;
  min-width: 0;
}
#cart-drawer .cart-line:has(.cart-line-qty .checkout-qty-stepper) .cart-line-side {
  flex: 1 1 100%;
  width: 100%;
  margin-left: 0;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* Личный кабинет, тёмная тема: единая палитра (карточки, статистика, скин) */
html.theme-dark .lk-card,
html.theme-dark .lk-order {
  background: var(--surface);
  border-color: var(--border-strong);
}
html.theme-dark .lk-stat {
  background: var(--surface-2);
  border-color: var(--border);
}
html.theme-dark .lk-stat span {
  color: var(--muted);
}
/* в карточке профиля блок статистики без собственной заливки (иначе он «синий» на тёмной карточке) */
html.theme-dark .lk-profile .lk-stat {
  background: transparent;
}
html.theme-dark .lk-skin {
  background:
    radial-gradient(circle at 50% 28%, rgba(244, 160, 32, 0.12), transparent 62%),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Блок валюты: ширину полей «Отдаёте» и «Получаете» задаёт JS по длине числа (fitCurrencyInput), значок идёт сразу за цифрами */
.cb-exchange .cb-box .cb-input {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
}
.cb-exchange .cb-box .cb-box-value {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
/* значок валюты вплотную к цифрам и по центру строки (сбрасываем общий сдвиг .riliki-ico) */
.cb-exchange .cb-box .cb-input {
  line-height: 1.2;
}
.cb-exchange .cb-box .cb-input-unit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  align-self: center;
  line-height: 1;
}
.cb-exchange .cb-box .cb-input-unit .riliki-ico {
  display: block;
  margin: 0;
  vertical-align: middle;
}

/* Ширина плашек не зависит от числа: ползунок не сдвигает соседнее поле. */
.cb-exchange .cb-box:first-child {
  flex: 0.8 1 0%;
}
.cb-exchange .cb-box:nth-child(3) {
  flex: 1.5 1 0%;
}
@media (max-width: 760px) {
  .cb-exchange .cb-box:first-child {
    flex: 1 1 0%;
  }
  .cb-exchange .cb-box:nth-child(3) {
    flex: 1.2 1 0%;
  }
  .cb-exchange .cb-box:first-child .cb-input {
    font-size: clamp(.75rem, 4vw, 1rem);
  }
}

/* Карточка «Начни путь к вершине»: вместо рилликов — персонаж со скином владельца (без наклона, стоит на нижнем краю) */
.cb-art.cb-art--skin {
  width: clamp(104px, 13vw, 150px);
  height: auto;
  right: 12px;
  bottom: -6px;
  transform: none;
  filter: drop-shadow(0 14px 18px rgba(90, 30, 0, 0.4));
}

/* Корзина покупки валюты: значок без заливки, рамки и оранжевого кольца */
.currency-checkout-ico {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.currency-checkout-ico img {
  object-fit: contain;
}

/* Карточка «Начни путь к вершине»: крупный персонаж и текст рядом. Размеры считаются от ширины карточки (cqw) */
.cb-left {
  container-type: inline-size;
}
.cb-left .cb-version,
.cb-left .cb-heading,
.cb-left .cb-ip {
  position: relative;
  z-index: 2;
}
.cb-left:has(.cb-art--skin) .cb-heading {
  max-width: 56cqw;
}
.cb-art.cb-art--skin {
  width: min(46cqw, 300px);
  right: 2cqw;
  bottom: -2cqw;
  z-index: 1;
}
/* мягкое свечение за персонажем */
.cb-left:has(.cb-art--skin)::after {
  content: "";
  position: absolute;
  right: -10cqw;
  bottom: -14cqw;
  width: 70cqw;
  height: 70cqw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.1) 42%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 900px) {
  .cb-left:has(.cb-art--skin) .cb-heading {
    max-width: none;
  }
  .cb-left:has(.cb-art--skin)::after {
    display: none;
  }
}

/* Уведомление «IP успешно скопирован!» */
.gg-copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 14px;
  background: #fff;
  color: #14161c;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.gg-copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
html.theme-dark .gg-copy-toast {
  background: #fff;
  color: #14161c;
}
@media (prefers-reduced-motion: reduce) {
  .gg-copy-toast { transition: none; }
}

/* Плашка хода проверки со спиннером (внизу экрана) */
.gg-spinner {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(20, 22, 28, 0.15);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: gg-spin 0.75s linear infinite;
}
@keyframes gg-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .gg-spinner { animation-duration: 2s; }
}

/* Плашки внизу: не сжимать на телефоне */
.gg-copy-toast {
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .gg-copy-toast {
    padding: 14px 20px;
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

/* Личный кабинет: длинный ID транзакции переносится и читается как код */
.lk-mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Способ оплаты: строка с комиссией платёжной системы и итоговой суммой */
.pay-txt .pay-fee {
  display: block;
  margin-top: 2px;
  color: var(--orange, #f97316);
  font-weight: 600;
}

/* Способ оплаты-ссылка («Зарубежные карты») выглядит как обычная карточка */
a.pay-card {
  color: inherit;
  text-decoration: none;
}

/* Две иконки карт (Visa + Mastercard) одна под другой в карточке способа оплаты */
.pay-ico-duo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Личный кабинет: мини-иконка способа оплаты в деталях покупки */
.lk-pay-ico {
  height: 16px;
  width: auto;
  max-width: 44px;
  vertical-align: -3px;
  margin-right: 8px;
}

/* Способ оплаты в окне покупки: иконка по центру строки, ровно с текстом */
.lk-dl dd:has(.lk-pay-ico) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.lk-pay-ico {
  display: block;
  flex: 0 0 auto;
  height: 15px;
  width: auto;
  max-width: 40px;
  margin: 0;
  vertical-align: baseline;
  object-fit: contain;
}

/* Плашка «Войдите в аккаунт — скидка» над каталогом и примечание в корзине */
.login-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff3e0, #ffe3c2);
  border: 1px solid #ffc891;
  color: #5a3200;
  font-size: 0.95rem;
}
.login-promo b {
  color: #c2410c;
}
.login-promo-btn {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 10px;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.login-promo-btn:hover {
  filter: brightness(1.08);
}
html.theme-dark .login-promo {
  background: linear-gradient(90deg, #3a2410, #4a2c12);
  border-color: #7a4a1c;
  color: #ffe2bf;
}
html.theme-dark .login-promo b {
  color: #ffb067;
}
@media (max-width: 560px) {
  .login-promo {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}
.cart-login-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff3e0, #ffe6c7);
  border: 1px solid #ffc891;
  color: #5a3200;
}
.cart-login-card[hidden] {
  display: none;
}
.cart-login-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.cart-login-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.3;
}
.cart-login-text b {
  font-size: 0.98rem;
  color: #c2410c;
}
.cart-login-btn {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 10px;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.cart-login-card.is-on {
  background: linear-gradient(90deg, #e8f8ee, #d6f3e0);
  border-color: #9fdcb5;
  color: #14532d;
}
.cart-login-card.is-on .cart-login-ico {
  background: #16a34a;
}
.cart-login-card.is-on .cart-login-text b {
  color: #166534;
}
html.theme-dark .cart-login-card {
  background: linear-gradient(90deg, #3a2410, #4a2c12);
  border-color: #7a4a1c;
  color: #ffe2bf;
}
html.theme-dark .cart-login-text b {
  color: #ffb067;
}
html.theme-dark .cart-login-card.is-on {
  background: linear-gradient(90deg, #10301c, #14402a);
  border-color: #2f7a4a;
  color: #cdf5da;
}
html.theme-dark .cart-login-card.is-on .cart-login-text b {
  color: #7ee0a2;
}

/* Подпись режима у блока покупки валюты */
.cb-title-row { flex-wrap: wrap; }
.cb-mode {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff1e3;
  color: #c2410c;
  border: 1px solid #ffd2a8;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.4;
}
.cb-mode:empty { display: none; }
html.theme-dark .cb-mode { background: #3a2410; color: #ffb067; border-color: #7a4a1c; }

/* Телефон: «Выберите способ оплаты» стоит в одной строке сразу после стрелки «Назад» */
@media (max-width: 768px) {
  #cart-drawer .checkout-pay-head,
  #currency-drawer .checkout-pay-head {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 14px !important;
  }
  #cart-drawer .checkout-pay-head .checkout-pay-lead,
  #currency-drawer .checkout-pay-head .checkout-pay-lead {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    font-size: clamp(17px, 5.2vw, 24px) !important;
    line-height: 1.2 !important;
  }
  #cart-drawer #checkout-back-order.checkout-back {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* Корзина: счётчик количества как на easydonate — оранжевые круглые кнопки, при количестве 1 «−» становится красной корзиной */
.cart-line-qty .checkout-qty-stepper {
  padding: 5px;
  gap: 8px;
  background: #fff;
  border: 1px solid #f3c27a;
  border-radius: 999px;
  align-items: center;
}
html.theme-dark .cart-line-qty .checkout-qty-stepper {
  background: var(--surface);
  border-color: #7a5a2e;
}
.cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f6b85a;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.cart-line-qty .checkout-qty-stepper .checkout-qty-btn:hover {
  background: #f2a93f;
}
.cart-line-qty .checkout-qty-stepper .checkout-qty-btn:active {
  transform: scale(0.94);
  background: #f9cf8f;
}
.cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash {
  background: #fde0e0;
  color: #e5383b;
}
.cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash:hover {
  background: #fbc9c9;
}
html.theme-dark .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash {
  background: #4a2226;
  color: #ff7b80;
}
.cart-line-qty .checkout-qty-stepper .checkout-qty-btn svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 768px) {
  #cart-drawer .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

/* Корзина: строка товара 1 в 1 как на easydonate — без серой плашки, крупная картинка, «× 2 шт.», категория с ключом, цена справа, счётчик под названием */
#cart-drawer .cart-line.cl-ez {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0 22px;
  padding: 10px 0;
  margin: 0;
  background: transparent !important;
  border: 0;
  border-radius: 0;
}
#cart-drawer .cart-line.cl-ez + .cart-line.cl-ez {
  border-top: 1px solid rgba(127, 127, 127, 0.18);
  padding-top: 18px;
  margin-top: 8px;
}
#cart-drawer .cart-line.cl-ez .cl-img {
  width: 112px !important;
  height: 112px !important;
  border-radius: 26px;
  object-fit: cover;
  float: none;
  margin: 0 !important;
}
#cart-drawer .cart-line.cl-ez .cl-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
#cart-drawer .cart-line.cl-ez .cl-title {
  margin: 0;
  font-family: "Golos Text", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  color: #000;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .cl-title {
  color: #f2f2f7;
}
#cart-drawer .cart-line.cl-ez .cl-x {
  color: #8a8a93;
  font-size: 0.92em;
}
#cart-drawer .cart-line.cl-ez .cl-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  color: #b4b4bd;
}
#cart-drawer .cart-line.cl-ez .cl-cat svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}
#cart-drawer .cart-line.cl-ez .cl-price {
  margin: 0;
  font-family: "Golos Text", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  text-align: right;
  color: #000;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .cl-price {
  color: #fff;
}
#cart-drawer .cart-line.cl-ez .cart-line-side {
  display: flex;
  align-items: center;
  margin: 8px 0 0;
  width: auto;
  justify-content: flex-start;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-label,
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-suffix {
  display: none;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper {
  padding: 5px;
  gap: 4px;
  border: 1px solid #f1c27d;
  border-radius: 999px;
  background: #fff;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
  width: 58px;
  height: 58px;
  font-size: 28px;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
  width: 64px;
  font-size: 22px;
  font-weight: 500;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#cart-drawer .cart-line.cl-ez .cart-line-remove {
  width: 48px;
  height: 48px;
}
@media (max-width: 768px) {
  #cart-drawer .cart-line.cl-ez {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0 14px;
  }
  #cart-drawer .cart-line.cl-ez .cl-img {
    width: 84px !important;
    height: 84px !important;
    border-radius: 20px;
  }
  #cart-drawer .cart-line.cl-ez .cl-title {
    font-size: 18px;
  }
  #cart-drawer .cart-line.cl-ez .cl-price {
    font-size: 22px;
  }
  #cart-drawer .cart-line.cl-ez .cl-cat {
    font-size: 14px;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
    width: 48px;
    font-size: 18px;
  }
}
#cart-drawer .cart-line.cl-ez .cl-x {
  white-space: nowrap;
}

/* Адаптивная строка корзины (по образцу easydonate): картинка, название и категория, цена; счётчик отдельной областью */
#cart-drawer .cart-line.cl-ez {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "img body price"
    "img side side";
  align-items: start;
  gap: 4px 20px;
}
#cart-drawer .cart-line.cl-ez .cl-img { grid-area: img; align-self: start; }
#cart-drawer .cart-line.cl-ez .cl-body { grid-area: body; }
#cart-drawer .cart-line.cl-ez .cl-price { grid-area: price; align-self: start; }
#cart-drawer .cart-line.cl-ez .cart-line-side { grid-area: side; margin: 4px 0 0; align-self: start; }

/* Планшет и узкие окна */
@media (max-width: 768px) {
  #cart-drawer .cart-line.cl-ez {
    gap: 2px 16px;
  }
  #cart-drawer .cart-line.cl-ez .cl-img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 28px;
  }
  #cart-drawer .cart-line.cl-ez .cl-title { font-size: 20px; }
  #cart-drawer .cart-line.cl-ez .cl-price { font-size: 24px; }
}

/* Телефон: цена уходит под название, счётчик ниже, ничего не наезжает */
@media (max-width: 480px) {
  #cart-drawer .cart-line.cl-ez {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "img body"
      "img price"
      "img side";
    gap: 0 14px;
  }
  #cart-drawer .cart-line.cl-ez .cl-img {
    width: 84px !important;
    height: 84px !important;
    border-radius: 24px;
  }
  #cart-drawer .cart-line.cl-ez .cl-title { font-size: 17px; }
  #cart-drawer .cart-line.cl-ez .cl-cat { font-size: 13px; }
  #cart-drawer .cart-line.cl-ez .cl-price {
    font-size: 20px;
    text-align: left;
    margin: 4px 0 0;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-side { margin-top: 8px; }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper { padding: 3px; gap: 2px; }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
    width: 42px;
    font-size: 16px;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-btn svg { width: 17px; height: 17px; }
}

/* Очень узкие (320 px): картинка меньше */
@media (max-width: 360px) {
  #cart-drawer .cart-line.cl-ez .cl-img {
    width: 72px !important;
    height: 72px !important;
    border-radius: 20px;
  }
}

/* Счётчик количества в корзине: компактнее и плавно меняется по ширине экрана */
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper {
  padding: 3px;
  gap: 2px;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
  width: clamp(34px, 6.5vw, 44px);
  height: clamp(34px, 6.5vw, 44px);
  font-size: clamp(19px, 3.4vw, 24px);
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
  width: clamp(38px, 7vw, 52px);
  font-size: clamp(15px, 2.6vw, 18px);
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-btn svg {
  width: clamp(15px, 2.6vw, 19px);
  height: clamp(15px, 2.6vw, 19px);
}
@media (min-width: 769px) {
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
    width: 44px;
    height: 44px;
  }
}

/* Корзина помещается без прокрутки всей панели: список товаров прокручивается сам, данные и кнопка «К оформлению» всегда на виду; размеры подстраиваются под высоту окна */
#cart-drawer .checkout-modal-inner:has(#checkout-pane-order:not([hidden])) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: clamp(6px, 1.2vh, 12px);
}
#cart-drawer #checkout-pane-order:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0 !important;
  height: 100%;
}
#cart-drawer #checkout-pane-order .checkout-product-card {
  flex: 1 1 auto;
  min-height: 96px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 4px !important;
}
#cart-drawer #checkout-pane-order .checkout-form-panel,
#cart-drawer #checkout-pane-order .checkout-legal,
#cart-drawer #checkout-pane-order .checkout-order-foot {
  flex: 0 0 auto;
}
#cart-drawer #checkout-pane-order .checkout-order-foot {
  margin-top: 0;
  padding-top: clamp(6px, 1.2vh, 14px);
}
#cart-drawer #checkout-pane-order .cart-title {
  font-size: clamp(20px, 3.2vh, 28px);
  margin: 0 0 clamp(2px, 0.8vh, 8px);
}
/* Размеры строки товара от высоты окна */
#cart-drawer .cart-line.cl-ez .cl-img {
  width: clamp(64px, 11vh, 112px) !important;
  height: clamp(64px, 11vh, 112px) !important;
  border-radius: clamp(18px, 3vh, 26px);
}
#cart-drawer .cart-line.cl-ez .cl-title {
  font-size: clamp(16px, 2.6vh, 24px);
}
#cart-drawer .cart-line.cl-ez .cl-price {
  font-size: clamp(19px, 3.2vh, 30px);
}
#cart-drawer .cart-line.cl-ez {
  padding: clamp(4px, 1vh, 10px) 0;
}
#cart-drawer .cart-line.cl-ez + .cart-line.cl-ez {
  padding-top: clamp(8px, 1.6vh, 16px);
  margin-top: clamp(2px, 0.8vh, 8px);
}
#cart-drawer #checkout-pane-order .checkout-form-panel {
  padding: clamp(10px, 1.6vh, 18px) 16px clamp(6px, 1vh, 12px);
  margin: clamp(2px, 0.8vh, 8px) 0 clamp(2px, 0.8vh, 8px);
}
#cart-drawer #checkout-pane-order .checkout-field {
  margin-bottom: clamp(4px, 0.8vh, 8px);
}
#cart-drawer #checkout-pane-order .checkout-legal {
  margin: clamp(2px, 0.6vh, 6px) 0;
  font-size: clamp(11px, 1.5vh, 13px);
  line-height: 1.35;
}
@media (max-height: 760px) {
  #cart-drawer #checkout-pane-order .checkout-legal { font-size: 11px; line-height: 1.25; }
}

/* Счётчик как на easydonate: широкие овальные кнопки, светлая рамка, яркая корзина */
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper {
  gap: 14px;
  padding: 3px;
  border: 1px solid #e7e7ec;
  background: #fff;
  transition: border-color 0.2s ease;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper:hover {
  border-color: #f1b45a;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper {
  border-color: rgba(255, 255, 255, 0.16);
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
  width: clamp(54px, 9vw, 76px);
  height: clamp(36px, 6.4vw, 46px);
  border-radius: 999px;
  background: #f6b85a;
  color: #fff;
  font-size: 0;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn svg {
  width: clamp(18px, 3vw, 24px);
  height: clamp(18px, 3vw, 24px);
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash {
  background: rgba(242, 25, 25, 0.14);
  color: #f21919;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash:hover {
  background: #f21919;
  color: #fff;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
  width: clamp(26px, 5vw, 36px);
  font-size: clamp(16px, 2.8vw, 20px);
  font-weight: 500;
}
@media (min-width: 769px) {
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
    width: 70px;
    height: 46px;
  }
}

/* Счётчик количества: дизайн easydonate (.cart-item-actions) под наши цвета — рамка 1px #E8E8E8, зазор 16px, кнопки 20px-иконка + отступы 16×25, число в блоке 60px, корзина красным 15% → красная при наведении */
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 16px;
  padding: 2px;
  border: 1px solid #e8e8e8;
  border-radius: 999px;
  background: transparent;
  transition: border-color 0.2s ease;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper:hover {
  border-color: #f6b85a;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper {
  border-color: rgba(255, 255, 255, 0.14);
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 16px 25px;
  border: 0;
  border-radius: 999px;
  background: #f6b85a;
  color: #fff;
  font-size: 0;
  line-height: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn:hover {
  background: #f6b85a;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn:active {
  transform: none;
  opacity: 0.7;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash {
  background: rgba(242, 25, 25, 0.15);
  color: #f21919;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash:hover {
  background: #f21919;
  color: #fff;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn:disabled {
  background: #e0e0e0;
  cursor: not-allowed;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
  width: 60px;
  height: auto;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  color: #000;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input {
  color: #fff;
}
/* Планшет и телефон: пропорции те же, но компактнее */
@media (max-width: 768px) {
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper { gap: 8px; }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn { padding: 12px 20px; }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn svg { width: 18px; height: 18px; }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input { width: 44px; font-size: 17px; }
}
@media (max-width: 400px) {
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn { padding: 10px 16px; }
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-input { width: 36px; font-size: 16px; }
}
/* На невысоких окнах — чуть ниже кнопки */
@media (max-height: 800px) and (min-width: 769px) {
  #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn { padding: 12px 22px; }
}

/* Корзина-кнопка: значок как на easydonate (ведро с крышкой), по наведению сплошной коралловый #f55353 с белым значком */
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash,
#cart-drawer .cart-line.cl-ez .cart-line-remove {
  background: rgba(245, 83, 83, 0.15);
  color: #f55353;
  transition: background-color 0.2s ease, color 0.2s ease;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash:hover,
#cart-drawer .cart-line.cl-ez .cart-line-remove:hover {
  background: #f55353;
  color: #fff;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash svg,
#cart-drawer .cart-line.cl-ez .cart-line-remove svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
#cart-drawer .cart-line.cl-ez .cart-line-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 16px 25px;
  border: 0;
  border-radius: 999px;
}
@media (max-width: 768px) {
  #cart-drawer .cart-line.cl-ez .cart-line-remove { padding: 12px 20px; }
}

/* Счётчик товара, который нельзя добавить ещё раз: корзина, «1» и серый «+» (как на easydonate) */
#cart-drawer .cart-line.cl-ez .checkout-qty-static {
  display: block;
  width: 60px;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  color: #000;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .checkout-qty-static {
  color: #fff;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn:disabled {
  background: #e0e0e0;
  color: #cfcfd4;
  cursor: not-allowed;
  opacity: 1;
}
html.theme-dark #cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
}
@media (max-width: 768px) {
  #cart-drawer .cart-line.cl-ez .checkout-qty-static { width: 44px; font-size: 17px; }
}
@media (max-width: 400px) {
  #cart-drawer .cart-line.cl-ez .checkout-qty-static { width: 36px; font-size: 16px; }
}

/* Корзина: на широких экранах счётчик стоит правее названия, в одной строке с картинкой и ценой — высота строки меньше, места больше */
@media (min-width: 601px) {
  #cart-drawer .cart-line.cl-ez {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "img body side price";
    align-items: center;
    gap: 0 clamp(14px, 2vw, 22px);
  }
  #cart-drawer .cart-line.cl-ez .cl-img { align-self: center; }
  #cart-drawer .cart-line.cl-ez .cl-body { align-self: center; }
  #cart-drawer .cart-line.cl-ez .cart-line-side {
    margin: 0;
    align-self: center;
    justify-content: flex-end;
  }
  #cart-drawer .cart-line.cl-ez .cl-price {
    align-self: center;
    min-width: 5.2ch;
  }
}

/* Пока скрипт переключает запомненный режим, каталог и блок валюты не показываем (иначе на миг виден «Гриф») */
html.gg-srv-pending #shop,
html.gg-srv-pending #currency-buy {
  visibility: hidden;
}

/* Телефоны и планшеты: меньше нагрузки на видеокарту и процессор — без размытия фона, без бесконечных анимаций свечения, облегчённые тени, отрисовка только видимых карточек */
@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  *,
  *::before,
  *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .topbar-inner,
  .topbar-inner .nav-links {
    background: var(--surface);
  }
  .currency-ico::before {
    animation: none;
    filter: none;
    opacity: 0.6;
  }
  .rp-viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .rp-track {
    will-change: transform;
  }
  .card-product {
    content-visibility: auto;
    contain-intrinsic-size: auto 320px;
  }
  .cat-pill {
    box-shadow: 0 1px 4px rgba(18, 25, 44, 0.08);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .cat-pill.active {
    box-shadow: 0 4px 12px rgba(18, 25, 44, 0.2);
  }
}
/* На сенсорных экранах наведения нет: не поднимаем и не затеняем карточки по «hover» */
@media (hover: none) {
  .cat-pill:hover,
  .card-product:hover {
    transform: none;
  }
  .cat-pill:hover {
    box-shadow: 0 1px 4px rgba(18, 25, 44, 0.08);
  }
  .cat-pill.active:hover {
    box-shadow: 0 4px 12px rgba(18, 25, 44, 0.2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp-track,
  .currency-ico::before {
    animation: none !important;
  }
}

/* Корзина: строка в одну линию (счётчик правее названия) только если самой корзине хватает ширины — считаем по ширине списка, а не окна; иначе счётчик под названием и ничего не наезжает */
#cart-drawer .cart-lines {
  container-type: inline-size;
  container-name: cartl;
}
@media (min-width: 601px) {
  #cart-drawer .cart-line.cl-ez {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "img body price"
      "img side side";
    align-items: start;
    gap: 2px clamp(14px, 2vw, 22px);
  }
  #cart-drawer .cart-line.cl-ez .cl-img,
  #cart-drawer .cart-line.cl-ez .cl-body,
  #cart-drawer .cart-line.cl-ez .cl-price {
    align-self: start;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-side {
    margin: 4px 0 0;
    align-self: start;
    justify-content: flex-start;
  }
}
@container cartl (min-width: 660px) {
  #cart-drawer .cart-line.cl-ez {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "img body side price";
    align-items: center;
  }
  #cart-drawer .cart-line.cl-ez .cl-img,
  #cart-drawer .cart-line.cl-ez .cl-body,
  #cart-drawer .cart-line.cl-ez .cl-price,
  #cart-drawer .cart-line.cl-ez .cart-line-side {
    align-self: center;
  }
  #cart-drawer .cart-line.cl-ez .cart-line-side {
    margin: 0;
    justify-content: flex-end;
  }
}

/* Быстрая сумма в блоке валюты: отметка только при точном совпадении; на сенсорных экранах «hover» после касания не залипает */
.cb-chip.is-active,
.cb-chip.is-active:hover {
  background: rgba(245, 124, 0, 0.1);
  border-color: #f57c00;
  color: #b45309;
}
@media (hover: none) {
  .cb-chip:not(.is-active):hover {
    background: transparent;
    border-color: var(--border-strong);
    color: inherit;
  }
}

/* Баннер акции «Запуск нового сайта» на главной */
.sale-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f97316, #fb923c);
  color: #fff;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.25);
}
.sale-launch b {
  font-weight: 800;
}
@media (max-width: 480px) {
  .sale-launch {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* Цена в карточке акции: старая цена перечёркнута над новой (без отдельной плашки «−N%») */
.card-price-block .card-price-old {
  display: block;
  font-size: 0.9em;
  color: var(--muted);
  line-height: 1.2;
  margin: 0;
}
.card-price-block .card-price--sale {
  margin-top: 2px;
}

/* «ХИТ» внизу карточки, под ценой (зелёный, без наложения на картинку) */
.card-hit-row {
  margin: 8px 0 0;
}
.card-hit-badge.card-hit-badge--bottom {
  position: static;
  display: inline-block;
  top: auto;
  left: auto;
  right: auto;
  box-shadow: none;
}
.card-hit-badge.card-hit-badge--bottom::before {
  display: none;
}

/* Верх карточки слева: «−N%» и «Для кастомки» в один ряд; «СКИДКА» остаётся справа */
.card-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-top-left .card-sale-badge--pct,
.card-top-left .card-custom-badge {
  position: static;
}

/* Верх карточки справа: «СКИДКА» и «ХИТ» в один ряд */
.card-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-top-right .card-sale-badge--hot,
.card-top-right .card-hit-badge {
  position: static;
}

/* Верхние плашки в две колонки, без наложения: слева «−N%» и под ней «Для кастомки», справа «СКИДКА» и под ней «ХИТ» */
.card-top-left,
.card-top-right {
  flex-direction: column;
  gap: 6px;
  max-width: 48%;
}
.card-top-left {
  align-items: flex-start;
}
.card-top-right {
  align-items: flex-end;
}
.card-top-left .card-custom-badge {
  font-size: 0.66rem;
  padding: 5px 10px 5px 8px;
  height: auto;
  line-height: 1.1;
  white-space: nowrap;
}
.card-top-right .card-sale-badge--hot,
.card-top-right .card-hit-badge {
  font-size: 0.66rem;
  padding: 6px 11px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .card-top-left .card-custom-badge {
    font-size: 0.6rem;
    padding: 4px 8px 4px 7px;
  }
  .card-top-right .card-sale-badge--hot,
  .card-top-right .card-hit-badge {
    font-size: 0.6rem;
    padding: 5px 9px;
  }
}

/* «Для кастомки» внизу карточки, под ценой (как «ХИТ» раньше): без абсолютного позиционирования */
.card-custom-row {
  margin: 8px 0 0;
}
.card-custom-row .card-custom-badge {
  position: static;
  height: auto;
  line-height: 1.1;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 6px 12px 6px 9px;
}

/* Процент «−N%» показываем и на карточках с «ХИТ» (раньше старое правило его прятало) */
.card-sale-badges.has-hit .card-top-left .card-sale-badge--pct {
  display: inline-flex;
}

/* Строка с ценой: «Для кастомки» справа от цены, после скидки */
.card-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.card-price-row .card-price-block {
  flex: 0 1 auto;
}
.card-price-row .card-custom-row {
  margin: 0 0 4px;
  flex: 0 0 auto;
}

/* Внизу карточки: «Для кастомки» и красная «СКИДКА» сразу за ней в одной строке */
.card-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}
.card-custom-row .card-sale-badge--hot {
  position: static;
  top: auto;
  right: auto;
  font-size: 0.7rem;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: none;
}
.card-custom-row .card-sale-badge--hot::before {
  display: none;
}

/* «Для кастомки» внизу — в том же стиле, что «СКИДКА»: жирные заглавные буквы в ярком бейдже */
.card-custom-row .card-custom-badge {
  position: static;
  text-transform: uppercase;
  box-sizing: border-box;
  max-width: 100%;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 7px 14px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: auto;
  line-height: 1;
  white-space: normal;
}

/* «Для кастомки» в верхней правой колонке, под «СКИДКА» (как «ХИТ» у кастомного товара) */
.card-top-right .card-custom-badge {
  position: static;
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border-radius: 16px;
  height: auto;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Скрытые карточки категории не показываем (переключение категории без пересборки списка) */
.card-product[hidden] {
  display: none !important;
}

/* Категории на телефоне: без задержки тапа и без прилипания прокрутки */
.cat-pill {
  touch-action: manipulation;
}
@media (max-width: 959px) {
  .sidebar {
    scroll-snap-type: none;
  }
}

/* Мобильные категории: однотонная подсветка и быстрый переход, без градиента и тяжёлых теней */
@media (max-width: 959px) {
  .cat-pill {
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    box-shadow: 0 1px 3px rgba(18, 25, 44, 0.08);
  }
  .cat-pill.active,
  .cat-pill.active:hover {
    background: var(--nav-active-bg);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(18, 25, 44, 0.18);
    transform: none;
  }
}

/* Телефон и планшет (< 960px): категории без анимаций трансформации и градиентов — подсветка мгновенная */
@media (max-width: 959px) {
  .cat-pill,
  .cat-pill:hover,
  .cat-pill:active {
    transform: none;
    transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear;
    box-shadow: 0 1px 3px rgba(18, 25, 44, 0.08);
  }
  .cat-pill.active,
  .cat-pill.active:hover,
  .cat-pill.active:active {
    background: var(--nav-active-bg);
    border-color: transparent;
    box-shadow: none;
  }
  .cat-ico,
  .cat-pill.active .cat-ico,
  .cat-pill:hover .cat-ico {
    transition: none;
    box-shadow: none;
  }
  .cat-pill .cat-meta {
    transition: none;
  }
}

/* Телефон и планшет: категории и карточки без переходов и анимаций, минимум перерисовок при выборе категории */
@media (max-width: 959px) {
  .sidebar,
  .sidebar .cat-pill,
  .sidebar .cat-pill *,
  #product-grid .card-product,
  #product-grid .card-product * {
    transition: none !important;
    animation: none !important;
  }
  .cat-pill,
  .cat-pill:hover,
  .cat-pill:active,
  .cat-pill.active,
  .cat-pill.active:hover {
    box-shadow: none !important;
    transform: none !important;
    -webkit-tap-highlight-color: transparent;
  }
  .cat-pill.active {
    background: var(--nav-active-bg) !important;
  }
}

/* Страница товара: зачёркнутая старая цена сверху, затем новая цена и скидка */
.product-buy-price-meta--old {
  margin: 0 0 2px;
}
.product-buy-price-meta .product-price-pct {
  margin-left: 0;
}

/* Скидка в одной строке с новой ценой */
.product-price-pct--inline {
  font-size: 0.95rem;
  margin-left: 10px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Мобильная версия (< 960px): большие области нажатия в списках и без автозума на iOS при вводе */
@media (max-width: 959px) {
  .catalog-list a {
    display: inline-block;
    padding: 8px 0;
    min-height: 40px;
    line-height: 24px;
  }
  input,
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}

/* Телефон: тени и фильтры карточек каталога тормозят отрисовку при переключении сервера и категории — оставляем лёгкую тень у карточки */
@media (max-width: 959px) {
  #product-grid .card-product {
    box-shadow: 0 1px 3px rgba(18, 25, 44, 0.08) !important;
  }
  #product-grid .card-product * {
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    text-shadow: none !important;
  }
}

/* Блоки карточек по серверам: невидимые блоки не занимают места, видимый блок ведёт себя как сама сетка */
.grid-products > .gg-grid-box {
  display: contents;
}
.grid-products > .gg-grid-box[hidden] {
  display: none;
}

/* Порционный показ карточек при смене сервера: отложенные скрыты, появившиеся плавно проявляются (только прозрачность) */
.card-product.gg-defer {
  display: none !important;
}
@keyframes ggCardFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.card-product.gg-fade {
  animation: ggCardFade 0.2s ease both;
}

/* Телефон: компактные карточки каталога — три в ряд, меньше отступы и шрифт (как в образце) */
@media (max-width: 600px) {
  .grid-products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .grid-products .card-product {
    padding: 6px !important;
    border-radius: 16px !important;
  }
  .grid-products .card-title {
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
    margin: 6px 4px 2px !important;
  }
  .grid-products .card-price-block {
    margin: 0 4px 6px !important;
  }
  .grid-products .card-price,
  .grid-products .card-price--sale {
    font-size: 0.78rem !important;
    padding: 4px 7px !important;
  }
  .grid-products .card-terms-from {
    display: block !important;
  }
}

/* Карточки как в образце EasyDonate (телефон): картинка в тонкой рамке со скруглением, без фона и тени, название мелким серым, цена жирным */
@media (max-width: 600px) {
  .grid-products .card-product {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 42px !important;
    padding: 8px !important;
  }
  .grid-products .card-img-wrap {
    border: 1px solid var(--border) !important;
    border-radius: 33px !important;
    background: var(--surface) !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }
  .grid-products .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important;
  }
  .grid-products .card-title {
    font-size: 0.82rem !important;
    font-weight: 400 !important;
    color: var(--muted) !important;
    margin: 8px 6px 4px !important;
    text-align: left;
  }
}

/* Как в образце EasyDonate: на телефоне две карточки в ряд, название чуть крупнее */
@media (max-width: 600px) {
  .grid-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .grid-products .card-title {
    font-size: 0.95rem !important;
  }
}

/* Прогрузка при смене сервера: селектор и каталог плавно затухают на время переключения */
.select-wrap.is-loading .sel-btn {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
#product-grid.is-switching {
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
#product-grid {
  transition: opacity 0.2s ease;
}

/* Карточки как в образце EasyDonate (для всех ширин): прозрачный фон без тени, картинка в тонкой рамке со скруглением */
#product-grid .card-product {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 42px !important;
  padding: 12px !important;
}
#product-grid .card-img-wrap {
  border: 1px solid var(--border) !important;
  border-radius: 33px !important;
  background: transparent !important;
  padding: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
#product-grid .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px !important;
}
#product-grid .card-title {
  font-size: 1.05rem !important;
  font-weight: 400 !important;
  color: var(--muted) !important;
  margin: 10px 8px 6px !important;
  text-align: left;
}

/* Как в образце EasyDonate: картинка без рамки, только скругление */
#product-grid .card-product .card-img-wrap {
  border: 0 !important;
  padding: 0 !important;
  border-radius: 33px !important;
}
#product-grid .card-product .card-img-wrap img {
  border-radius: 33px !important;
}

/* Телефон: без белой подложки каталога, сетка на всю ширину — карточки крупнее, как в образце */
@media (max-width: 600px) {
  .main-col {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .grid-products {
    gap: 14px !important;
  }
}

/* Подгрузка карточек по прокрутке: маркер в конце блока (не занимает места) */
.grid-products > .gg-grid-box > .gg-sentinel {
  grid-column: 1 / -1;
  height: 1px;
}

/* Телефон: размеры карточек как в образце EasyDonate (две колонки без зазора, картинка ~87% карточки, название 20px, цена 25px) и бейджи не наезжают друг на друга */
@media (max-width: 600px) {
  .main-col {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
  }
  #product-grid .card-product {
    margin: 0 3px 8px !important;
    padding: 12px !important;
    min-width: 0;
  }
  #product-grid .card-title {
    font-size: 20px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.75) !important;
    margin: 12px 4px 6px !important;
  }
  #product-grid .card-price,
  #product-grid .card-price--sale {
    font-size: 25px !important;
    font-weight: 700 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  #product-grid .card-price-old {
    font-size: 16px !important;
  }
  #product-grid .card-top-left {
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
  }
  #product-grid .card-top-right {
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
  }
  #product-grid .card-top-left .card-sale-badge,
  #product-grid .card-top-right .card-sale-badge,
  #product-grid .card-top-left .card-sale-badge--pct,
  #product-grid .card-top-right .card-sale-badge--hot {
    font-size: 11px !important;
    padding: 3px 7px !important;
  }
}

/* Бейджи: «-50%» сверху, «СКИДКА» под ним — не наезжают */
@media (max-width: 600px) {
  #product-grid .card-top-right {
    top: 40px !important;
    left: 8px !important;
    right: auto !important;
    align-items: flex-start !important;
  }
}

/* Наведение как в образце EasyDonate: фон и мягкая тень у карточки, картинка чуть увеличивается, название и цена в акцентном цвете */
#product-grid .card-product {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
#product-grid .card-product .card-img-wrap img {
  transition: transform 0.2s ease;
}
@media (hover: hover) {
  #product-grid .card-product:hover {
    background: var(--surface) !important;
    box-shadow: 0 4px 45px 0 rgba(0, 0, 0, 0.1) !important;
  }
  #product-grid .card-product:hover .card-img-wrap img {
    transform: scale(1.1);
  }
  #product-grid .card-product:hover .card-title,
  #product-grid .card-product:hover .card-price {
    color: var(--accent) !important;
  }
}
#product-grid .card-product:active .card-img-wrap img {
  transform: scale(1.05);
}

/* Бейджи на телефоне: «СКИДКА» под «-50%», слева, не наезжает (более точный селектор) */
@media (max-width: 600px) {
  #product-grid .card-product .card-top-right {
    top: 40px !important;
    left: 10px !important;
    right: auto !important;
  }
}

/* Полоска прогрузки сверху (как в образце EasyDonate): ездит слева направо во время смены сервера или категории */
#gg-stripe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f5b759, transparent);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}
#gg-stripe.on {
  opacity: 1;
  animation: ggStripe 0.6s linear infinite;
}
@keyframes ggStripe {
  to { transform: translateX(100%); }
}

/* Телефон: «-50%» слева сверху, «СКИДКА» в правом верхнем углу (как на ПК) */
@media (max-width: 600px) {
  #product-grid .card-product .card-top-left {
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
  }
  #product-grid .card-product .card-top-right {
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    align-items: flex-end !important;
  }
}

/* Причина лага при смене сервера: content-visibility у карточек заставляет пересчитывать раскладку всего блока — отключаем */
#product-grid .card-product {
  content-visibility: visible !important;
  contain-intrinsic-size: none !important;
}

/* ПК и планшет как в образце EasyDonate: без белой подложки каталога и без теней карточек; сетка 4 / 3 / 2 в ряд */
.main-col {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
#product-grid .card-product,
#product-grid .card-product * {
  box-shadow: none !important;
}
#product-grid .card-product {
  background: transparent !important;
  border: 0 !important;
  border-radius: 42px !important;
  padding: 12px !important;
}
#product-grid .card-img-wrap {
  border: 0 !important;
  border-radius: 33px !important;
  background: transparent !important;
}
#product-grid .card-title {
  font-size: 20px !important;
  font-weight: 400 !important;
  color: rgba(0, 0, 0, 0.75) !important;
  margin: 12px 8px 6px !important;
  text-align: left;
}
@media (min-width: 1200px) {
  #product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  #product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

/* ПК как в образце EasyDonate: категории горизонтальной полосой сверху, карточки четыре в ряд (960–1199 px; шире — вертикальное меню слева) */
@media (min-width: 960px) and (max-width: 1199px) {
  .layout {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    flex-direction: row !important;
    position: static !important;
    top: auto !important;
    overflow-x: auto !important;
    gap: 10px !important;
    padding: 4px 2px 12px !important;
    touch-action: auto !important;
  }
  .sidebar .cat-pill {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    padding: 10px 18px 10px 12px !important;
    border-radius: 999px !important;
  }
  #product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
@media (min-width: 768px) and (max-width: 959px) {
  #product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* ПК: плотная сетка как в образце — карточки почти вплотную, картинка крупнее, цена 27px */
@media (min-width: 960px) {
  .main-col {
    padding: 12px !important;
  }
  #product-grid {
    gap: 16px 0 !important;
  }
  #product-grid .card-price,
  #product-grid .card-price--sale {
    font-size: 27px !important;
    font-weight: 700 !important;
  }
}

/* Широкий ПК (от 1200 px): каталог шире, карточки такого же размера, как в образце EasyDonate (около 246 px) */
@media (min-width: 1200px) {
  .layout {
    width: min(1360px, calc(100% - 48px));
  }
}

/* Широкий ПК: страница каталога до 1400 px, чтобы карточки были как в образце EasyDonate */
@media (min-width: 1200px) {
  main.page.shell {
    width: min(1400px, calc(100% - 32px));
  }
}

/* Название товара: ровно по левому краю картинки, чуть меньше и ближе к цене — на всех карточках */
#product-grid .card-product .card-title {
  font-size: 18px !important;
  line-height: 1.25 !important;
  margin: 10px 0 4px !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Баннер со скидкой чуть выше (и строка «Сервер» вместе с ним) */
.sale-launch {
  margin-top: -16px !important;
}

/* Телефон: баннер «Запуск нового сайта» ближе к категориям */
@media (max-width: 959px) {
  .sale-launch {
    margin-top: -32px !important;
  }
}

/* Телефон: сумма рилликов отдельной строкой под названием товара */
@media (max-width: 959px) {
  #product-grid .card-product .card-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  #product-grid .card-product .card-bonus {
    display: inline-flex !important;
    align-items: center;
    margin: 0 !important;
  }
}

/* Сумма рилликов сразу под названием, выровнена по левому краю названия (на телефоне) */
@media (max-width: 959px) {
  #product-grid .card-product .card-bonus {
    align-self: flex-start !important;
    margin: 0 !important;
  }
}

/* Телефон: сумма рилликов в той же строке сразу после названия (переносится только если места нет) */
@media (max-width: 959px) {
  #product-grid .card-product .card-title {
    display: block !important;
  }
  #product-grid .card-product .card-bonus {
    display: inline-flex !important;
    align-self: auto !important;
    vertical-align: middle;
    margin: 0 0 0 6px !important;
  }
}

/* Телефон: пилюля рилликов компактнее, чтобы помещалась в строку с названием */
@media (max-width: 959px) {
  #product-grid .card-product .card-bonus {
    font-size: 12px !important;
    padding: 2px 6px !important;
    white-space: nowrap;
  }
  #product-grid .card-product .card-bonus .riliki-ico {
    width: 13px !important;
    height: 13px !important;
  }
}

/* Телефон: блок названия на всю ширину карточки (без боковых отступов), чтобы сумма рилликов встала в строку */
@media (max-width: 959px) {
  #product-grid .card-product .card-title {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Телефон: сумма рилликов ближе к названию (когда переносится на вторую строку) */
@media (max-width: 959px) {
  #product-grid .card-product .card-title {
    line-height: 1.1 !important;
    gap: 0 !important;
  }
  #product-grid .card-product .card-bonus {
    margin-top: 1px !important;
    margin-bottom: 0 !important;
    vertical-align: top;
  }
}

/* Телефон: карточка с меньшими внутренними отступами — блок названия шире, сумма рилликов встаёт в ту же строку */
@media (max-width: 959px) {
  #product-grid .card-product {
    padding: 8px !important;
  }
}

/* Телефон: название 16px, пилюля рилликов 11px, отступы карточки 6px — длинные названия тоже встают в одну строку с суммой */
@media (max-width: 959px) {
  #product-grid .card-product {
    padding: 6px !important;
  }
  #product-grid .card-product .card-title {
    font-size: 16px !important;
  }
  #product-grid .card-product .card-bonus {
    font-size: 11px !important;
    padding: 2px 5px !important;
  }
}

/* Таймер скидки */
.sale-timer{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:3px 12px;border-radius:999px;background:#111;color:#fff;font-weight:600;font-size:13px;font-variant-numeric:tabular-nums;animation:saleTimerPulse 2s infinite}
.sale-timer-v{font-weight:800;color:#fde68a}
@keyframes saleTimerPulse{0%{box-shadow:0 0 0 0 rgba(249,115,22,.55)}70%{box-shadow:0 0 0 10px rgba(249,115,22,0)}100%{box-shadow:0 0 0 0 rgba(249,115,22,0)}}
@media (prefers-reduced-motion: reduce){.sale-timer{animation:none}}

/* Баннер акции: аккуратная раскладка на ПК и телефоне (текст + таймер) */
.sale-launch{flex-wrap:wrap;gap:8px 12px;padding:12px 18px;font-size:15px;line-height:1.4;border-radius:16px}
.sale-launch-text{display:inline}
.sale-launch .sale-timer{margin-left:0;white-space:nowrap}
@media (max-width:480px){
  .sale-launch{flex-direction:column;align-items:center;gap:8px;padding:12px 14px;font-size:14px;text-align:center}
  .sale-launch-text{display:block}
  .sale-launch .sale-timer{font-size:12px;padding:3px 10px}
}
@media (prefers-reduced-motion: reduce){.sale-launch-text{transition:none}}
.sale-timer,.sale-timer-v{font-family:inherit;letter-spacing:.2px}
@media (max-width:959px){.sidebar{padding-bottom:0 !important}}

/* Телефон: размытие фона отключено (слабый GPU, из-за него рывки при смене темы) */
@media (max-width: 959px) {
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Смена темы: на 400 мс сетка товаров скрыта (тест) */
html.theme-switching .grid-products .card-product,
html.theme-switching .grid-products .card-product * { box-shadow: none !important; text-shadow: none !important; }


/* Смена темы: плавный crossfade страницы (View Transitions) */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.2s; }

/* Смена темы: на 400 мс без переходов, анимаций и размытия — телефон не лагает */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
  animation: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Мобильная оптимизация корзины: отдельный слой для выезда, изоляция страницы от перерисовки */
@media (max-width: 959px) {
  .cart-drawer { will-change: transform; contain: layout paint style; }
  .cart-backdrop { will-change: opacity; }
  .main-col, .sidebar { contain: layout paint; }
}

/* Закрытие корзины на телефоне: не менять overflow страницы (лишняя раскладка всего сайта) */
@media (max-width: 959px) {
  html.gg-cart-open { overflow: visible !important; touch-action: auto !important; }
}

/* Корзина на телефоне: без скругления и тени на весь экран (дорогая растеризация слоя) */
@media (max-width: 959px) {
  #cart-drawer.checkout-modal { border-radius: 0 !important; box-shadow: none !important; }
}

/* Корзина на телефоне: без размытия подложки (дорогая перерисовка каждого кадра) */
@media (max-width: 959px) {
  .cart-backdrop { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* Телефон: крестик меню в шапке меньше, визуально как бургер */
@media (max-width: 1199px) {
  .topbar-inner.nav-open .nav-toggle .ico-close { width: 34px; height: 34px; margin: 0 auto; }
}

/* Счётчик в корзине: корзина при 1 шт. и минус одного размера, без скачка тумблера */
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn {
  box-sizing: border-box;
  width: 50px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn svg,
#cart-drawer .cart-line.cl-ez .cart-line-qty .checkout-qty-stepper .checkout-qty-btn.is-trash svg {
  width: 18px;
  height: 18px;
}

/* Тёмная тема: названия карточек товаров (в т.ч. привилегий) светлые, а не чёрные 75% */
html.theme-dark .card-product .card-title,
html.theme-dark #product-grid .card-title,
html.theme-dark .card-product .card-name,
html.theme-dark #product-grid .card-name {
  color: #f4f4f5 !important;
}

/* Tops: custom accessible server/period selects */
.tops-filters label.tops-filter { position: relative; min-width: min(100%, 230px); }
.tops-native-select[data-enhanced] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.tops-custom-select { position: relative; min-width: 0; color: var(--text); font-weight: 500; }
.tops-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 18px;
  text-align: left;
}
.tops-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tops-select-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}
.tops-custom-select.is-open .tops-select-chevron { transform: translateY(2px) rotate(225deg); }
.tops-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  left: 0;
  width: max(100%, 260px);
  max-height: min(360px, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .2);
}
.tops-select-menu[hidden] { display: none; }
.tops-select-group {
  padding: 10px 10px 6px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.tops-select-option {
  display: block;
  width: 100%;
  min-height: 40px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--text) !important;
  text-align: left;
  font-weight: 550 !important;
}
.tops-select-option:hover,
.tops-select-option:focus-visible { background: var(--surface-2) !important; outline: none; }
.tops-select-option.is-selected {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 750 !important;
}
@media (max-width: 480px) {
  .tops-select-menu { width: 100%; }
}

/* Clarity: поле ввода маскируется, поэтому поверх него выводится прозрачная копия текста (внешний вид не меняется) */
.clarity-mirrored:not(:focus) {
  -webkit-text-fill-color: transparent;
}
.clarity-mirrored:focus + .clarity-mirror {
  display: none !important;
}
.clarity-mirror {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
  white-space: pre;
  pointer-events: none;
  margin: 0;
  z-index: 1;
}

/* Цена не попадает под нижние скруглённые углы карточки при наведении. */
#product-grid .card-product {
  height: auto;
  align-self: start;
  padding-bottom: 20px !important;
}
#product-grid .card-product-content {
  height: auto;
}
