/* ========= БАЗА ========= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-main: #020617; /* фон страницы */
  --bg-elevated: #020818; /* фон блоков */
  --bg-glass: rgba(15, 23, 42, 0.82);
  --border-subtle: rgba(148, 163, 184, 0.2);
  --accent: #3b82f6; /* ярко-синий */
  --accent-soft: rgba(59, 130, 246, 0.35);
  --accent-2: #6366f1; /* фиолетово-синий */
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.9);
  --shadow-chip: 0 12px 30px rgba(15, 23, 42, 0.85);
  --transition-fast: 0.16s ease;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: #e5e7eb;

  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.12) 0,
      transparent 45%
    ),
    radial-gradient(
      circle at 80% 120%,
      rgba(129, 140, 248, 0.18) 0,
      transparent 55%
    ),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f9fafb;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
}
p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #d1d5db;
}
.section-subtitle,
.hero p,
.subs-subtitle {
  color: #9ca3af;
}
label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #9ca3af;
}
input,
select {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.btn-primary {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-primary {
  text-transform: none;
}
.service-card h3 {
  font-weight: 600;
}

.service-card p {
  font-size: 0.9rem;
  color: #9ca3af;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ========= ШАПКА ========= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.93),
    rgba(2, 6, 23, 0.88)
  );
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 18px;
}

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

.logo-main {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo-main span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
}

.logo-sub {
  font-size: 0.78rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
}

.nav a {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  color: #e5e7eb;
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.6)
  );
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.85);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(129, 140, 248, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.nav a:hover {
  transform: translateY(-1px);
  background: radial-gradient(
    circle at top left,
    rgba(30, 64, 175, 0.95),
    rgba(15, 23, 42, 0.95)
  );
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45);
}

.nav a:hover::after {
  opacity: 1;
}

.burger {
  display: none; /* по умолчанию спрятан, показываем только в @media */
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.94)
  );
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
  /* ВАЖНО: здесь НЕТ display:flex — он будет в @media */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast);
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease,
    width 0.2s ease;
}

/* средняя полоска чуть короче */
.burger span:nth-child(2) {
  width: 14px;
  opacity: 0.9;
}

/* делаем среднюю полоску чуть короче — смотрится аккуратнее */
.burger span:nth-child(2) {
  width: 14px;
  opacity: 0.9;
}

/* Ховер по бургеру */
.burger:hover {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.7);
  transform: translateY(-1px);
}

/* Состояние "крестика" */
.burger.burger--open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger.burger--open span:nth-child(2) {
  opacity: 0;
}

.burger.burger--open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ========= СЕКЦИИ И АНИМАЦИИ ========= */

.section {
  padding: 5rem 0 5.5rem;
  position: relative;
  opacity: 1;
  transform: translateY(0);
  filter: none;
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease,
    box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.section-alt {
  padding: 5rem 0 5.5rem;
  background: radial-gradient(
      circle at top right,
      rgba(79, 70, 229, 0.18) 0,
      transparent 52%
    ),
    rgba(15, 23, 42, 0.96);
  position: relative;
  opacity: 1;
  transform: translateY(0);
  filter: none;
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease,
    box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

/* Секция появилась (один раз) */
.section-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Активная секция при скролле (подсветка) */
.section-active {
  transform: translateY(-4px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.95);
}

.section-alt.section-active {
  transform: translateY(-4px);
  box-shadow: 0 30px 80px rgba(30, 64, 175, 0.85);
  background: radial-gradient(
      circle at top right,
      rgba(96, 165, 250, 0.24) 0,
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98);
}

.section-title {
  font-size: 1.9rem;
  margin-bottom: 0.75rem;
  margin-top: 0;
  letter-spacing: 0.03em;
}

.section-subtitle {
  max-width: 620px;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========= HERO ========= */

.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(45px);
  opacity: 0.75;
  pointer-events: none;
}

.hero::before {
  width: 260px;
  height: 260px;
  top: -60px;
  left: -40px;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.82),
    transparent 70%
  );
}

.hero::after {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -60px;
  background: radial-gradient(
    circle,
    rgba(129, 140, 248, 0.9),
    transparent 70%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.hero-text h1 span {
  background: linear-gradient(120deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-text p {
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 26px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-muted);
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.85)
  );
}

.hero-card {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  border-radius: var(--radius-lg);
  padding: 22px 20px 24px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(56, 189, 248, 0.18),
    transparent 60%
  );
  opacity: 0.9;
  pointer-events: none;
}

.hero-card-inner {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.hero-card p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.hero-card ul {
  padding-left: 18px;
  margin: 0;
  color: #d1d5db;
  font-size: 0.9rem;
}

/* ========= КНОПКИ ========= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;
  background: radial-gradient(
    circle at top left,
    var(--accent),
    var(--accent-2)
  );
  color: #f9fafb;
  font-weight: 600;
  font-size: 0.96rem;
  box-shadow: 0 14px 38px rgba(59, 130, 246, 0.65);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 18px 45px rgba(59, 130, 246, 0.8);
  filter: saturate(1.1);
}

.btn-primary.full-width {
  width: 100%;
}

/* ========= КАРТОЧКИ УСЛУГ ========= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 26px;
}

.card {
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.94)
  );
  border-radius: var(--radius-md);
  padding: 18px 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at top left,
    rgba(59, 130, 246, 0.28),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  border-color: rgba(59, 130, 246, 0.65);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ========= О НАС ========= */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 28px;
}

.about-grid p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.about-highlight {
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  padding: 18px 18px 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.about-highlight h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.about-highlight ul {
  padding-left: 18px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ========= КАЛЬКУЛЯТОР ========= */

.calculator {
  margin-top: 26px;
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.98)
  );
  border-radius: 26px;
  padding: 22px 20px 24px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.calculator::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at top right,
      rgba(96, 165, 250, 0.16),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(129, 140, 248, 0.12),
      transparent 60%
    );
  opacity: 0.9;
  pointer-events: none;
}

