/* ============================================================
   VibeTech Shop — Telegram Mini App
   Тёмная неоновая тема: navy + blue/purple glow, glassmorphism.
   ============================================================ */

:root {
  --bg: #080b16;
  --bg-2: #0d1226;
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f5ff;
  --text-dim: #98a1c4;
  --text-dimmer: #6d759a;
  --accent-1: #6d8bff;
  --accent-2: #a06cff;
  --accent-grad: linear-gradient(135deg, #6d8bff 0%, #a06cff 100%);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 66px;
  --topbar-h: 52px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Без этого правила элемент с атрибутом hidden всё равно показывается, если
   у него (или его класса) где-то ниже задан свой display — авторские
   правила по умолчанию перебивают правило [hidden] из UA-стиля браузера,
   даже при равной специфичности. Затрагивало и старые скрытые элементы
   (кнопка "назад", бейджи), и новые (баннер скидки, модалка). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  height: 100%;
  overscroll-behavior-y: none;
}

body { min-height: 100dvh; }

button, input {
  font-family: inherit;
  color: inherit;
}

a { color: var(--accent-1); text-decoration: none; }

/* ---------------- background fx ---------------- */

#bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 16s ease-in-out infinite alternate;
}

.blob-1 { width: 300px; height: 300px; background: #3d5bff; top: -80px; right: -60px; animation-duration: 18s; }
.blob-2 { width: 260px; height: 260px; background: #8a3dff; bottom: 10%; left: -80px; animation-duration: 22s; animation-delay: -4s; }
.blob-3 { width: 220px; height: 220px; background: #2ad0c9; bottom: -100px; right: 10%; opacity: 0.28; animation-duration: 26s; animation-delay: -9s; }

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.15); }
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,.25), transparent);
  background-size: 100% 100%;
  opacity: 0.7;
}

/* ---------------- glass ---------------- */

.glass {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ---------------- splash ---------------- */

.screen { position: fixed; inset: 0; z-index: 5; }
.screen:not(.is-active) { display: none; }

.screen-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 35%, #131a34 0%, var(--bg) 70%);
}

.splash-orb { position: relative; width: 140px; height: 140px; }
.orb-core {
  position: absolute; inset: 42px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 40px rgba(109,139,255,.7), 0 0 80px rgba(160,108,255,.4);
  animation: pulse-core 2.2s ease-in-out infinite;
}
.orb-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(140,160,255,.35);
  animation: pulse-ring 2.6s ease-out infinite;
}
.orb-ring.ring-2 { inset: 14px; animation-delay: .5s; border-color: rgba(160,120,255,.3); }
.orb-ring.ring-3 { inset: 28px; animation-delay: 1s; border-color: rgba(120,200,255,.25); }

@keyframes pulse-core {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes pulse-ring {
  0% { transform: scale(.8); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.splash-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #dfe6ff, #b9c6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.splash-sub { color: var(--text-dim); font-size: 14px; animation: fade-pulse 1.6s ease-in-out infinite; }
@keyframes fade-pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ---------------- fallback (opened outside telegram) ---------------- */

.screen-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, #131a34 0%, var(--bg) 70%);
}
.fallback-card { text-align: center; max-width: 340px; }
.fallback-icon { font-size: 48px; margin-bottom: 12px; }
.fallback-card h1 { font-size: 20px; margin: 0 0 8px; }
.fallback-card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.5; margin: 0 0 20px; }

/* ---------------- app shell ---------------- */

.app { position: relative; z-index: 1; display: none; min-height: 100dvh; flex-direction: column; }
.app.is-ready { display: flex; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  padding-right: 8px;
  background: linear-gradient(to bottom, rgba(8,11,22,.92), rgba(8,11,22,.75) 70%, transparent);
  backdrop-filter: blur(10px);
}
.topbar-title { font-weight: 700; font-size: 17px; }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.06);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.icon-btn:active { background: rgba(255,255,255,.14); }

.views {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  padding: 4px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.view.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: rgba(10,13,26,.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
}
.tab-btn {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-dimmer);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-size: 11px;
  padding: 6px 0 2px;
  cursor: pointer;
  transition: color .2s ease;
}
.tab-btn svg { transition: transform .2s ease; }
.tab-btn.is-active { color: var(--accent-1); }
.tab-btn.is-active svg { transform: translateY(-1px) scale(1.08); }
.tab-btn:active svg { transform: scale(.9); }

