/* ======================================================
   Steklo Shop — Premium Ice Glass UI (v5)

   Что изменилось в этой версии:
   1. Кэш больше не управляется вручную из CSS/JS — версии файлов
      контролируются HTTP-заголовками в .htaccess. Дизайн всегда
      актуален у всех посетителей.
   2. Диамант "24/7": шрифт Space Grotesk (гарнитура для чисел/техно
      акцентов) вместо декоративного Cormorant Garamond, настоящая
      форма ромба (rotate 45deg + контр-поворот текста).
   3. Фото в прайсе — фиксированный кадр (aspect-ratio + object-fit:
      cover), карточка прайса больше никогда не "прыгает", кнопка
      "Назад" всегда на своём месте.
   4. Анимированный фон облегчён на слабых устройствах через классы
      .lite-fx / .no-motion, которые JS вешает на <html> ДО отрисовки.
   ====================================================== */

/* ===============================
   THEME TOKENS
   =============================== */
:root{
  --bg0:#070f1c;
  --bg1:#0b1727;
  --bg2:#0f243d;

  --text:#eaf1ff;
  --muted:#b2c2e3;

  --stroke: rgba(255,255,255,.16);
  --stroke2: rgba(255,255,255,.24);

  --shadow2: 0 10px 28px rgba(0,0,0,.42);

  --radius: 18px;
  --radius2: 22px;

  --w: 380px;

  /* Gold accent palette */
  --gold: #d8b46a;
  --gold-bright: #f3d89a;
  --gold-soft: rgba(216,180,106,.35);
  --gold-line: rgba(216,180,106,.45);
  --gold-glow: rgba(216,180,106,.18);

  --good: #6bd68a;

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-tech: "Space Grotesk", "Manrope", Inter, system-ui, sans-serif;
}

/* ===============================
   RESET / SCROLL CONTROL
   =============================== */
*,
*::before,
*::after{ box-sizing:border-box; }

html, body{
  width:100%;
  height:100%;
  margin:0;
  padding:0;
  overscroll-behavior: none;
  background: var(--bg1);
}

body{
  font-family: var(--font-body);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll{ overflow: hidden; height: 100%; }

/* ===============================
   BACKGROUND — LIVE PREMIUM ICE
   =============================== */
body{
  background:
    radial-gradient(1200px 800px at 18% 24%, var(--gold-glow), transparent 62%),
    radial-gradient(900px 650px at 84% 78%, rgba(150,120,60,.12), transparent 65%),
    linear-gradient(180deg, var(--bg2), var(--bg1) 55%, var(--bg0));
}

/* Мягкое "дыхание" — плавный золотой свет, без частиц. Только transform
   и opacity — самые дешёвые свойства для анимации (GPU-композитинг,
   без пересчёта layout/paint на каждый кадр). */
body::before{
  content:"";
  position: fixed;
  inset: -28%;
  z-index: -3;
  pointer-events: none;

  background:
    radial-gradient(900px 620px at 28% 20%, var(--gold-glow), transparent 68%),
    radial-gradient(760px 560px at 72% 78%, rgba(216,180,106,.12), transparent 72%),
    radial-gradient(650px 520px at 50% 110%, rgba(243,216,154,.08), transparent 75%);

  filter: blur(30px);
  transform: translate3d(0,0,0) scale(1);
  opacity: .85;
  will-change: transform, opacity;

  animation: bg-breathe 14s ease-in-out infinite;
}

@keyframes bg-breathe{
  0%   { transform: translate3d(0,0,0) scale(1);     opacity: .78; }
  50%  { transform: translate3d(-1.5%, -1%, 0) scale(1.06); opacity: .95; }
  100% { transform: translate3d(0,0,0) scale(1);     opacity: .78; }
}

/* Виньетка — статична, ничего не анимирует, дешёвая */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    radial-gradient(circle at 50% 35%,
      rgba(0,0,0,0) 0%,
      rgba(20,14,4,.16) 55%,
      rgba(0,0,0,.46) 100%);
}

/* Лёгкий "блик" поверх контента — самый дорогой слой (blur + mix-blend-mode).
   Отключается на слабых устройствах и при экономном режиме движения. */
