/* Экран «Тарифы и расчёты» (views/shop.js): три тарифа, «Что есть что», каталог расчётов с обложками дизайнера,
 * подарок, правила. Только классы с префиксом shop-; остальное — «Набор для экранов» в app.css. */

.shop--still .card { animation: none; }
.shop-kicker { margin: 0; font: 500 11.5px var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* обложка: знак-заглушка, поверх — картинка из API, когда загрузится */
.shop-cover {
  position: relative; display: block; overflow: hidden; flex: none;
  background: radial-gradient(circle at 50% 38%, rgba(var(--glow-rgb), .32), rgba(15,59,74,.42) 58%, rgba(16,26,58,.9));
}
.shop-cover::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .2);
}
.shop-cover__glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 300 28px var(--f-head); color: var(--gold); text-shadow: 0 0 16px rgba(var(--accent-rgb), .8);
}
.shop-cover__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s ease;
}
.shop-cover.is-loaded .shop-cover__img { opacity: 1; }

/* пока оплаты нет — одна честная строка над витриной */
.shop-soon {
  margin: 0 2px 4px; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; color: var(--muted);
  background: rgba(var(--accent-rgb), .05); border: 1px dashed rgba(var(--accent-rgb), .28);
}

/* ── тарифы: на телефоне одна под другой, в широкой колонке — три в ряд ── */
.shop-tariffs { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 1100px) { .shop-tariffs { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; } }
.shop-plan {
  display: flex; flex-direction: column; padding: 0; margin: 0;
  background: var(--grad-card); border-color: var(--line);
}
.shop-plan::before { z-index: 2; }
.shop-plan.is-active { border-color: var(--line-strong); box-shadow: var(--shadow-card), 0 0 0 1px rgba(var(--accent-rgb), .25); }
/* «Астра+» — переливающаяся кайма авроры */
.shop-tariff--best { border-color: transparent; background: linear-gradient(var(--ink-2), var(--ink-2)) padding-box, var(--grad-aurora) border-box; }
.shop-tariff--best .shop-plan__body { background: var(--grad-card); border-radius: inherit; }
.shop-plan__body { position: relative; flex: 1; display: flex; flex-direction: column; padding: 16px 18px 18px; }
.shop-plan__title { margin: 2px 0 0; font: 300 28px/1.1 var(--f-head); letter-spacing: .06em; color: var(--text); }
.shop-plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 6px 0 2px; }
.shop-plan__rub { font: 300 30px/1 var(--f-head); color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.shop-plan__per { font-size: 14px; color: var(--muted); }
.shop-tariff__lead { margin: 8px 0 12px; font: 600 14.5px/1.4 var(--f-body); color: var(--accent); }
.shop-tariff__left { display: inline-flex; align-self: flex-start; margin: 0 0 10px; }
.shop-tariff__note { margin: -6px 0 12px; }
.shop-plan__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.shop-perks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.shop-perks li { position: relative; padding-left: 1.45em; font: 400 14px/1.45 var(--f-body); color: var(--text-2); }
.shop-perks li::before {
  content: "✦"; position: absolute; left: 0; top: .1em; font-size: .8em;
  color: var(--accent); text-shadow: 0 0 10px rgba(var(--accent-rgb), .7);
}

/* ── «Что есть что» ───────────────────────────────────────────── */
.shop-gloss__card { display: grid; gap: 12px; }
.shop-gloss__row + .shop-gloss__row { padding-top: 12px; border-top: 1px solid var(--line-faint); }
.shop-gloss__title { margin: 0 0 3px; font: 500 15px/1.3 var(--f-head); letter-spacing: .03em; color: var(--text); }
.shop-gloss__text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* ── каталог расчётов ─────────────────────────────────────────── */
.shop-calcs__list { display: grid; gap: 10px; }
@media (min-width: 1100px) { .shop-calcs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shop-calcs__list .shop-book { margin: 0; } }
.shop-calc__book { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--accent); opacity: .85; }
.shop-calc .shop-book__sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shop-rules__card .shop-list li { font-size: 14px; }

.shop-on { padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--accent); border-color: var(--line-strong); }
.shop-on::before { content: "✦"; font-size: 11px; }