.calculator > * {
  position: relative;
  z-index: 1;
}

.form-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1 1 190px;
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-group label {
  margin-bottom: 6px;
  font-size: 0.86rem;
  color: #e5e7eb;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
}

input[type="number"],
input[type="text"],
select {
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.98);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

/* Кастомный селект со своей стрелкой */
select {
  cursor: pointer;
  padding-right: 38px; /* место под стрелку */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7L10 12L15 7' stroke='%239CA3AF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

/* Ховер для селекта */
select:hover {
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.85);
}

/* Фокус */
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.6),
    0 14px 36px rgba(30, 64, 175, 0.55);
  background: #020617;
  transform: translateY(-1px);
}

input[disabled] {
  opacity: 0.7;
}

/* Убираем стрелки у number-инпута */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

/* Результат */

.result-card {
  margin-top: 18px;
  padding: 16px 14px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-top: 1px solid rgba(96, 165, 250, 0.6);
  box-shadow: var(--shadow-soft);
}

.result-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.result-main {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.result-main span:first-of-type {
  font-weight: 600;
  background: linear-gradient(120deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.result-details {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.result-details p {
  margin: 2px 0;
}

.result-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.hidden {
  display: none;
}

.calculator-note {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.calculator-note ul {
  padding-left: 18px;
}

/* ========= КАК ЗАКАЗАТЬ ========= */

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.steps li {
  position: relative;
  padding: 10px 12px 10px 40px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(
    circle at top left,
    var(--accent),
    var(--accent-2)
  );
  color: #f9fafb;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-chip);
}

/* ========= КОНТАКТЫ ========= */

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 26px;
}

.contacts-list {
  list-style: none;
  padding-left: 0;
}

.contacts-list li {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.contact-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.84rem;
  color: #e5e7eb;
  box-shadow: var(--shadow-chip);
}

.contacts-box {
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========= ФУТЕР ========= */

.footer {
  border-top: 1px solid rgba(30, 64, 175, 0.6);
  background: #020617;
  padding: 16px 0 18px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

/* ========= ГЛОБАЛЬНО: КОГДА МЕНЮ ОТКРЫТО ========= */

body.menu-open {
  overflow: hidden;
}

/* ========= АДАПТИВ ========= */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 800px) {
  .header-inner {
    justify-content: space-between;
  }

  /* ===== БУРГЕР-МЕНЮ (МОБИЛЬНАЯ ВЕРСИЯ) ===== */
  .burger {
    display: none; /* по умолчанию скрыт (десктоп) */
    width: 36px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;

    /* отступ от края */
    margin-right: 6px;
  }

  /* сами полосы */
  .burger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #e5e7eb;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* расстояние между полосами */
  .burger span:not(:last-child) {
    margin-bottom: 6px;
  }

  @media (max-width: 900px) {
    .burger {
      margin-right: 10px;
    }
  }

  .nav {
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    right: 0;
    padding: 12px 18px 20px;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.98),
      rgba(15, 23, 42, 0.96)
    );
    border-bottom: 1px solid rgba(30, 64, 175, 0.7);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.95);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
    z-index: 99;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .nav.nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .nav a {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .about-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .section-alt {
    padding: 3.5rem 0 4rem;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-card {
    margin-top: 10px;
  }
}
/* ========= ПРАЙС ПОДПИСОК ========= */

.subs-pricing {
  margin-top: 18px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
}

.subs-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.subs-title {
  margin: 0;
  font-size: 1.15rem;
}

.subs-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.subs-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.75);
  margin: 12px 0 14px;
  width: fit-content;
}

.subs-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #e5e7eb;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

@media (hover: hover) {
  .subs-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
  }
}

.subs-tab--active {
  background: radial-gradient(
    circle at top left,
    var(--accent),
    var(--accent-2)
  );
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.55);
}

/* Каталог подписок: фирменные цвета вкладок */
.subs-catalog-tabs .subs-tab {
  border-color: rgba(148, 163, 184, 0.22);
}
/* Essential/Основная — бело-серебристый */
.subs-catalog-tabs .subs-tab--tier-essential {
  color: rgba(210, 215, 225, 0.95);
}
/* Extra/Экстра — золотой */
.subs-catalog-tabs .subs-tab--tier-extra {
  color: rgba(251, 191, 36, 0.95);
}
/* Deluxe/Люкс — тёмный графитовый */
.subs-catalog-tabs .subs-tab--tier-deluxe {
  color: rgba(148, 163, 184, 0.95);
}
/* EA Play — насыщенный багрово-красный */
.subs-catalog-tabs .subs-tab--tier-ea {
  color: rgba(248, 113, 113, 0.98);
}

.subs-catalog-tabs .subs-tab--tier-essential.subs-tab--active {
  background: linear-gradient(135deg, rgba(230, 232, 238, 0.98), rgba(188, 194, 206, 0.98));
  border-color: rgba(203, 213, 225, 0.7);
  box-shadow: 0 16px 40px rgba(148, 163, 184, 0.35);
  color: #1e293b;
}
.subs-catalog-tabs .subs-tab--tier-extra.subs-tab--active {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.98), rgba(180, 83, 9, 0.95));
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.4);
  color: #1c1917;
}
.subs-catalog-tabs .subs-tab--tier-deluxe.subs-tab--active {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.98), rgba(30, 41, 59, 0.98));
  border-color: rgba(71, 85, 105, 0.6);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.8);
  color: #f1f5f9;
}
.subs-catalog-tabs .subs-tab--tier-ea.subs-tab--active {
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.98), rgba(127, 29, 29, 0.98));
  border-color: rgba(220, 38, 38, 0.7);
  box-shadow: 0 16px 40px rgba(185, 28, 28, 0.45);
  color: #fff;
}
@media (hover: hover) {
  .subs-catalog-tabs .subs-tab--tier-extra:hover,
  .subs-catalog-tabs .subs-tab--tier-deluxe:hover,
  .subs-catalog-tabs .subs-tab--tier-ea:hover,
  .subs-catalog-tabs .subs-tab--tier-essential:hover {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.55);
  }
}

