/* ============ МАГАЗИН — мистический UI (v3) ============ */
[hidden] { display: none !important; }

body {
  background: var(--grad-bg) !important;
  background-attachment: fixed;
  font-family: var(--font-body);
  position: relative; overflow-x: hidden;
  /* контраст: ярче текст на тёмном стекле */
  --text: rgba(255,255,255,.98);
  --text-muted: rgba(233,222,255,.84);
  --text-faint: rgba(210,194,240,.66);
  color: var(--text);
  font-weight: 500;
}
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(75px); z-index: -2; pointer-events: none;
}
body::before { width: 540px; height: 540px; left: -140px; top: -60px; background: radial-gradient(circle, #7a3ec0, transparent 70%); opacity: .26; }
body::after { width: 520px; height: 520px; right: -150px; top: 220px; background: radial-gradient(circle, #2e8f86, transparent 70%); opacity: .16; }
.background-stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .6;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 28% 42%, #d8c4ff, transparent),
    radial-gradient(1.3px 1.3px at 52% 12%, #fff, transparent), radial-gradient(1px 1px at 70% 30%, #aef0e0, transparent),
    radial-gradient(1.4px 1.4px at 84% 55%, #fff, transparent), radial-gradient(1.1px 1.1px at 40% 70%, #e7d9ff, transparent),
    radial-gradient(1.2px 1.2px at 90% 80%, #fff, transparent), radial-gradient(1px 1px at 18% 85%, #aef0e0, transparent);
  animation: shop-drift 9s ease-in-out infinite;
}
@keyframes shop-drift { 0%,100% { opacity: .45 } 50% { opacity: .8 } }

.shop-page { max-width: 960px; position: relative; z-index: 1; padding-bottom: 90px; }

/* ---- Hero ---- */
.shop-hero { text-align: center; margin: 8px 0 4px; }
.shop-title {
  font-family: var(--font-decor); font-weight: 400; font-size: 2.6rem; letter-spacing: 1px; margin: 0;
  background: linear-gradient(180deg, #fff, #d8c4ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.shop-subtitle { color: var(--text-muted); font-size: 1.1rem; font-weight: 500; line-height: 1.55; margin: 8px 0 0; }
.shop-hero::after {
  content: ""; display: block; width: 220px; height: 2px; margin: 16px auto 6px;
  background: linear-gradient(90deg, transparent, rgba(201,179,236,.55), transparent);
}

/* ---- Glass surface (shared) ---- */
.shop-accordion, .shop-balance, .shop-success-banner, .buy-modal__sheet {
  background: linear-gradient(180deg, rgba(38,20,64,.72), rgba(16,9,32,.78));
  border: 1px solid rgba(201,179,236,.3); border-radius: var(--r-lg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 50px rgba(0,0,0,.5), inset 0 0 30px rgba(124,58,200,.08);
}

/* ---- Balance ---- */
.shop-balance { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 16px; }
.shop-balance__icon { font-size: 1.6rem; color: #ffd98a; filter: drop-shadow(0 0 6px rgba(255,217,138,.5)); }
.shop-balance__label { font-size: .78rem; color: var(--text-muted); }
.shop-balance__items { font-family: var(--font-display); font-size: 1.1rem; color: #f3ecff; }

/* ---- Banners ---- */
.shop-success-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 16px; border-color: rgba(126,233,208,.4); }
.shop-success-banner__check { width: 30px; height: 30px; border-radius: 50%; background: rgba(126,233,208,.2); color: #8fe6c0; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.shop-success-banner__title { font-family: var(--font-display); font-size: 1.05rem; color: #f3ecff; }
.shop-success-banner__text { font-size: .82rem; color: var(--text-muted); }
.shop-error-banner { background: rgba(120,30,40,.3); border: 1px solid rgba(248,113,113,.4); color: #ffb3b8; border-radius: var(--r-md); padding: 13px 16px; margin-bottom: 16px; font-size: .9rem; }

/* ---- Loading ---- */
.shop-loading { text-align: center; padding: 40px; color: var(--text-muted); }
.shop-spinner { width: 38px; height: 38px; margin: 0 auto 14px; border: 3px solid rgba(201,179,236,.25); border-top-color: #d8c4ff; border-radius: 50%; animation: shop-spin 1s linear infinite; }
@keyframes shop-spin { to { transform: rotate(360deg) } }

/* ---- Accordion ---- */
.shop-accordion { margin-bottom: 16px; overflow: hidden; transition: border-color .2s; }
.shop-accordion:hover { border-color: rgba(201,179,236,.35); }
.shop-accordion__head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: transparent; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.shop-accordion__head:hover .shop-accordion__title { color: #ffd98a; }
.shop-accordion__title { flex: 1; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: #f7f2ff; display: inline-flex; align-items: center; gap: 10px; transition: color .15s; }
.shop-accordion__title i { color: #d8c4ff; font-size: 1.2rem; }
.shop-accordion__hint { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.shop-accordion__chevron { color: #c9b3ec; font-size: 1rem; transition: transform .3s; }
.shop-accordion--open .shop-accordion__chevron { transform: rotate(180deg); }
.shop-accordion__body { max-height: 0; overflow: hidden; transition: max-height .4s ease; padding: 0 22px; }
.shop-accordion--open .shop-accordion__body { max-height: 5000px; padding: 0 22px 22px; }

.shop-section__hint { color: var(--text-muted); font-size: .98rem; font-weight: 500; line-height: 1.5; margin: 6px 0 16px; }
.shop-group { margin-bottom: 22px; }
.shop-group:last-child { margin-bottom: 0; }
.shop-group__title { display: inline-block; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: #ede2ff; background: rgba(124,58,200,.28); border: 1px solid rgba(201,179,236,.35); border-radius: 999px; padding: 6px 15px; margin-bottom: 12px; }
.shop-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.shop-cards--compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---- Card ---- */
.shop-card {
  position: relative; background: rgba(20,11,38,.74); border: 1px solid rgba(201,179,236,.28);
  border-radius: var(--r-md); padding: 24px 20px 18px; text-align: center; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.shop-card:hover { transform: translateY(-4px); border-color: rgba(126,233,208,.4); box-shadow: 0 16px 38px rgba(0,0,0,.5); }
.shop-card--hit { border-color: rgba(183,108,255,.5); box-shadow: inset 0 0 26px rgba(124,58,200,.14); }
.shop-card--best { border-color: rgba(255,209,102,.5); box-shadow: inset 0 0 26px rgba(255,209,102,.12); }

/* Обложка расклада фоном карточки набора */
.shop-card__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .62; border-radius: inherit; pointer-events: none; z-index: 0; }
.shop-card__bg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(16,9,32,.32) 0%, rgba(16,9,32,.28) 38%, rgba(16,9,32,.68) 74%, rgba(16,9,32,.9) 100%); }
.shop-card__title, .shop-card__prices, .shop-card__description, .shop-card__cta { position: relative; z-index: 1; }
.shop-card__title { text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.shop-card__badge { z-index: 2; }

.shop-card__badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: .66rem; font-weight: 700; letter-spacing: .5px; padding: 3px 13px; border-radius: 999px; }
.shop-card__badge--hit { background: linear-gradient(135deg, #d8c4ff, #9b6bd6); color: #1a0c33; box-shadow: 0 0 12px rgba(183,108,255,.5); }
.shop-card__badge--best { background: linear-gradient(135deg, #ffe6a8, #ffd166); color: #2a1c05; box-shadow: 0 0 12px rgba(255,209,102,.55); }

.shop-card__title { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; color: #f7f2ff; margin: 4px 0 12px; }
.shop-card__prices { display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.shop-card__old-price { color: var(--text-faint); text-decoration: line-through; font-size: .95rem; }
.shop-card__price { font-family: var(--font-display); font-size: 2.15rem; font-weight: 700; color: #ffe08a; }
.shop-card__discount { font-size: .74rem; font-weight: 700; color: #b5f3e3; background: rgba(46,143,134,.32); border-radius: 999px; padding: 3px 9px; }
.shop-card__description { font-size: .9rem; font-weight: 500; color: var(--text-muted); margin: 7px 0 14px; min-height: 1.2em; }

.shop-card__cta { width: 100%; padding: 13px; border-radius: 11px; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s; background: transparent; color: #f7f2ff; border: 1px solid rgba(201,179,236,.4); }
.shop-card__cta:hover { border-color: #aef0e0; color: #aef0e0; box-shadow: 0 0 16px rgba(126,233,208,.25); }
.shop-card__cta:active { transform: scale(0.98); }
.shop-card__cta--solid { background: linear-gradient(135deg, #ffe6a8, #ffd166); color: #2a1c05; border: 0; }
.shop-card__cta--solid:hover { box-shadow: 0 0 22px rgba(255,209,102,.55); color: #2a1c05; }

/* ---- Buy modal ---- */
.buy-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.buy-modal__backdrop { position: absolute; inset: 0; background: rgba(6,3,14,.7); backdrop-filter: blur(3px); }
.buy-modal__sheet { position: relative; width: 100%; max-width: 420px; padding: 26px 26px 22px; }
.buy-modal__close { position: absolute; top: 12px; right: 14px; background: transparent; border: 0; color: var(--text-muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.buy-modal__close:hover { color: #f3ecff; }
.buy-modal__title { font-family: var(--font-display); font-size: 1.4rem; color: #f3ecff; margin-bottom: 4px; }
.buy-modal__product { color: var(--text-muted); font-size: .9rem; }
.buy-modal__price { font-family: var(--font-display); font-size: 2rem; color: #ffd98a; margin: 8px 0 16px; }
.buy-modal__label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }
.buy-modal__input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(201,179,236,.25); background: rgba(10,6,24,.5); color: var(--text); font-family: inherit; font-size: 1rem; }
.buy-modal__input:focus { outline: none; border-color: #aef0e0; box-shadow: 0 0 0 3px rgba(126,233,208,.15); }
.buy-modal__hint { font-size: .76rem; color: var(--text-faint); margin: 7px 0 16px; }
.buy-modal__submit { width: 100%; padding: 13px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #ffe6a8, #ffd166); color: #2a1c05; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform .12s, filter .12s; }
.buy-modal__submit:hover { filter: brightness(1.08); }
.buy-modal__submit:active { transform: scale(0.98); }
.buy-modal__submit:disabled { opacity: .6; cursor: default; }
.buy-modal__error { color: #ffb3b8; font-size: .85rem; margin-top: 10px; }

/* ============ АКЦЕНТНЫЕ ДЕТАЛИ (в духе premium) ============ */
.shop-emblem { position: relative; width: 70px; height: 70px; margin: 6px auto 2px; display: flex; align-items: center; justify-content: center; }
.shop-emblem i { font-size: 2.7rem; background: linear-gradient(135deg, #ffe6a8 0%, #ffd166 42%, #b76cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 13px rgba(255,209,102,.5)); }
.shop-emblem .se-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #d8c4ff; box-shadow: 0 0 7px #d8c4ff; animation: se-tw 2.6s ease-in-out infinite; }
.shop-emblem .se-1 { top: 4px; right: 8px; } .shop-emblem .se-2 { bottom: 6px; left: 6px; animation-delay: .9s; } .shop-emblem .se-3 { top: 22px; left: 0; animation-delay: 1.6s; }
@keyframes se-tw { 0%,100% { opacity: .3; transform: scale(.8) } 50% { opacity: 1; transform: scale(1.2) } }

/* CTA-вариативность: ХИТ — violet, МАКС — золото, остальные — ghost */
.shop-card--hit .shop-card__cta { background: linear-gradient(135deg, #d8c4ff, #9b6bd6); color: #1a0c33; border: 0; }
.shop-card--hit .shop-card__cta:hover { box-shadow: 0 0 20px rgba(183,108,255,.5); color: #1a0c33; }

/* внешнее свечение топ-карточек */
.shop-card--best { box-shadow: inset 0 0 26px rgba(255,209,102,.14), 0 0 30px rgba(255,209,102,.12); }
.shop-card--hit { box-shadow: inset 0 0 26px rgba(124,58,200,.16), 0 0 28px rgba(183,108,255,.12); }
.shop-card--best:hover { box-shadow: inset 0 0 26px rgba(255,209,102,.16), 0 18px 40px rgba(0,0,0,.5), 0 0 36px rgba(255,209,102,.2); }
.shop-card--hit:hover { box-shadow: inset 0 0 26px rgba(124,58,200,.18), 0 18px 40px rgba(0,0,0,.5), 0 0 34px rgba(183,108,255,.22); }

/* подсветка цены + ✦ у групп */
.shop-card__price { text-shadow: 0 0 14px rgba(255,209,102,.35); }
.shop-card--best .shop-card__price { text-shadow: 0 0 18px rgba(255,209,102,.55); }
.shop-group__title::before { content: "✦"; margin-right: 7px; color: #ffd98a; font-size: .85em; }

@media (prefers-reduced-motion: reduce) { *, .background-stars, .shop-emblem .se-star { animation: none !important; } }