/* ---------------- buttons ---------------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, opacity .2s ease;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(109,139,255,.35);
}
.btn-buy { margin-top: 18px; position: relative; overflow: hidden; }

.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border: 1px solid var(--card-border);
  margin-top: 10px;
}
.btn-ghost:active { background: rgba(255,255,255,.12); }

.btn-compact { padding: 12px 16px; font-size: 14.5px; }

/* ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transform: scale(0);
  animation: ripple .55s ease-out;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(3); opacity: 0; } }

/* ---------------- store header / brand ---------------- */

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 14px;
}
.store-header-text { display: flex; flex-direction: column; gap: 2px; }
.store-label { font-size: 11.5px; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: .6px; }
.store-name { font-size: 15px; font-weight: 800; letter-spacing: .5px; color: var(--text); }
.store-logo {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  background: #0b0d16;
  box-shadow: 0 6px 18px rgba(109,139,255,.35);
  flex-shrink: 0;
}

.brand-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: lowercase;
  color: var(--text-dimmer);
  opacity: .75;
}

/* ---------------- discount banner (главный экран) ---------------- */

.discount-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(109,139,255,.16), rgba(160,108,255,.14));
  border: 1px solid rgba(160,108,255,.32);
  animation: fade-in-up .4s ease both;
}
.discount-banner-text { flex: 1; min-width: 0; }
.discount-banner-title { font-size: 13.5px; font-weight: 800; color: #fff; }
.discount-banner-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
.discount-timer {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 13.5px;
  background: rgba(0,0,0,.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
}

/* ---------------- hero / shop ---------------- */

.product-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-card { padding: 22px 20px 24px; margin-top: 6px; position: relative; overflow: hidden; }
.hero-card.product-card { margin-top: 0; animation: fade-in-up .5s ease both; }

/* Плашка платформы (Windows/Android) — в верхнем левом углу карточки товара,
   поверх картинки, как ярлычок. Зеркально дискаунт-пиллу справа. */
.platform-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(8,11,22,.68);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-media {
  position: relative;
  margin: -22px -20px 16px;
  animation: fade-in-up .5s ease both;
}
.hero-card-img {
  display: block;
  width: 100%;
  background: #ffffff;
}
.hero-discount-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(239,68,68,.4);
}
.hero-title {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 2px;
  background: linear-gradient(90deg, #ffffff, #b9c6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fade-in-up .5s ease .05s both;
}
.hero-tagline { margin: 0 0 10px; color: #c7cdec; font-size: 14.5px; font-weight: 500; animation: fade-in-up .5s ease .1s both; }
.hero-desc { margin: 0 0 14px; color: var(--text-dim); font-size: 14px; line-height: 1.55; animation: fade-in-up .5s ease .15s both; }

@keyframes fade-in-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.price-block {
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  margin-top: 4px;
}

.currency-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 14px;
}
.currency-pill {
  position: absolute;
  top: 4px; bottom: 4px;
  width: calc(33.333% - 4px);
  left: 4px;
  border-radius: 999px;
  background: var(--accent-grad);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 14px rgba(109,139,255,.35);
}
.cur-opt {
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  padding: 9px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease;
}
.cur-opt.is-active { color: #fff; }

.price-display { text-align: center; padding: 6px 0 4px; }
.price-old {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dimmer);
  text-decoration: line-through;
  margin-right: 8px;
}
.price-value {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -.5px;
  display: inline-block;
  background: linear-gradient(90deg,#fff,#cfd8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: price-in .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes price-in { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }

.buy-actions { display: flex; gap: 10px; margin-top: 18px; }
.buy-actions .btn-info { flex: 0 0 30%; margin-top: 0; }
.buy-actions .btn-buy { flex: 1; margin-top: 0; }

.promo-badge {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #a7f3d0;
  background: var(--success-bg);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 999px;
  padding: 7px 12px;
}

/* ---------------- payment methods ---------------- */

.section-hint { color: var(--text-dim); font-size: 13.5px; margin: 10px 0 14px; }

.method-list { display: flex; flex-direction: column; gap: 12px; }
.method-card {
  display: flex; align-items: center; gap: 13px;
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fade-in-up .4s ease both;
}
.method-card:active { transform: scale(.98); }
.method-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: rgba(109,139,255,.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; letter-spacing: .2px;
  color: #c7d3ff;
  flex-shrink: 0;
}
.method-info { flex: 1; min-width: 0; }
.method-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.method-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.method-amount { font-weight: 800; font-size: 16px; white-space: nowrap; text-align: right; }
.method-amount-old { display: block; font-weight: 600; font-size: 12px; color: var(--text-dimmer); text-decoration: line-through; }
.method-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
}
.method-badge-instant { background: var(--success-bg); color: var(--success); }
.method-badge-manual { background: rgba(251,191,36,.12); color: var(--warn); }
.method-preferred { border-color: var(--accent-1); box-shadow: 0 0 0 1px rgba(109,139,255,.4), 0 8px 24px rgba(109,139,255,.18); }

/* ---------------- pay screens ---------------- */

.pay-card { padding: 26px 22px; text-align: center; margin-top: 8px; }
.pay-status { display: flex; align-items: center; justify-content: center; height: 64px; margin-bottom: 8px; }
.pay-spinner {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--accent-1);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-check { color: var(--success); animation: pop-in .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop-in { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }

.pay-title { font-size: 19px; font-weight: 800; margin: 4px 0 6px; }
.pay-amount { font-size: 26px; font-weight: 800; margin: 4px 0 10px;
  background: linear-gradient(90deg,#fff,#cfd8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pay-desc { color: var(--text-dim); font-size: 13.5px; line-height: 1.5; margin: 0 0 18px; }

.req-row { text-align: left; margin-bottom: 14px; }
.req-label { font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
.req-value-row { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 11px 12px; }
.req-value { flex: 1; font-size: 14px; word-break: break-all; color: var(--text); background: none; }
.copy-btn {
  flex-shrink: 0;
  border: none; background: rgba(109,139,255,.18); color: #c7d3ff;
  font-size: 12px; font-weight: 700; padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.copy-btn:active { background: rgba(109,139,255,.32); }

.steps-list { text-align: left; color: var(--text-dim); font-size: 13.5px; line-height: 1.7; margin: 0 0 20px; padding-left: 20px; }
.steps-list li { margin-bottom: 2px; }

/* ---------------- promo / referral ---------------- */

.promo-card, .referral-card { padding: 24px 20px; margin-top: 8px; }
.promo-card .pay-title, .referral-card .pay-title { text-align: center; }
.promo-card .pay-desc, .referral-card .pay-desc { text-align: center; }

.promo-input-row { display: flex; gap: 8px; margin: 16px 0 10px; }
.promo-input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  outline: none;
}
.promo-input:focus { border-color: var(--accent-1); }
.promo-input-num { text-transform: none; letter-spacing: 0; font-weight: 600; }

.promo-msg { min-height: 20px; font-size: 13.5px; text-align: center; margin-top: 6px; }
.promo-msg.is-error { color: var(--danger); }
.promo-msg.is-success { color: var(--success); }
.promo-msg.shake { animation: shake .4s ease; }
@keyframes shake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-4px)} 40%,60%{transform:translateX(4px)} }

.promo-active-card {
  margin-top: 14px;
  text-align: center;
  background: var(--success-bg);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13.5px;
  color: #a7f3d0;
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.promo-active-card b { color: #fff; }

.stats-row { display: flex; gap: 12px; margin: 18px 0 18px; }
.stat-box { flex: 1; text-align: center; background: rgba(255,255,255,.04); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 16px 8px; }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }

/* ---------------- legal ---------------- */

.legal-text { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; }
.legal-text b { color: var(--text); }

/* ---------------- consent (оферта -> политика перед оплатой) ---------------- */

.consent-card { padding: 20px 18px 22px; margin-top: 8px; }
.consent-progress { margin-bottom: 10px; }
.consent-step {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #c9b8ff;
  background: rgba(160,108,255,.15);
  border: 1px solid rgba(160,108,255,.3);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 8px;
}
.consent-text-wrap {
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}
.consent-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 16px;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.consent-check-row input[type="checkbox"] {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent-1);
  cursor: pointer;
}

/* ---------------- info modal ---------------- */

.modal-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(4,6,14,.72);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
  animation: fade-in-up .2s ease both;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 26px 20px calc(24px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.08); color: var(--text);
  font-size: 14px; cursor: pointer;
  z-index: 2;
}

/* ---------------- screenshot gallery (внутри "Инфо") ---------------- */

.modal-card-gallery { padding-bottom: calc(20px + var(--safe-bottom)); }

.gallery {
  position: relative;
  margin: 14px 0 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255,255,255,.04);
}
.gallery-track {
  display: flex;
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  touch-action: pan-y;
  cursor: grab;
}
.gallery-track:active { cursor: grabbing; }
.gallery-slide { flex: 0 0 100%; min-width: 0; }
.gallery-slide img {
  width: 100%;
  display: block;
  -webkit-user-select: none; user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(4,6,14,.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.gallery-dots { display: flex; justify-content: center; gap: 6px; }
.gallery-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  cursor: pointer;
  transition: background .2s ease, width .2s ease;
}
.gallery-dot.is-active { background: var(--accent-1); width: 16px; border-radius: 3px; }

.info-text-wrap {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.info-text.legal-text { font-size: 14px; }

/* ---------------- admin ---------------- */

.admin-tabs { display: flex; gap: 8px; margin: 10px 0 16px; }
.admin-tab {
  flex: 1;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}
.admin-tab.is-active { color: #fff; background: rgba(109,139,255,.16); border-color: rgba(109,139,255,.4); }
.badge-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-left: 4px; }

.admin-pane { display: none; }
.admin-pane.is-active { display: block; animation: fade-in-up .3s ease both; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stats-grid .stat-box { padding: 18px 10px; }

.promo-create-card { padding: 18px; margin-bottom: 16px; }
.promo-form-row { display: flex; gap: 8px; margin-bottom: 12px; }
.promo-form-row .promo-input { padding: 11px 10px; font-size: 13.5px; }

/* ---------------- admin: скидка на товар ---------------- */

.discount-admin-card, .discount-create-card { padding: 18px; margin-bottom: 16px; }
.discount-admin-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}
.discount-admin-percent { font-size: 28px; font-weight: 800; color: #fff; }
.discount-admin-sub { font-size: 12.5px; color: var(--text-dim); }
.discount-admin-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.discount-admin-block { margin-bottom: 14px; }
.discount-admin-block-title { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; font-weight: 700; }
.discount-admin-form-row { display: flex; gap: 8px; margin-bottom: 10px; }
.discount-admin-form-row .promo-input { padding: 11px 10px; font-size: 13.5px; }
.discount-admin-block .btn { margin-top: 0; }

.promo-admin-list { display: flex; flex-direction: column; gap: 10px; }
.promo-admin-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.promo-admin-item .pi-code { font-weight: 800; font-size: 14px; }
.promo-admin-item .pi-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.promo-admin-item .pi-off { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; cursor: pointer; border: none; }
.pi-off.pi-active { background: var(--success-bg); color: var(--success); }
.pi-off.pi-inactive { background: rgba(255,255,255,.08); color: var(--text-dimmer); }

.receipts-list { display: flex; flex-direction: column; gap: 14px; }
.receipt-card { padding: 14px; }
.receipt-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; }
.receipt-head .rc-amount { font-weight: 800; font-size: 16px; }
.receipt-head .rc-method { color: var(--text-dim); }
.receipt-photo-wrap { border-radius: var(--radius-sm); overflow: hidden; background: rgba(255,255,255,.04); margin-bottom: 10px; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.receipt-photo-wrap img { width: 100%; display: block; max-height: 320px; object-fit: contain; }
.receipt-actions { display: flex; gap: 8px; }
.receipt-actions .btn { padding: 11px; font-size: 13.5px; margin: 0; }
.btn-approve { background: linear-gradient(135deg,#34d399,#059669); box-shadow: 0 8px 22px rgba(52,211,153,.3); }
.btn-reject { background: rgba(248,113,113,.14); color: #fca5a5; border: 1px solid rgba(248,113,113,.3); }
.empty-hint { text-align: center; color: var(--text-dimmer); font-size: 13.5px; padding: 30px 10px; }

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%) translateY(20px);
  background: rgba(20,24,42,.95);
  border: 1px solid var(--card-border-strong);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 88%;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

#confetti-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none;
}

/* ---------------- dev-режим (локальный тест без Telegram) ---------------- */

#dev-mode-badge {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #fbbf24;
  color: #1a1200;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  padding: 4px 8px;
  padding-top: calc(4px + var(--safe-top));
}

/* ---------------- skeleton ---------------- */

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 37%, rgba(255,255,255,.04) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 10px;
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- small screens ---------------- */

@media (max-width: 340px) {
  .price-value { font-size: 34px; }
  .hero-title { font-size: 26px; }
}