/* Touch: :active для тактильной отдачи, без hover (устранение залипания) */
@media (hover: none) {
  .subs-tab:active {
    transform: none;
  }
  .subs-tab:not(.subs-tab--active):active {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.06);
  }
}

/* Фокус на мобилке не должен ломать визуал активной кнопки */
.subs-tab:focus {
  outline: none;
}
.subs-tab:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.6);
  outline-offset: 2px;
}

/* PlayStation-loader (△○×□) */
.ps-loader-wrap {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.ps-loader {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px 12px;
  color: rgba(226, 232, 240, 0.92);
  width: min(420px, 100%);
  text-align: center;
}
.ps-loader__symbols {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.ps-loader__sym {
  display: inline-block;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  opacity: 0.55;
  transform: translateY(0);
  animation: psPulse 1.05s ease-in-out infinite;
}
.ps-loader__sym svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Лоадер в скидках: принудительно flex и по центру */
#deals .deals-grid:has(.ps-loader-wrap) {
  display: flex !important;
  justify-content: center;
  align-items: center;
  min-height: 260px;
}
/* Лоадер в подписках: то же */
#subscriptions .subs-catalog-grid:has(.ps-loader-wrap) {
  display: flex !important;
  justify-content: center;
  align-items: center;
  min-height: 260px;
}
.deals-grid .ps-loader-wrap,
.subs-catalog-grid .ps-loader-wrap {
  grid-column: 1 / -1;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.ps-loader-wrap .ps-loader {
  margin: 0 auto;
}
/* Навигация карусели: как было (без плашки), но единый стиль у стрелки/счётчика/кнопки */
.deals-carousel__counter {
  min-width: 72px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.5);
  color: #e5e7eb;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: background 0.15s ease, transform 0.15s ease;
}

/* Подсветка ТОЛЬКО у того элемента, на который навели */
.deals-carousel__counter:hover {
  background: rgba(96, 165, 250, 0.2);
  transform: translateY(-1px);
}

/* Внутри навигации: btn-primary не должен иметь "глоу" */
.deals-carousel__nav .btn-primary,
.subs-catalog-carousel__nav .btn-primary {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: none;
  filter: none;
}
.deals-carousel__nav .btn-primary:hover,
.subs-catalog-carousel__nav .btn-primary:hover {
  box-shadow: none;
  filter: none;
}
.ps-loader__sym--2 { animation-delay: 0.1s; }
.ps-loader__sym--3 { animation-delay: 0.2s; }
.ps-loader__sym--4 { animation-delay: 0.3s; }
.ps-loader__text {
  font-size: 0.92rem;
  color: rgba(148, 163, 184, 0.9);
  text-align: center;
}
@keyframes psPulse {
  0%, 100% { opacity: 0.45; transform: translateY(0) scale(0.98); }
  50% { opacity: 1; transform: translateY(-3px) scale(1.05); }
}

.subs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.subs-card {
  position: relative;
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.92)
  );
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.9);
  overflow: hidden;
  transition: transform var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.subs-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at top left,
    rgba(59, 130, 246, 0.2),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.subs-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
}

.subs-card:hover::before {
  opacity: 1;
}

.subs-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.subs-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.subs-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.subs-info-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(2, 6, 23, 0.5);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.subs-info-btn:hover {
  background: rgba(96, 165, 250, 0.25);
  color: #e5e7eb;
  border-color: rgba(96, 165, 250, 0.5);
}

.subs-info-popover {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 6px;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 50;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.15s ease, opacity 0.15s ease;
  pointer-events: none;
}
/* Глобальная плашка (рендерим в body, позиционируем по кнопке) */
.subs-info-popover--overlay {
  position: fixed;
  left: 12px;
  top: 12px;
  margin-top: 0;
  z-index: 10050;
  max-width: min(320px, calc(100vw - 24px));
  transform: translateY(2px);
  transition: visibility 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.subs-info-popover--overlay.is-open {
  transform: translateY(0);
}
.subs-name-wrap:hover .subs-info-popover,
.subs-info-popover.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.subs-info-popover__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 8px;
}
.subs-info-popover ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
@media (hover: none) {
  .subs-name-wrap:hover .subs-info-popover {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

.subs-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.55);
  color: #e5e7eb;
}

/* "Что входит" (details) */
.subs-details {
  margin: 0 0 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.subs-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #e5e7eb;
  list-style: none;
}
.subs-details summary::-webkit-details-marker {
  display: none;
}
.subs-details summary::after {
  content: "▾";
  float: right;
  opacity: 0.75;
  transition: transform 0.18s ease;
}
.subs-details[open] summary::after {
  transform: rotate(180deg);
}
.subs-details ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.subs-lines {
  display: grid;
  gap: 8px;
}

.subs-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.subs-line strong {
  color: var(--text-main);
  font-weight: 700;
}

.subs-note {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}
.subs-grid.hidden {
  display: none;
}

/* Выбор каталога по подписке */
.subs-catalog-choice {
  margin-top: 16px;
  margin-bottom: 12px;
}
.subs-catalog-choice__label {
  margin: 0 0 10px;
  font-weight: 600;
  color: #e5e7eb;
  font-size: 0.95rem;
}
.subs-catalog-panel {
  margin-top: 12px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}