@supports (mix-blend-mode: overlay){
  .app::before{
    content:"";
    position:absolute;
    inset:-60px;
    pointer-events:none;
    z-index:0;
    opacity:.18;
    background:
      radial-gradient(820px 520px at 35% 18%, rgba(255,255,255,.05), transparent 65%),
      radial-gradient(680px 460px at 75% 90%, rgba(100,140,200,.05), transparent 70%),
      linear-gradient(0deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    mix-blend-mode: overlay;
    filter: blur(.6px);
    animation: sheen 11s ease-in-out infinite;
  }

  @keyframes sheen{
    0%   { transform: translate3d(0,0,0); opacity:.16; }
    50%  { transform: translate3d(1.6%, 1%, 0); opacity:.22; }
    100% { transform: translate3d(0,0,0); opacity:.16; }
  }
}

/* ===============================
   PERFORMANCE MODE (слабые устройства)
   Класс .lite-fx вешается JS-скриптом в <head> ДО первой отрисовки,
   если у устройства мало ядер/памяти. Убираем самые дорогие эффекты:
   тяжёлый blur фона, мерцающий блик, лишний слой анимации.
   =============================== */
html.lite-fx body::before{
  filter: blur(14px);
  animation-duration: 20s;
}
html.lite-fx .app::before{ display: none; }
html.lite-fx .main-card,
html.lite-fx .price-card,
html.lite-fx .glass-banner{
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

html.no-motion body::before,
html.no-motion .app::before,
html.no-motion *{
  animation: none !important;
}

@media (prefers-reduced-motion: reduce){
  body::before, .app::before{ animation: none !important; }
  *{ transition: none !important; }
}

/* ===============================
   APP LAYOUT (MOBILE-FIRST)
   =============================== */
.app{
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;

  padding:
    calc(18px + env(safe-area-inset-top))
    18px
    calc(18px + env(safe-area-inset-bottom));

  overflow-x: clip;
}

.logo,
.logo-title,
.subtitle,
.buttons,
.updated{
  position: relative;
  z-index: 1;
}

/* ===============================
   GLASS BANNER
   =============================== */
.glass-banner{
  position:fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 16px;

  width:min(720px, 94vw);
  padding:12px 16px;
  border-radius:16px;

  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.18);
  outline: 1px solid rgba(160,220,255,.06);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);

  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);

  font-size:14px;
  line-height:1.25;
  color: rgba(235,245,255,.92);
  z-index: 10;

  transform: translateX(120%);
  opacity:0;
  transition: transform .45s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}

.glass-banner.is-visible{ transform: translateX(0); opacity:1; }
.glass-banner.is-hidden{ transform: translateX(120%); opacity:0; }

.hidden{ display:none; }

/* ===============================
   LOGO — "24/7" DIAMOND BADGE
   Настоящая форма ромба: внешний блок повёрнут на 45°, внутренний
   контейнер повёрнут обратно на -45°, чтобы текст остался горизонтальным.
   Шрифт — Space Grotesk: геометричный, читаемый в цифрах, без
   "свадебной" засечки, которая была раньше (Cormorant Garamond).
   =============================== */
.logo{
  width: 74px;
  height: 74px;
  margin: 4px auto 22px;

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

  border-radius: 16px;
  transform: rotate(45deg);

  background:
    radial-gradient(120% 120% at 25% 25%, rgba(255,255,255,.20), rgba(255,255,255,.05) 55%, rgba(255,255,255,.04)),
    linear-gradient(180deg, var(--gold-glow), rgba(0,0,0,0));
  border: 1px solid var(--gold-line);

  box-shadow: var(--shadow2), 0 0 0 1px rgba(216,180,106,.08) inset;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);

  position: relative;
}

.logo::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), transparent 55%);
  opacity:.75;
  border-radius: inherit;
}

.logo-inner{
  transform: rotate(-45deg);
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap: 1px;
}

.logo-num,
.logo-slash{
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;

  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-slash{
  font-weight: 500;
  opacity: .8;
  font-size: 18px;
  margin: 0 -1px;
}

.logo-title{
  width: min(340px, 86vw);
  height:auto;
  margin: 4px 0 10px;
  display:block;

  filter:
    drop-shadow(0 12px 28px rgba(90,160,255,0.35))
    drop-shadow(0 2px 6px rgba(255,255,255,0.15));
  image-rendering: -webkit-optimize-contrast;
}

.logo-title-text{
  margin: 4px 0 14px;
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.3px;
  color: rgba(235,245,255,.96);
  text-shadow:
    0 12px 28px rgba(90,160,255,0.30),
    0 2px 4px rgba(255,255,255,0.12);
}

.subtitle{
  margin: 8px 0 14px;
  font-size: 13px;
  color: rgba(185,205,235,.92);
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 7px;
}

/* Маленький пульсирующий индикатор "мы онлайн 24/7" — недорогая деталь,
   которая усиливает ощущение живого, работающего магазина. */
.status-dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(107,214,138,.6);
  flex: 0 0 auto;
  animation: status-pulse 2.2s ease-out infinite;
}

