/* Тёмный игровой дизайн. Цвета — в блоке :root, можно менять. */
:root {
  --bg: #0b0d17;
  --surface: #141828;
  --surface-2: #1b2036;
  --line: #262c47;
  --text: #e9ecf5;
  --muted: #98a0bb;
  --accent: #2f6bff;      /* основной синий */
  --accent-2: #7a4dff;    /* фиолетовый для градиентов */
  --tg: #229ed9;
  --green: #2ecc71;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg) url(../images/bg.jpg) center top / cover fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: 84px; /* место под плавающую кнопку */
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 13, 23, .88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand__logo {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 18px rgba(47, 107, 255, .45);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__text b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar__right .btn--tg { display: none; } /* на телефоне есть плавающая кнопка */

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.icon-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.searchrow { position: relative; padding-top: 4px; padding-bottom: 6px; }
.searchrow[hidden] { display: none; }
.searchrow input {
  width: 100%; font: inherit; font-size: 16px; /* 16px — чтобы iPhone не приближал страницу */
  color: var(--text); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 46px 12px 14px;
}
.searchrow input:focus { outline: none; border-color: var(--accent); }
.searchrow__x {
  position: absolute; right: 20px; top: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.searchrow__x[hidden] { display: none; }
.lang[hidden] { display: none; }
.lang { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang button { background: none; border: 0; color: var(--muted); font: 600 12px/1 inherit; padding: 8px 10px; cursor: pointer; }
.lang button.on { background: var(--accent); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 6px; padding-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line);
}
.chip:active { background: var(--surface-2); }
.chip--alt { color: var(--muted); font-weight: 500; }

/* ---------- Кнопки и теги ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; border: 0; cursor: pointer;
  font: 700 15px/1.2 inherit; text-decoration: none; color: #fff;
  transition: transform .12s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn--tg { background: linear-gradient(135deg, #2aabee, #1d86c7); box-shadow: 0 6px 18px rgba(34, 158, 217, .3); }
.btn--tg:hover { filter: brightness(1.1); }
.btn--buy { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 18px rgba(47, 107, 255, .35); }
.btn--buy:hover { filter: brightness(1.1); }
.btn--block { width: 100%; }
.btn.is-disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }
.btn--small { padding: 8px 12px; font-size: 13px; }
.btn--big { padding: 15px 24px; font-size: 17px; border-radius: 14px; }

.tag {
  display: inline-block; font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--text);
}
.tag--accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 700; }
.tag--small { font-size: 11.5px; padding: 2px 8px; background: var(--surface-2); color: var(--muted); }

/* ---------- Главный баннер ---------- */
.hero {
  position: relative; overflow: hidden; margin-top: 14px; display: flex; flex-direction: column;
  border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--bg));
}
.hero__media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #2f6bff, #7a4dff 55%, #ff3d81); }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero__body { padding: 18px 18px 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero h1 { font-size: clamp(28px, 8vw, 46px); line-height: 1.08; letter-spacing: -.5px; }
.hero__desc { color: #d3d8ea; max-width: 520px; font-size: 15px; }
.hero__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 6px; }
.hero__price .price { font-size: 30px; }

.price { font-weight: 800; font-size: 18px; }
.price--note { font-size: 14px; font-weight: 700; color: var(--muted); }
.hero__price .price--note { font-size: 18px; }
.from { color: var(--muted); font-size: 13px; font-weight: 600; }
.old { color: var(--muted); font-size: 14px; }
.off { background: var(--green); color: #04210f; font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 8px; }

/* ---------- Разделы и карточки ---------- */
.section { padding-top: 34px; scroll-margin-top: 112px; }
.center { text-align: center; padding-top: 30px; }
.subhead { font-size: 18px; margin: 26px 0 12px; color: var(--muted); }
.section h2 { font-size: 24px; letter-spacing: -.3px; margin-bottom: 14px; }
.section h2 + .muted { margin-top: -8px; margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.card__media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #2f6bff, #7a4dff 55%, #ff3d81); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; background: #ffb020; color: #2b1d00; font-weight: 800; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; flex: 1; }
.card__title { font-size: 15px; line-height: 1.25; }
.card__desc {
  color: var(--muted); font-size: 12.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__price { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.card__price .price { font-size: 16px; }
.card .btn { width: 100%; margin-top: 6px; }

/* ---------- Как купить ---------- */
.steps { list-style: none; display: grid; gap: 10px; }
.step { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.step__n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.step b { display: block; margin-bottom: 2px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
summary { list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { padding: 0 16px 14px; color: var(--muted); font-size: 14.5px; }

/* ---------- Контакты ---------- */
.contact-card {
  text-align: center; padding: 28px 18px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 50% 0%, rgba(47,107,255,.22), transparent 60%), var(--surface);
}
.contact-card .muted { margin-bottom: 18px !important; margin-top: 0 !important; }
.contact-extra { margin-top: 16px; color: var(--muted); font-size: 14px; }
.contact-extra a { color: var(--text); }

.footer { margin-top: 36px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Плавающая кнопка Telegram ---------- */
.float-tg {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #fff;
  padding: 13px 18px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, #2aabee, #1d86c7);
  box-shadow: 0 8px 24px rgba(34, 158, 217, .45);
}

/* ---------- Окно покупки ---------- */
body.no-scroll { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 14, .72); backdrop-filter: blur(3px); }
.modal__sheet {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__x {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
}
.modal__title { font-size: 21px; line-height: 1.2; padding-right: 44px; }
.modal__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin: 6px 0 14px; }
.modal__label { color: var(--muted); font-size: 13px; font-weight: 600; margin: 14px 0 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  font: 600 14px/1 inherit; color: var(--text); background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; cursor: pointer;
}
.opt small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.amount {
  width: 100%; font: 700 18px/1 inherit; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.amount:focus { outline: none; border-color: var(--accent); }
.modal__note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.opt.on { border-color: var(--accent); background: rgba(47, 107, 255, .2); }
.modal__info { margin: 18px 0 16px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.modal__info ul { margin: 8px 0 0 18px; color: var(--muted); display: grid; gap: 6px; }
.modal__hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---------- Планшет и компьютер ---------- */
@media (min-width: 760px) {
  .modal { align-items: center; }
  .modal__sheet { border-radius: 22px; border-bottom: 1px solid var(--line); }
  .topbar__right .btn--tg { display: inline-flex; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero { display: block; }
  .hero__media { position: absolute; inset: 0; aspect-ratio: auto; }
  .hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,13,23,.95) 0%, rgba(11,13,23,.78) 36%, rgba(11,13,23,0) 68%); }
  .hero__body { position: relative; max-width: 580px; min-height: 440px; padding: 48px; justify-content: center; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .card__title { font-size: 16px; }
  .card__desc { font-size: 13.5px; }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