.subs-catalog-deluxe-tabs {
  margin-bottom: 12px;
}
.subs-catalog-deluxe-tabs.hidden {
  display: none;
}

.subs-catalog-note {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.subs-catalog-tabs {
  margin: 0 0 4px;
}

/* Мобилка: вкладки подписок и разделов — одна линия + горизонтальный скролл внутри */
@media (max-width: 900px) {
  .subs-tabs.subs-catalog-tabs {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .subs-tabs.subs-catalog-tabs::-webkit-scrollbar {
    display: none;
  }
  .subs-tabs.subs-catalog-tabs .subs-tab {
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  /* Разделы каталога (Игры месяца/Каталог игр/Ubisoft+/Классика) */
  #catalogDeluxeTabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.75);
    margin: 0 0 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #catalogDeluxeTabs::-webkit-scrollbar {
    display: none;
  }
  #catalogDeluxeTabs .subs-tab {
    flex: 0 0 auto;
    flex-shrink: 0;
  }
}

.subs-catalog-sort-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 10px 0 12px;
}
.subs-catalog-note {
  margin: 0;
}
.subs-catalog-sort {
  display: flex;
  gap: 6px;
}
.subs-catalog-sort-btn {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.5);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.subs-catalog-sort-btn:hover {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.4);
}
.subs-catalog-sort-btn.subs-catalog-sort-btn--active {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  color: #fff;
}

.subs-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 900px) {
  .subs-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Карусель каталога подписок */
.subs-catalog-carousel {
  overflow: hidden;
  margin-bottom: 12px;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}
.subs-catalog-carousel__track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}
.subs-catalog-carousel__page {
  flex: 0 0 100%;
  min-width: 0;
}
.subs-catalog-carousel__page .subs-catalog-grid {
  width: 100%;
}
.subs-catalog-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.subs-catalog-carousel__prev,
.subs-catalog-carousel__next {
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.5);
  color: #e5e7eb;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.subs-catalog-carousel__prev:hover:not(:disabled),
.subs-catalog-carousel__next:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.2);
}
.subs-catalog-carousel__prev:disabled,
.subs-catalog-carousel__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.subs-catalog-carousel__counter {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 3ch;
}

.subs-catalog-store-link {
  font-size: 0.9rem;
  color: rgba(96, 165, 250, 0.95);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.subs-catalog-store-link:hover {
  color: #93c5fd;
}
.subs-catalog-carousel__nav .subs-catalog-store-link {
  margin-left: 8px;
}

.psplus-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.psplus-card:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(15, 23, 42, 0.86);
}
.psplus-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}
.psplus-cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.9);
  object-fit: none;
}
.psplus-cover-placeholder-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.5);
  letter-spacing: 0.02em;
}
.psplus-title {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
}
.psplus-open {
  font-size: 0.86rem;
  color: rgba(96, 165, 250, 0.95);
  text-decoration: none;
  font-weight: 600;
}
.psplus-open:hover {
  text-decoration: underline;
}
.subs-catalog-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.service-card {
  cursor: pointer;
}

.service-card:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.9);
  outline-offset: 3px;
}
/* Шапка прайса подписок: заголовок + тип покупки */
.subs-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.subs-type {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.subs-type-label {
  font-size: 0.78rem;
  color: #e5e7eb;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
#orderBtn {
  font-size: 1rem;
  font-weight: 600;
}

#orderBtn::after {
  content: " →";
}
/* Выравнивание логотипа в шапке */
.logo {
  padding-left: 6px;
}

/* Чуть больше воздуха на десктопе */
@media (min-width: 768px) {
  .logo {
    padding-left: 10px;
  }
}
.logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

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

.logo-link:active {
  opacity: 0.85;
}