@keyframes status-pulse{
  0%   { box-shadow: 0 0 0 0 rgba(107,214,138,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(107,214,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(107,214,138,0); }
}

html.no-motion .status-dot{ animation: none; }

/* ===============================
   BUTTONS
   =============================== */
.buttons{
  width: min(var(--w), 92vw);
  max-width: 100%;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.btn{
  display:flex;
  align-items:center;
  justify-content:center;

  padding: 13px 14px;
  border-radius: 20px;
  text-decoration:none;

  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  outline: 1px solid rgba(80,120,200,.05);

  color: rgba(235,245,255,.92);
  font-weight: 600;
  letter-spacing: .2px;

  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);

  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transform: translateZ(0);

  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover{
  background: linear-gradient(180deg, var(--gold-glow), rgba(255,255,255,.08));
  border-color: var(--gold-line);
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  transform: translateY(-1px);
}

.btn:active{ transform: translateY(0px) scale(.99); box-shadow: 0 8px 20px rgba(0,0,0,.35); }

.btn:focus-visible{
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.btn-price{
  border-color: var(--gold-line);
  outline: 1px solid var(--gold-soft);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(216,180,106,.06) inset;
}

.btn-price:hover{ border-color: var(--gold-bright); }

.btn.ghost{
  color: rgba(200,215,240,.88);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.10);
}

.btn.ghost:hover{
  color: rgba(235,245,255,.92);
  background: rgba(80,120,200,.16);
}

button.btn{
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  font: inherit;

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

  padding: 13px 14px;
  border-radius: 20px;

  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  outline: 1px solid rgba(80,120,200,.05);

  color: rgba(235,245,255,.92);
  font-weight: 600;
  letter-spacing: .2px;

  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);

  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}

button.btn:hover{
  background: linear-gradient(180deg, rgba(80,120,200,.18), rgba(255,255,255,.08));
  border-color: rgba(120,180,240,.22);
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  transform: translateY(-1px);
}

button.btn:active{ transform: translateY(0px) scale(.99); box-shadow: 0 8px 20px rgba(0,0,0,.35); }

button.btn:focus-visible{
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* ===============================
   UPDATED TEXT
   =============================== */
.updated{
  margin-top: 12px;
  font-size: 11px;
  color: rgba(185,205,235,.85);
  letter-spacing: .2px;
}

/* ===============================
   PRICE VIEW (FULLSCREEN)
   =============================== */
.price-view{
  position: fixed;
  inset: 0;
  z-index: 20;

  padding:
    calc(18px + env(safe-area-inset-top))
    18px
    calc(18px + env(safe-area-inset-bottom));

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

  opacity:0;
  pointer-events:none;
  transform: translateY(12px) scale(.98);
  transition: opacity .28s ease, transform .28s ease;

  overflow-y: auto;
  overflow-x: hidden;

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

.price-view.is-active{
  opacity:1;
  pointer-events:auto;
  transform: translateY(0) scale(1);
}

.price-card{
  width: min(520px, 92vw);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.07));
  border: 1px solid var(--gold-line);
  border-radius: 26px;
  padding: 22px;

  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(216,180,106,.06) inset;
}

.price-card h2{
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: 0.2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.carousel-product-name{
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--gold-bright);
  margin-bottom: 10px;
  letter-spacing: .2px;
  min-height: 26px;
}

.price-list{
  list-style:none;
  padding:0;
  margin: 0 0 16px;
}

.price-list li{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-soft);
  font-size: 15px;
  color: rgba(230,242,255,.92);
}

.price-list li span:last-child{
  color: var(--gold-bright);
  font-weight: 600;
}

.back-btn{
  margin-top: 14px;
  width: fit-content;
  padding-left: 18px;
  padding-right: 18px;
}

/* ===============================
   PRICE IMAGE — FIXED FRAME
   Ключевой фикс: рамка ВСЕГДА одного размера (aspect-ratio), а
   фотография вписывается через object-fit: cover. Не важно, какого
   размера исходник — карточка прайса и кнопка "Назад" больше не
   двигаются при пролистывании товаров.
   =============================== */
.price-image-wrap{
  all: unset;
  box-sizing: border-box;
  display: block;
  position: relative;
  cursor: zoom-in;

  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  margin: 12px auto 10px;

  border-radius: 18px;
  overflow: hidden;

  border: 1px solid var(--gold-line);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(216,180,106,.06) inset;

  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));

  transition: transform .25s ease, box-shadow .25s ease;
  -webkit-tap-highlight-color: transparent;
}

