/* Витрина: товары | тарифы и заказ | описание и инструкция, окна заказа и «Мои покупки» */

@media (prefers-reduced-motion: reduce) { .glow { animation: none !important; } .schema animateTransform { display: none; } }

/* Сетка (эксперимент): центральная карточка «Заказ + как подключаем» — главная и самая широкая; слева узкий короткий список товаров
   и справа блок со скриншотами заходят на неё краями. Внутренние отступы карточки больше захода, поэтому текст не перекрывается */
:root { --over-l: 56px; --over-r: 72px; }
main { width: 100%; max-width: 1600px; margin: 0 auto; flex: 1 0 auto; padding: 64px 24px 56px; display: grid; gap: 0;
       grid-template-columns: clamp(240px, 22vw, 300px) minmax(0, 1fr) clamp(340px, 30vw, 500px); grid-template-areas: "prod buy info";
       align-items: start; align-content: start; }
#products { grid-area: prod; position: relative; z-index: 2; align-self: center; }
/* Подпись «Товар» висит над списком и в расчёт центра не входит: по вертикали по центру карточки — сам список */
#products > .label { position: absolute; bottom: calc(100% + 24px); right: calc(var(--over-l) + 16px); }  /* по правому краю, не доходя 16px до карточки */
/* Ореол: тонкая рамка вокруг списка с отступом 16px от плиток; радиус = радиус списка + отступ, углы получаются концентрическими.
   Отрицательные поля возвращают плиткам прежнюю ширину колонки */