.logo {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo:hover {
  transform: translateY(-1px);
}
html {
  scroll-behavior: smooth;
}
/* --- Fix: iOS zoom on input focus --- */
@media (max-width: 800px) {
  input[type="number"],
  input[type="text"],
  select,
  textarea {
    font-size: 16px; /* важно: не меньше 16px на iOS */
  }

  /* На мобилке лучше не двигать поля при фокусе */
  input[type="number"]:focus,
  input[type="text"]:focus,
  select:focus,
  textarea:focus {
    transform: none;
  }
}
/* Строки прайса подписок — при нажатии/выборе: зелёная обводка и подсветка */
.subs-line {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

/* Нажатие и выбрано (в корзине): тёмный бирюзовый фон + зелёная обводка + зелёное свечение */
.subs-line:active,
.subs-line.subs-line--in-cart {
  border-color: rgba(50, 132, 123, 0.95);
  background: rgba(24, 44, 49, 0.95);
  box-shadow: 0 0 12px rgba(50, 132, 123, 0.35), 0 0 24px rgba(50, 132, 123, 0.15);
  color: rgba(255, 255, 255, 0.98);
}
.subs-line:active strong,
.subs-line.subs-line--in-cart strong {
  color: #fff;
}

/* Блок оформления подписки */
.subs-order {
  margin-top: 14px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.subs-picked {
  margin-bottom: 10px;
  color: #e5e7eb;
  font-size: 0.92rem;
}
/* Ссылки в блоке контактов */
.contact-link {
  color: #60a5fa;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.contact-link:hover {
  color: #93c5fd;
  opacity: 0.9;
}

.contact-link:active {
  opacity: 0.8;
}
/* ===== АНИМАЦИЯ БУРГЕР → КРЕСТИК ===== */

.burger span {
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger.burger--open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.burger.burger--open span:nth-child(2) {
  opacity: 0;
}

.burger.burger--open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
/* FIX: бургер гарантированно виден на мобилке */
.burger {
  display: none;
}

@media (max-width: 900px) {
  :root {
    --header-height: 60px;
  }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  body {
    padding-top: var(--header-height);
  }

  .burger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    width: 36px;
    height: 32px;
    padding: 0;
    margin-right: 10px; /* отступ от края */
    background: none;
    border: none;
    cursor: pointer;
  }

  .burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
  }

  .burger span:not(:last-child) {
    margin-bottom: 6px;
  }
}
/* Чтобы якорные ссылки не прятали заголовки под фиксированным header */
:root {
  --header-offset: 88px;
}

section[id] {
  scroll-margin-top: var(--header-offset);
}

@media (max-width: 900px) {
  :root {
    --header-offset: 100px;
  }
}
/* чтобы клик по кнопке НЕ открывал модалку — обработаем в JS */
/* ===== MODAL ===== */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  margin: 4vh auto;
  width: min(720px, 92vw);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.modal-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: start;
}

.modal-cover {
  width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(0, 0, 0, 0.25);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.modal-price {
  margin-top: 6px;
  font-size: 16px;
  opacity: 0.9;
  font-weight: 700;
}

.modal-buy {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.modal-cards {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 12px 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.info-row:last-child {
  border-bottom: none;
}
.info-row span {
  opacity: 0.7;
}
.info-row strong {
  font-weight: 800;
  text-align: right;
}

@media (max-width: 560px) {
  .modal-head {
    grid-template-columns: 120px 1fr;
  }
  .modal-cover {
    width: 120px;
  }
}
#dealModalRelease {
  display: none;
}
.deals-head {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
/* Карусель скидок в шапке занимает всю ширину строки */
.deals-head .deals-carousel {
  width: 100%;
  flex-basis: 100%;
}

.deals-sort {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Карусель скидок: страницы влево-вправо */
.deals-carousel {
  overflow: hidden;
  margin-bottom: 10px;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}
.deals-carousel__track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}
.deals-carousel__page {
  flex: 0 0 100%;
  min-width: 0;
}
.deals-carousel__page .deals-grid {
  width: 100%;
}
.deals-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.deals-carousel__prev,
.deals-carousel__next {
  min-width: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.5);
  color: #e5e7eb;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.deals-carousel__prev:hover:not(:disabled),
.deals-carousel__next:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.2);
  transform: translateY(-1px);
}
.deals-carousel__prev:disabled,
.deals-carousel__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.deals-carousel__counter {
  min-width: 72px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.5);
  color: #e5e7eb;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: background 0.15s ease, transform 0.15s ease;
}

.deals-carousel__counter:hover {
  background: rgba(96, 165, 250, 0.2);
  transform: translateY(-1px);
}

.deals-footer {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.cart-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
}
.deals-sort {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Новая компактная корзина справа */
.cart-icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.cart-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
}

.cart-ico {
  font-size: 18px;
  line-height: 1;
}

/* бейдж поверх кнопки */
.cart-icon-btn .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  font-size: 12px;
  background: rgba(40, 120, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* Плавающая кнопка корзины (справа снизу) */
.cart-float-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  z-index: 9998;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  animation: cart-float-bob 2.8s ease-in-out infinite;
  will-change: transform;
}

.cart-float-btn::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.35) 0%,
    rgba(59, 130, 246, 0.0) 62%
  );
  opacity: 0.55;
  transform: scale(0.96);
  filter: blur(0.2px);
  pointer-events: none;
  animation: cart-float-pulse 1.9s ease-in-out infinite;
}

.cart-float-btn:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
  animation-play-state: paused;
}

.cart-float-btn:active {
  transform: translateY(1px);
}

.cart-float-btn .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(40, 120, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.cart-float-btn .cart-badge:empty {
  display: none;
}

@keyframes cart-float-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes cart-float-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-float-btn,
  .cart-float-btn::before {
    animation: none !important;
  }
}

@supports (bottom: env(safe-area-inset-bottom)) {
  .cart-float-btn {
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

.cart-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.cart-modal.hidden {
  display: none;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cart-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: #0b1220;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cart-title {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.cart-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.cart-body {
  flex: 1;
  overflow: auto;
  padding: 12px 2px;
}
.cart-empty {
  opacity: 0.7;
  padding: 16px 0;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.cart-item img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.cart-item-title {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  line-height: 1.2;
}
.cart-item-meta {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 4px;
}
.cart-item-price {
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
}

/* Если у позиции нет картинки (например подписка) */
.cart-item-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  flex: 0 0 44px;
}

.cart-remove {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.85;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-decoration: underline;
}

.cart-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-secondary {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}
.cart-icon-btn .cart-badge:empty {
  display: none;
}

/* ===== DEALS: один финальный стиль (без дублей) ===== */

.deals-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1200px) {
  .deals-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .deals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.deal-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}

.deal-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.03);
}

.deal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deal-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: rgba(40, 120, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.deal-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.deal-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
  opacity: 0.95;
}

.deal-priceRow {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deal-rub {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2px;
  color: #fff;
}

.deal-ps {
  font-size: 12px;
  opacity: 0.75;
  color: #fff;
}

/* ✅ вот тут лечим “кривые кнопки” */
.deal-actions:has(.deal-btn:only-child) {
  grid-template-columns: 1fr;
}

/* общий стиль для КНОПКИ и ССЫЛКИ */
.deal-btn {
  height: 44px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;

  /* ✅ reset чтобы button не был “кривой” по умолчанию */
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  line-height: 1;
  font: inherit;
  box-sizing: border-box;
}

/* В корзину */
.deal-cart {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.deal-cart:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
}

/* Купить */
.deal-buy {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}
.deal-buy:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

/* Состояние кнопки "В корзине" */
.deal-buy.deal-buy--in-cart {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.35);
  color: rgba(240, 253, 244, 0.98);
}
.deal-buy.deal-buy--in-cart:hover {
  transform: none;
  background: rgba(34, 197, 94, 0.2);
}