.price-image-wrap:hover{
  transform: scale(1.015);
  box-shadow: 0 22px 60px rgba(0,0,0,.55);
}

.price-image-wrap:active{ transform: scale(.99); }

.price-image-wrap:focus-visible{
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.price-image{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;

  opacity: 0;
  transform: scale(1.04);
  transition: opacity .35s ease, transform .5s ease;
}

.price-image.is-loaded{
  opacity: 1;
  transform: scale(1);
}

/* Skeleton shimmer while the real photo is loading — no layout jump,
   just a subtle pulsing placeholder in the exact same frame. */
.price-image-skeleton{
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(255,255,255,.05) 30%,
    rgba(255,255,255,.14) 50%,
    rgba(255,255,255,.05) 70%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.6s ease-in-out infinite;
}

.price-image-skeleton.is-hidden{ display:none; }

@keyframes skeleton-sweep{
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

html.no-motion .price-image-skeleton{ animation: none; }

/* Magnifier hint icon in the corner of the photo */
.price-image-zoom{
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;

  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 15px;
  color: rgba(255,255,255,.95);

  background: rgba(10,16,26,.55);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  pointer-events: none;
}

/* Аккуратная заглушка вместо "битой иконки" браузера, если фото 404 */
.price-image-wrap.img-error .price-image{ opacity: 0; }

.price-image-wrap.img-error::after{
  content: "🖼  Фото скоро добавим";
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 0 16px;

  font-size: 13px;
  color: rgba(200,212,235,.75);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

.price-image-wrap.img-error .price-image-zoom{ display:none; }
.price-image-wrap.img-error{ cursor: default; }

.price-image-hint{
  margin: 0 0 6px;
  font-size: 12px;
  color: rgba(170,188,220,.85);
}

/* ===============================
   FULLSCREEN OVERLAY
   =============================== */
.image-overlay{
  position: fixed;
  inset: 0;
  background: rgba(5,10,18,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

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

  z-index: 50;
  opacity: 0;
  pointer-events:none;
  transition: opacity .25s ease;
}

.image-overlay.is-active{ opacity:1; pointer-events:auto; }

.image-overlay img{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.75);
  transform: scale(.96);
  transition: transform .3s ease;
}

.image-overlay.is-active img{ transform: scale(1); }

.image-overlay-close{
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;

  width: 42px;
  height: 42px;
  border-radius: 50%;

  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  font-size: 18px;
  color: rgba(255,255,255,.95);

  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: background .18s ease, transform .18s ease;
}

.image-overlay-close:hover{ background: rgba(255,255,255,.16); transform: scale(1.05); }
.image-overlay-close:focus-visible{ outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* ===============================
   CAROUSEL
   =============================== */
.carousel{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.carousel-viewport{
  flex: 1 1 auto;
  min-width: 0;
  touch-action: pan-y;
}

.carousel-arrow{
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: 0 0 auto;

  width: 40px;
  height: 40px;
  border-radius: 50%;

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

  font-size: 22px;
  line-height: 1;
  color: var(--gold-bright);

  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border: 1px solid var(--gold-line);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.carousel-arrow:hover{
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, var(--gold-glow), rgba(255,255,255,.06));
  transform: translateY(-1px);
}

.carousel-arrow:active{ transform: translateY(0) scale(.95); }
.carousel-arrow:focus-visible{ outline: 2px solid var(--gold-bright); outline-offset: 2px; }

@keyframes carousel-slide-from-right{
  from{ opacity: 0; transform: translateX(18px); }
  to{ opacity: 1; transform: translateX(0); }
}
@keyframes carousel-slide-from-left{
  from{ opacity: 0; transform: translateX(-18px); }
  to{ opacity: 1; transform: translateX(0); }
}

.carousel-viewport.slide-in-right{ animation: carousel-slide-from-right .32s ease; }
.carousel-viewport.slide-in-left{ animation: carousel-slide-from-left .32s ease; }

.carousel-dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  margin: 4px 0 16px;
}

.carousel-dot{
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  transition: background .2s ease, transform .2s ease, width .2s ease;
}

.carousel-dot.is-active{
  background: var(--gold-bright);
  width: 20px;
  border-radius: 999px;
}

.carousel-dot:focus-visible{ outline: 2px solid var(--gold-bright); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce){
  .carousel-viewport.slide-in-right,
  .carousel-viewport.slide-in-left{ animation: none !important; }
}

/* ===============================
   PRELOADER
   =============================== */
#preloader{
  position: fixed;
  inset: 0;
  z-index: 9999;

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

  background:
    radial-gradient(900px 600px at 20% 30%, var(--gold-glow), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg0));
}

.preloader-box{ width: min(320px, 80vw); text-align:center; }

.preloader-ring{
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
}

.preloader-ring-arc{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(216,180,106,.18);
  border-top-color: var(--gold-bright);
  animation: preloader-spin 1s linear infinite;
}

.preloader-ring-core{
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap: 1px;

  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;

  background: linear-gradient(180deg, rgba(216,180,106,.14), rgba(255,255,255,.03));
  border: 1px solid var(--gold-soft);
  background-clip: padding-box;
  color: var(--gold-bright);
}

.preloader-ring-core .slash{ opacity: .75; font-weight: 500; }

@keyframes preloader-spin{ to{ transform: rotate(360deg); } }

.preloader-bar{
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.preloader-progress{
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width .3s ease;
  overflow: hidden;
}

.preloader-progress::after{
  content:"";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: preloader-shimmer 1.4s ease-in-out infinite;
}

@keyframes preloader-shimmer{ to{ transform: translateX(100%); } }

.preloader-text{
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(210,220,235,.8);
  letter-spacing: .3px;
}

@media (prefers-reduced-motion: reduce){
  .preloader-ring-arc, .preloader-progress::after{ animation: none !important; }
}

#preloader.hide{
  opacity: 0;
  pointer-events:none;
  transition: opacity .6s ease;
}

/* ===============================
   PRICE MODE — CINEMATIC TRANSITION
   =============================== */
.logo,
.logo-title,
.subtitle,
.buttons,
.updated{
  transition:
    transform .6s cubic-bezier(.22,.61,.36,1),
    opacity .45s ease;
  will-change: transform, opacity;
}

.app.price-mode .logo,
.app.price-mode .logo-title{
  transform: translateY(42px) scale(.96);
  opacity: 0;
}

.app.price-mode .subtitle{
  transform: translateY(36px);
  opacity: 0;
}

.app.price-mode .buttons,
.app.price-mode .updated{
  transform: translateY(28px);
  opacity: 0;
  pointer-events: none;
}

.app.price-mode .main-card{
  transform: translateY(32px);
  opacity: 0;
  pointer-events: none;
}

.app.price-mode::after{
  content:"";
  position:absolute;
  inset:-40px;
  z-index:1;
  pointer-events:none;
  background: radial-gradient(650px 460px at 50% 18%, rgba(0,0,0,.18), transparent 72%);
}

/* ===============================
   MEDIA: VERY SMALL HEIGHT
   =============================== */
@media (max-height: 740px){
  .logo{ width: 60px; height: 60px; margin: 4px auto 18px; }
  .logo-num, .logo-slash{ font-size: 17px; }
  .logo-title{ width: min(320px, 84vw); margin: 2px 0 8px; }
  .subtitle{ margin: 6px 0 12px; font-size: 12.8px; }
  .buttons{ gap: 10px; }
  .btn, button.btn{ padding: 12px 12px; border-radius: 18px; }
  .updated{ margin-top: 10px; }
  .main-card{ margin-top: 4px; }
}

/* ===============================
   SAFE MEDIA SCALING
   =============================== */
img, svg, video, canvas{ max-width:100%; height:auto; }

/* ===============================
   MAIN CARD
   =============================== */
.main-card{
  width: min(var(--w), 92vw);
  max-width: 100%;
  margin-top: 8px;
  padding: 26px 24px 32px;
  border-radius: var(--radius2);

  background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.06));
  border: 1px solid var(--gold-line);
  outline: 1px solid var(--gold-soft);
  box-shadow: 0 30px 70px rgba(0,0,0,.55);

  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  position: relative;
  z-index: 1;

  animation: card-enter .55s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes card-enter{
  from{ opacity: 0; transform: translateY(14px) scale(.98); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

html.no-motion .main-card{ animation: none; }

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