.halo { padding: 16px; margin: -16px; border: 1px solid var(--line); border-radius: 36px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }  /* размывает край карточки под ореолом */
@media (max-width: 1000px) { #products { align-self: start; } #products > .label { position: static; } .halo { padding: 0; margin: 0; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; } }
/* Карточка уходит под список слева на величину захода */
#buy { grid-area: buy; position: relative; z-index: 1; margin-left: calc(-1 * var(--over-l)); }
/* Скриншоты — по центру высоты центрального блока; подпись, переключатель и текст целиком правее края карточки (не на границе) */
#info > .label, #info > .under { padding-left: calc(var(--over-r) + 24px); }
/* Подпись сверху и переключатель с текстом снизу висят вокруг скриншота и в расчёт центра не входят: по центру карточки — сам скриншот */
#info > .label { position: absolute; bottom: 100%; left: 0; right: 0; }
#info > .under { position: absolute; top: 100%; left: 0; right: 0; }
@media (max-width: 1000px) { #info > .label, #info > .under { position: static; padding-left: 0; } }
#info { grid-area: info; position: relative; z-index: 2; margin-left: calc(-1 * var(--over-r)); align-self: center; }
@media (max-width: 1000px) {
  :root { --over-l: 0px; --over-r: 0px; }
  main { grid-template-columns: 1fr; grid-template-areas: "prod" "buy" "info"; gap: 16px; padding-top: 40px; }
  #info { align-self: start; }
}


/* Плитки товаров (Metro) */
/* Плитки товаров — одной колонкой, все одинаковой ширины и невысокие */
.tilebox { position: relative; border-radius: 20px; overflow: hidden; }
.tiles { display: grid; gap: var(--gap); grid-template-columns: 1fr; max-height: 560px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.tiles::-webkit-scrollbar { display: none; }
/* Свой ползунок поверх плиток: виден только при наведении на список, нативная полоса не отнимает место и не режет скругления */
.thumb { position: absolute; right: 4px; top: 0; width: 4px; border-radius: 2px; background: var(--text); opacity: 0; pointer-events: none; transition: opacity .2s; }
.tilebox:hover .thumb.on { opacity: .45; }
@media (max-width: 1000px) { .tiles { max-height: none; overflow: visible; } .thumb { display: none; } }
.tile {
  position: relative; border: 0; text-decoration: none; padding: 10px 12px; min-height: 60px; text-align: left; cursor: pointer;
  background: var(--c); color: var(--fg, #fff); display: flex; flex-direction: column; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s;
}
.tile:hover { transform: scale(.98); }
.tile:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.tile .name { font-size: 15px; font-weight: 600; }
.tile .sub { font-size: 12px; opacity: .8; }
.tile { overflow: hidden; }
/* Логотип бренда справа по центру плитки; растворяется горизонтально — к левому краю */
.tile .logo {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; object-fit: contain; opacity: .45; pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 100%);
  mask-image: linear-gradient(to left, #000 35%, transparent 100%);
}

/* Тарифы */
.plans { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.plans.open { animation: plans-in .22s ease; }
@keyframes plans-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .plans.open { animation: none; } }
.plan {
  color: inherit; text-decoration: none; border: 0; background: var(--panel); padding: 12px 14px; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; transition: background-color .2s;
}
.plan:hover { background: color-mix(in srgb, var(--panel), #fff 6%); }
.plan.on { background: color-mix(in srgb, var(--panel), #fff 6%); box-shadow: inset 4px 0 0 var(--c); }  /* полоса — цвет выбранного товара: продолжение плитки */
.plan .t { font-weight: 600; }
.plan .p { font-weight: 600; white-space: nowrap; }
.plan .d { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.plan .tag { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }

/* Описание и инструкция */
#buy .panel.hero { padding: 48px calc(var(--over-r) + 40px) 48px calc(var(--over-l) + 40px); }
@media (max-width: 1000px) { #buy .panel.hero { padding: 24px 20px; } }
#buy .lead { color: var(--muted); margin: 0 0 16px; }
#buy .label.how { margin-top: 40px; }
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: var(--gap); }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.steps .n { width: 32px; height: 32px; border-radius: 50%; background: var(--brand, var(--accent)); color: var(--brand-fg, var(--on-accent)); display: grid; place-items: center; font-weight: 600; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 14px; }
.note { border-left: 3px solid var(--brand, var(--accent)); padding: 9px 12px 6px;  /* снизу меньше: у текста внизу воздух от подстрочных элементов */ font-size: 14px; color: var(--muted); margin: 16px 0 0; }

/* Карусель инструкций: правая колонка выходит почти до правого края экрана (зазор 8px), переключатель и текст — под скриншотом */
.carousel { position: relative; overflow: hidden; border-radius: 20px; margin-right: calc(-1 * min((100vw - min(100vw, 1600px)) / 2 + 16px, 96px)); }  /* к краю экрана, но не больше чем на 96px за контейнер: на широком мониторе блок не растёт на пол-экрана */  /* до края экрана, но с зазором 8px */
@media (max-width: 1000px) { .carousel { margin: 0 -8px; } }
.frames { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
          scrollbar-width: none; }
.frames::-webkit-scrollbar { display: none; }
.frame { scroll-snap-align: start; position: relative; }
#info .cap { margin: 12px 0 0; font-size: 16px; font-weight: 600; }
#info .cap small { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--muted); }
.frame .shot { border: 0; background-size: cover; }
/* Переключатель кадров под текстом инструкции: назад, квадратики (клик — нужный кадр), вперёд */
.car-nav { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.car-nav button { border: 0; background: var(--panel); color: var(--text); width: 36px; height: 36px; font-size: 20px; line-height: 1; cursor: pointer; border-radius: 12px; }
.car-nav button:hover:not(:disabled) { background: color-mix(in srgb, var(--panel), #fff 10%); }
.car-nav button:disabled { opacity: .4; cursor: default; }
.dots { display: flex; gap: 6px; margin: 0 4px; }
.dots button { width: 14px; height: 14px; padding: 0; background: var(--line); }
.dots button:hover { background: var(--muted); }
.dots button.on { background: var(--text); }
/* Ореол подсвеченного поля: медленное «дыхание» яркости, без движения и вспышек */
.glow { opacity: .15; animation: glow 3.2s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .5; } }

/* Оформление заказа */
#buy .sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
#buy .sum .price, #buy #buyName { font-size: 30px; font-weight: 300; line-height: 1.2; }
/* Что входит в тариф: короткий список под ценой */
.feat-label { margin: 4px 0 8px; }
.feat { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.feat li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.feat li::before { content: "✓"; color: var(--muted); }
.agree { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 12px; align-items: flex-start; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.facts li { padding: 4px 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top: 0; }

/* Окно заказа (стили окон — в base.css) */
.od-state { display: inline-block; margin: 14px 0 4px; padding: 5px 12px; font-size: 13px; font-weight: 600;
  background: var(--bg); border-radius: 12px; }
/* В окне плашки без полоски слева: полоса и скругление вместе выглядят криво */
dialog .note { background: var(--bg); border: 0; border-radius: 12px; padding: 12px 14px; }
.od-code { display: flex; gap: 8px; margin: 14px 0 6px; }
.od-code code { flex: 1; font: 600 19px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .03em; padding: 12px;
  background: var(--bg); border: 1px dashed var(--accent); border-radius: 12px; overflow-wrap: anywhere; }
.od-btn { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 0 14px; cursor: pointer; font-size: 14px; }

/* Способ оплаты (витрина и окно заказа) и монета — «таблетки»; у способа — точка выбора, зелёная у выбранного */
.pm-label { margin: 16px 0 8px; }
.pm-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pm { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.pm:hover { color: var(--text); }
.pm.on { color: var(--text); border-color: var(--accent); }
.pm .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--muted); flex: none; }
.pm.on .dot { background: var(--ok); border-color: var(--ok); }
/* Выбор сети — «папка» как в WALLET: кнопка и раскрытый список одного фона, без зазора, общая тень на обёртке */
.nsel { position: relative; }
.nsel.open { filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .45)) drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); z-index: 5; }
.nsel-btn, .nsel-opt { display: flex; align-items: center; gap: 10px; width: 100%; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.nsel-btn { padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.nsel-btn:hover { border-color: var(--muted); }
.nsel.open .nsel-btn { border-radius: 12px 12px 0 0; border-bottom-color: transparent; }
.nsel.open .nsel-btn:hover { border-color: var(--line); border-bottom-color: transparent; }
.nsel-chev { margin-left: auto; color: var(--muted); flex: none; transition: transform .2s; }
.nsel.open .nsel-chev { transform: rotate(180deg); color: var(--text); }
.nsel-list { position: absolute; top: 100%; left: 0; right: 0; max-height: 300px; overflow-y: auto; padding: 4px;
  background: var(--bg); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nsel-opt { padding: 7px 8px; background: none; border: 0; border-radius: 10px; }
.nsel-opt:hover { background: var(--btn); }
.nsel-opt.on { background: var(--btn-hover); }
.nsel-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nsel-meta b { font-weight: 600; font-size: 15px; }
.nsel-meta span { font-size: 13px; color: var(--muted); }
/* Значок монеты и сети в углу */
.coin { position: relative; width: 30px; height: 30px; flex: none; }
.coin img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.coin .coin-net { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border: 1.5px solid var(--bg); background: var(--bg); }
/* Сумма, адрес, комментарий: поле на всю ширину, значок копирования внутри справа */
.cr-field { position: relative; }
.cr-field code { display: block; padding: 11px 48px 11px 12px; font: 500 15px/1.4 ui-monospace, Consolas, monospace;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.cr-copy { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px;
  padding: 0; color: var(--muted); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.cr-copy:hover { color: var(--text); background: var(--btn); }
.cr-wallets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cr-muted, .cr-timer { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
/* QR и сумма рядом */
.pay-qr { display: flex; gap: 16px; align-items: center; margin: 14px 0 4px; }
.qr { width: 148px; flex: none; border-radius: 12px; overflow: hidden; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-sum { font-size: 22px; font-weight: 300; margin: 0; overflow-wrap: anywhere; }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Активация в окне заказа */
.act { margin-top: 10px; }
.act-frame { border: 0; background: var(--bg); padding: 8px; margin: 10px 0; border-radius: 12px; overflow: hidden; }
.act-frame svg { width: 100%; height: auto; display: block; }
.act-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.act-bar { position: relative; height: 4px; background: var(--line); overflow: hidden; margin-top: 10px; border-radius: 2px; }
.act-bar::after { content: ""; position: absolute; inset: 0 auto 0 -40%; width: 40%; background: var(--accent); animation: act-slide 1.2s ease-in-out infinite; }
@keyframes act-slide { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .act-bar::after { animation-duration: 3s; } }

/* Своя сумма (Steam): поле ввода внутри карточки тарифа */
.plan.custom { cursor: default; }
.plan.custom input { grid-column: 1 / -1; margin: 6px 0 2px; }
.plan.custom input::-webkit-inner-spin-button { opacity: .4; }
.plan.custom .chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.chip { border: 1px solid var(--line); background: var(--bg); padding: 4px 10px; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Скриншот-инструкция: кусок кадра (фоном), по клику — целиком в окне */
.shot { display: block; width: 100%; padding: 0; border: 0; background-color: #1b1b1b;
  background-repeat: no-repeat; cursor: zoom-in; position: relative; }
.shot::after { content: "⤢"; position: absolute; right: 6px; bottom: 4px; font-size: 13px; color: #fff; opacity: .55; }
.shot:hover::after { opacity: 1; }
.schema svg { width: 100%; height: auto; display: block; }
dialog.shot-dlg { padding: 0; border: 0; background: transparent; max-width: min(1318px, calc(100vw - 32px)); cursor: zoom-out; }
dialog.shot-dlg img { display: block; width: 100%; height: auto; max-height: calc(100vh - 110px); object-fit: contain; }
dialog.shot-dlg p { margin: 10px 0 0; color: #ececf0; font-size: 14px; text-align: center; }
dialog.shot-dlg:focus, dialog.shot-dlg:focus-visible { outline: none; }