/* ✅ страховка: чтобы <a> выглядел как кнопка */
.deal-buy:visited {
  color: #fff;
}
/* ===== DEALS polish: cursor + badge + price (put at END of style.css) ===== */

/* карточка кликабельная */
.deal-card {
  cursor: pointer;
}

/* чтобы при наведении было "живее" */
.deal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.055);
}

/* чуть мягче тень при наведении */
.deal-card:hover .deal-media {
  filter: brightness(1.03) contrast(1.02);
}

/* ПЛАШКА СКИДКИ */
.deal-badge {
  left: 12px;
  bottom: 12px;

  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;

  border-radius: 999px;
  color: #ffffff;

  /* стеклянный градиент */
  background: linear-gradient(
    135deg,
    rgba(100, 10, 235, 0.92),
    rgba(16, 78, 177, 0.92),
    rgba(99, 102, 241, 0.92)
  );

  border: 1px solid rgba(255, 255, 255, 0.22);

  /* мягкое свечение */
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.25),
    0 2px 10px rgba(0, 0, 0, 0.35);

  backdrop-filter: blur(6px);
}

/* маленький "%" как аккуратная деталь */
.deal-badge::after {
  content: "%";
  opacity: 0.75;
  margin-left: 2px;
  font-weight: 800;
}

/* ЦЕНА */
.deal-rub {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.05;
}

/* знак рубля чуть меньше */
.deal-rub::after {
  content: "";
}

/* если у тебя рубль выводится как "3490 ₽" текстом — можно слегка стилизовать ₽ через span,
   но без правки HTML сделаем общий акцент на строку цены */