/* ── +20 вопросов ─────────────────────────────────────────────── */
.shop-topup { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.shop-topup__info { min-width: 0; }
.shop-topup__title { margin: 2px 0 0; font: 300 22.5px/1.1 var(--f-head); color: var(--cream); }
.shop-topup__note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.shop-topup__note.is-soon { font-weight: 600; color: var(--amber); }
.shop-topup .shop-act { flex: none; min-width: 84px; }
.shop-hint { margin: 4px 2px 0; font-size: 13px; text-align: center; color: var(--muted); }
.shop-hint--left { margin: -4px 2px 10px; text-align: left; }

/* ── книги ────────────────────────────────────────────────────── */
.shop-book { padding: 14px; }
.shop-book--more { cursor: pointer; }
.shop-book__head {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  width: 100%; padding: 0; text-align: left;
}
.shop-book__cover { width: 84px; height: 84px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(5,8,24,.45); }
.shop-book__info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-top: 1px; }
.shop-book__title { font: 400 18px/1.2 var(--f-head); color: var(--cream); }
.shop-book__sub { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.shop-book__pill { margin-top: 8px; font-size: 12px; padding: 3px 9px; }
.shop-book__chev { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; color: var(--gold-soft); transition: transform .3s ease; }
.shop-book__chev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shop-book.is-open .shop-book__chev { transform: rotate(180deg); color: var(--gold); }
.shop-book__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(var(--accent-rgb), .1);
}
.shop-book__price { display: flex; flex-direction: column; min-width: 0; }
.shop-book__price b { font: 400 18px var(--f-head); color: var(--text); font-variant-numeric: lining-nums; }
.shop-book__stars { font-size: 12px; color: var(--muted); }
.shop-book__stars em { font-style: normal; color: var(--gold); }
.shop-book .shop-act { flex: none; }
.shop-book--owned { border-color: rgba(143, 224, 184, .35); }
.shop-book--soon .shop-book__cover { filter: saturate(.75); }

.shop-book__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.shop-book.is-open .shop-book__more { grid-template-rows: 1fr; }
.shop-book__inner { min-height: 0; overflow: hidden; }
.shop-book__label { margin: 14px 0 6px; font: 500 11.5px var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.shop-list { list-style: none; margin: 0; padding: 0 0 2px; display: grid; gap: 5px; }
.shop-list li { position: relative; padding-left: 1.35em; font: 400 14.5px/1.42 var(--f-body); color: var(--text-2); }
.shop-list li::before { content: "✦"; position: absolute; left: 0; top: .12em; font-size: .75em; color: var(--gold); }

/* ── подарок ──────────────────────────────────────────────────── */
.shop-gift { display: grid; grid-template-columns: 76px 1fr; gap: 12px 14px; align-items: center; margin-top: 26px; }
.shop-gift__cover { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 24px rgba(var(--glow-rgb), .25); }
.shop-gift__info .card__title { margin-top: 2px; }
.shop-gift__sub { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.shop-gift__go { grid-column: 1 / -1; }

/* ── загрузка и ошибка ────────────────────────────────────────── */
.shop-skel__plan { height: 360px; border-radius: 22px; margin-bottom: 12px; }
.shop-skel__topup { height: 84px; border-radius: 22px; margin-bottom: 34px; }
.shop-skel__book { height: 132px; border-radius: 22px; margin-bottom: 12px; }
.shop-error { display: flex; flex-direction: column; align-items: center; padding-top: 12vh; }

/* фокус с клавиатуры */
.shop-book__head:focus-visible, .shop-act:focus-visible,
.shop-plan__go:focus-visible, .shop-gift__go:focus-visible {
  outline: 2px solid var(--gold-soft); outline-offset: 3px;
}
.shop-book__head:focus-visible { border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
  .shop-cover__img, .shop-book__chev, .shop-book__more { transition: none; }
}
@media (max-width: 350px) {
  .shop-topup { flex-direction: column; align-items: stretch; }
  .shop-book__head { grid-template-columns: 64px 1fr auto; gap: 12px; }
  .shop-book__cover { width: 64px; height: 64px; }
}