.deal-priceRow {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

/* мелкая строка (psOffer) чуть аккуратнее */
.deal-ps {
  opacity: 0.78;
}
/* FIX mobile: фон/градиенты не должны перекрывать контент скидок */
#dealsGrid,
.deal-card,
.deals-controls,
.deals-header {
  position: relative;
  z-index: 2;
}

/* Если у секции/блока скидок есть псевдо-элементы фона — уводим их назад */
#dealsSection::before,
#dealsSection::after,
.deals::before,
.deals::after,
.section::before,
.section::after {
  z-index: 0;
}
@media (max-width: 900px) {
  .deal-card,
  #dealsGrid {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
/* На всякий: скидки не должны оставаться "невидимыми" */
#dealsGrid,
.deal-card {
  opacity: 1;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;

  max-width: min(92vw, 520px);
  padding: 12px 14px;
  border-radius: 12px;

  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  font-size: 14px;
  line-height: 1.25;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--success {
}
.toast--error {
  background: rgba(160, 25, 25, 0.92);
}
.mini-cart {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;

  background: rgba(10, 14, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1px 12px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mini-cart__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-cart__text {
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.mini-cart__open {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
body {
  padding-bottom: 90px;
}
/* затемнение/оверлей пусть остается как есть */

/* ВАЖНО: это контейнер самой корзины внутри модалки */
.cart-modal-content {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: 75vh;
  overflow: auto;

  border-radius: 16px;
}

/* На десктопе можно оставить как было */
@media (min-width: 900px) {
  .cart-modal-content {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    max-height: 80vh;
  }
}
/* ===== Mobile cart: bottom-sheet стиль ===== */
@media (max-width: 720px) {
  .cart-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;

    max-height: 72vh; /* высота меньше экрана */
    overflow: hidden; /* чтобы футер не вылезал */

    border-radius: 16px;
  }

  .cart-body {
    overflow: auto; /* скролл внутри списка */
    max-height: calc(72vh - 140px); /* подстройка под head+foot */
  }
}
/* =========================================
   HELPERS
========================================= */
.hidden {
  display: none !important;
}

/* Чтобы нижняя панель не налезала на контент (особенно на мобилке).
   Если у тебя уже есть padding снизу — можно убрать. */
body {
  padding-bottom: 84px;
}
@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
}

/* =========================================
   ✅ DEALS SEARCH (заменено на блок из 2-го CSS)
   - убраны все дубли из 1-го CSS
   - фикс двойного "x" на iOS (native cancel hidden)
========================================= */
.deals-search {
  width: 100%;
  margin: 10px 0 14px;
}

.deals-search__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.deals-search__field {
  position: relative;
  flex: 1;
  min-width: 0;
}

/* Input */
.deals-search__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 44px 10px 12px; /* space for clear inside */
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.98);
  color: inherit;
  outline: none;
}

/* FIX: iOS Safari native clear (the 2nd x) */
.deals-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.deals-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.deals-search__input:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

/* Clear "x" inside input */
.deals-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

@media (hover: hover) {
  .deals-search__clear:hover {
    background: rgba(255, 255, 255, 0.14);
  }
}

/* Close favorites button (right) */
.deals-fav-close {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.deals-fav-close.hidden {
  display: none;
}

@media (hover: hover) {
  .deals-fav-close:hover {
    background: rgba(255, 255, 255, 0.11);
  }
}

/* =========================================
   FAVORITES (сердечко на карточке)
========================================= */
.deal-media {
  position: relative; /* важно: чтобы сердце позиционировалось внутри обложки */
}

/* Кнопка-сердце поверх картинки */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.78);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;

  /* сердечко */
  font-size: 25px;
  line-height: 1;
  padding: 0;

  transition: transform 0.08s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

/* нажатие */
.fav-btn:active {
  transform: scale(0.95);
}

/* hover на десктопе */
@media (hover: hover) {
  .fav-btn:hover {
    background: rgba(0, 0, 0, 0.46);
    border-color: rgba(255, 255, 255, 0.26);
  }
}

/* активное (красное) */
.fav-btn--active {
  background: rgba(0, 0, 0, 0.414);
  border-color: rgba(255, 0, 60, 0.45);
  color: rgb(186, 6, 42);
}

/* чуть меньше на маленьких экранах */
@media (max-width: 420px) {
  .fav-btn {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

/* =========================================
   FAVORITES BUTTON IN HEADER (рядом с корзиной)
========================================= */
.header-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 8px 10px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.06s ease;
}

.header-fav-btn:active {
  transform: translateY(1px);
}

@media (hover: hover) {
  .header-fav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }
}

.header-fav-btn__icon {
  font-size: 25px;
  line-height: 1;
  opacity: 0.9;
}

.header-fav-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 0, 60, 0.18);
  border: 1px solid rgba(255, 0, 60, 0.35);
  color: rgba(255, 140, 160, 1);
}

/* Если счётчика нет — он пустой и визуально не мешает */
.header-fav-btn__count:empty {
  display: none;
}

/* =========================================
   FAVORITES BUTTON IN MODAL (рядом с "Купить")
========================================= */
.modal-head-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* контейнер под кнопки, если нужно — но мы не меняем HTML,
   поэтому делаем кнопку "modal-fav" маленькой и "рядом" */
.modal-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* кнопка-сердце рядом с Купить */
.modal-fav {
  margin-left: 10px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  transition: background 0.2s ease, transform 0.06s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.modal-fav:active {
  transform: translateY(1px);
}

@media (hover: hover) {
  .modal-fav:hover {
    background: rgba(255, 255, 255, 0.12);
  }
}

.modal-fav--active {
  background: rgba(255, 0, 60, 0.22);
  border-color: rgba(255, 0, 60, 0.45);
  color: rgba(255, 90, 120, 1);
}

/* =========================================
   TOAST (Игра добавлена в корзину)
========================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 20, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateX(-50%) translateY(8px);
  font-size: 14px;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--success {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.toast--error {
  border-color: rgba(255, 80, 80, 0.45);
}

/* =========================================
   MINI CART BAR (нижняя панель корзины)
========================================= */
.mini-cart {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 20px));
  z-index: 9998;

  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 16, 16, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.mini-cart__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.mini-cart__text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.mini-cart__label {
  opacity: 0.85;
  font-size: 14px;
}

.mini-cart__count,
.mini-cart__sum {
  font-weight: 700;
  font-size: 15px;
}

.mini-cart__dot {
  opacity: 0.55;
}

.mini-cart__rub {
  opacity: 0.85;
  margin-left: 2px;
}

.mini-cart__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-cart__open {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.2s ease;
}

.mini-cart__open:active {
  transform: translateY(1px);
}

@media (hover: hover) {
  .mini-cart__open:hover {
    background: rgba(255, 255, 255, 0.14);
  }
}

/* На десктопе можно сделать чуть компактнее */
@media (min-width: 900px) {
  .mini-cart {
    bottom: 16px;
    width: 420px;
  }
}

/* =========================================
   CART MODAL: сделать аккуратнее на мобилке
   (чтобы не занимала "почти весь экран")
========================================= */
.cart-panel {
  /* если у тебя уже есть размеры — этот блок слегка их корректирует */
  width: min(520px, calc(100% - 22px));
  max-height: min(72vh, 640px);
  border-radius: 18px;
  overflow: hidden;
}

/* мобилка: чуть выше и меньше высота */
@media (max-width: 560px) {
  .cart-panel {
    width: calc(100% - 18px);
    max-height: 68vh;
    border-radius: 18px;
  }
}

/* внутренний скролл */
.cart-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* =========================================
   FIX: когда открыта модалка (корзина/меню) — нижняя панель не мешает
   Если ты добавляешь/убираешь menu-open на body — это сработает.
========================================= */
body.menu-open .mini-cart {
  display: none !important;
}

/* (ВАЖНО) В 1-м CSS было множество дублей блоков поиска скидок.
   Я удалил все старые .deals-search* блоки и оставил только один (выше),
   чтобы не было конфликтов и чтобы iOS фикс работал стабильно. */
/* ===== MODAL: buy + fav в одну строку (как на фото 1) ===== */

/* ВАЖНО: если у тебя есть контейнер .modal-head-info — убираем flex-column,
   иначе две кнопки встанут столбиком */
.modal-head-info {
  display: block !important;
}

/* делаем “Купить” НЕ на всю ширину, чтобы рядом поместилось сердце */
.modal-buy {
  display: inline-flex !important;
  width: auto !important;
  min-width: 140px; /* можно 130-160 по вкусу */
  margin-top: 12px;
  vertical-align: middle;
}

/* сердце рядом */
.modal-fav {
  display: inline-grid !important;
  margin-top: 12px;
  margin-left: 10px;
  vertical-align: middle;
}
/* =========================================
   HEADER ICON BUTTONS: фиксируем ширину,
   бейджи сверху (чтобы ничего не выталкивало)
========================================= */

/* 1) контейнер в шапке не должен давать горизонтальный скролл */
.header-inner {
  min-width: 0;
}

/* если у тебя есть обертка для иконок справа — лучше.
   назови её как есть (например .header-actions), но если нет — пропусти */
.header-actions,
.header-right,
.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* 2) обе кнопки ОДИНАКОВЫЕ по размеру */
.header-fav-btn,
.cart-icon-btn {
  position: relative;
  flex: 0 0 44px; /* НЕ растём */
  width: 44px;
  height: 44px;
  border-radius: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);

  cursor: pointer;
  padding: 0; /* важно: ничего не раздувает */
  overflow: visible; /* бейдж может выходить наружу */
  transition: transform 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.header-fav-btn:hover,
.cart-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.header-fav-btn:active,
.cart-icon-btn:active {
  transform: translateY(1px);
}

/* 3) убираем влияние текста/счётчика на ширину (если вдруг есть) */
.header-fav-btn__text {
  display: none;
}

/* 4) бейджи одинаково позиционируем сверху справа */
.header-fav-btn__count,
.cart-icon-btn .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;

  min-width: 22px;
  height: 22px;
  padding: 0 7px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}

/* цвета как у тебя */
.cart-icon-btn .cart-badge {
  background: rgba(40, 120, 255, 0.95);
}

.header-fav-btn__count {
  background: rgba(255, 64, 129, 0.22);
  border-color: rgba(255, 64, 129, 0.38);
}

/* если пусто — скрыть */
.cart-icon-btn .cart-badge:empty,
.header-fav-btn__count:empty {
  display: none;
}

/* 5) на всякий случай: чтобы ничего не “разъезжалось” на мобилке */
@media (max-width: 560px) {
  .header-inner {
    gap: 10px;
  }
}
/* ===== FIX: cart/fav badge pushes layout on mobile ===== */

/* Страховка от горизонтального скролла */
html,
body {
  overflow-x: clip;
} /* лучше чем hidden на iOS */
@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

/* Контейнер с сортировкой: пусть умеет ужиматься */
.deals-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0; /* критично для flex, чтобы select мог сжиматься */
}

/* Лейбл "Сортировка" не должен растягивать строку */
.deals-sort .subs-type-label {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Select должен сжиматься, а не выталкивать кнопки */
.deals-sort .subs-type {
  flex: 1 1 auto;
  min-width: 0; /* критично */
  max-width: 100%;
}

/* Если 0 — не показывать (у тебя JS уже делает "" иногда, но подстрахуемся) */
.cart-icon-btn .cart-badge:empty {
  display: none;
}

/* Доп. защита: на очень узких экранах можно чуть уменьшить gap */
@media (max-width: 380px) {
  .deals-sort {
    gap: 8px;
  }
  .cart-icon-btn,
  .header-fav-btn {
    width: 42px;
    height: 42px;
  }
}
/* iOS Safari: не зумить страницу при фокусе на input */
@media (max-width: 900px) {
  #dealsSearchInput {
    font-size: 16px; /* ключевое */
    line-height: 1.2;
  }

  /* если у тебя внутри поля есть кнопки × — тоже фиксируем */
  .deals-search__clear,
  .deals-fav-close {
    font-size: 16px;
  }
}

/* =========================================================
   Touch devices: отключаем "залипающий hover" после тапа
   (iOS/Android могут держать :hover до следующего тапа)
========================================================= */
@media (hover: none) {
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Убираем hover у ВСЕХ кнопок и интерактивных элементов */
  a:hover,
  button:hover,
  [role="button"]:hover {
    transform: none !important;
    filter: none !important;
  }

  /* subs-tab: явный сброс — region tabs (Европа/Турция) + catalog tabs (Основная/Экстра/Люкс/EA) */
  .subs-tab:hover {
    transform: none !important;
  }
  .subs-tab:not(.subs-tab--active):hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
  .subs-catalog-tabs .subs-tab:not(.subs-tab--active):hover {
    border-color: rgba(148, 163, 184, 0.22) !important;
  }

  /* Навигация */
  .nav a:hover {
    transform: none;
    background: radial-gradient(
      circle at top left,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.6)
    );
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.85);
  }
  .nav a:hover::after {
    opacity: 0;
  }

  .burger:hover {
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
    transform: none;
  }

  /* Primary buttons */
  .btn-primary:hover {
    transform: none;
    box-shadow: 0 14px 38px rgba(59, 130, 246, 0.65);
    filter: none;
  }

  /* Cards (главная) */
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
    border-color: rgba(148, 163, 184, 0.25);
  }
  .card:hover::before {
    opacity: 0;
  }

  /* Form controls */
  select:hover {
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: none;
  }

  /* Subscription cards + info button */
  .subs-card:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.9);
  }
  .subs-card:hover::before {
    opacity: 0;
  }
  .subs-info-btn:hover {
    background: rgba(2, 6, 23, 0.5);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.45);
  }

  /* Deals + Catalog nav buttons/counters */
  .deals-carousel__prev:hover:not(:disabled),
  .deals-carousel__next:hover:not(:disabled),
  .subs-catalog-carousel__prev:hover:not(:disabled),
  .subs-catalog-carousel__next:hover:not(:disabled),
  .deals-carousel__counter:hover {
    background: rgba(2, 6, 23, 0.5);
    transform: none;
  }

  /* Catalog link */
  .subs-catalog-store-link:hover {
    color: rgba(96, 165, 250, 0.95);
  }

  /* PS Plus items */
  .psplus-card:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.7);
  }


  /* Cart / header buttons */
  .cart-btn:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.06);
  }
  .cart-icon-btn:hover,
  .header-fav-btn:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
  }
  .cart-float-btn:hover {
    transform: none;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    animation-play-state: running;
  }

  /* Deal card + deal buttons */
  .deal-cart:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.06);
  }
  .deal-buy:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
  }
  .deal-buy.deal-buy--in-cart:hover {
    transform: none;
    background: rgba(34, 197, 94, 0.16);
  }
  .deal-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
  }
  .deal-card:hover .deal-media {
    filter: none;
  }
}

/* Общий фокус: показываем только для клавиатуры */
button:focus,
a:focus {
  outline: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.6);
  outline-offset: 2px;
}
