/* ============================================================
   ASHEN THRONE - SHOP page (shop.html)
   Loaded AFTER theme.css + mint.css + hub.css. Owns the game-shop
   shell: the left category rail, the Golden Ashes custom-amount
   storefront (buy-hero + chest grid), and the Token placeholder.
   The Mint tab reuses the mint-station chrome from mint.css.
   Tokens/fonts come from theme.css - no redeclaration here.
   ============================================================ */

.shop-shell {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 26px 22px 84px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* ── LEFT: category rail ─────────────────────────────────── */

.shop-rail {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.shop-rail__eyebrow { margin-bottom: 2px; }

.shop-cats { display: flex; flex-direction: column; gap: 8px; }

.shop-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(180deg, #0e1322 0%, #0a0e1c 100%);
  border: 1px solid var(--border-steel);
  border-left: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-chrome);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.shop-cat:hover { border-color: var(--border-glow); }
.shop-cat:active { transform: translateY(1px); }
.shop-cat.is-active {
  border-color: var(--border-gold);
  border-left-color: var(--accent-gold);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(255, 215, 0, 0.10), transparent 62%),
    linear-gradient(180deg, #141018 0%, #0a0e1c 100%);
  box-shadow: var(--glow-gold);
}

.shop-cat__icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-steel);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-gold);
  flex-shrink: 0;
  overflow: hidden;
}
.shop-cat__icon--img { padding: 0; }
.shop-cat__icon--img img { width: 100%; height: 100%; object-fit: cover; }
.shop-cat.is-active .shop-cat__icon { border-color: var(--border-gold); }

.shop-cat__text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.shop-cat__name {
  font-size: 15px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--text-bright);
}
.shop-cat__sub {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
}
.shop-cat__chev { color: var(--text-dim); font-size: 20px; opacity: 0.45; line-height: 1; }
.shop-cat.is-active .shop-cat__chev { color: var(--accent-gold); opacity: 1; }

.shop-rail__foot { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.shop-rail__foot .shop-balance { width: 100%; justify-content: space-between; }
.shop-rail__secure {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-chrome); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
}
.shop-rail__secure svg { color: var(--accent-green); }

/* ── RIGHT: content + panels ─────────────────────────────── */

.shop-content { min-width: 0; }
.shop-panel { display: none; }
.shop-panel.is-active { display: block; animation: shop-fade 0.25s ease; }
@keyframes shop-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.shop-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-bright);
}
.shop-head__title .gold,
.shop-head__sub b.gold {
  background: linear-gradient(180deg, #ffffff 0%, #fff3a0 55%, #ffd700 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.28));
}
.shop-head__sub {
  margin: 10px 0 0;
  max-width: 580px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Custom-amount hero ──────────────────────────────────── */

.buy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  margin-bottom: 24px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 320px at 100% 0%, rgba(255, 215, 0, 0.08), transparent 55%),
    linear-gradient(180deg, #0e1322 0%, #0a0e1c 100%);
  box-shadow: var(--glow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.buy-hero__set { padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 16px; }
.buy-hero__label {
  font-family: var(--font-chrome); font-size: 12px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-dim);
}

.buy-amount {
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid var(--border-gold);
  padding-bottom: 8px;
}
.buy-amount__cur {
  font-family: var(--font-display); font-size: 40px; line-height: 1;
  color: var(--accent-gold);
}
.buy-amount__input {
  flex: 1; min-width: 0; width: 100%;
  background: transparent; border: 0; outline: 0;
  font-family: var(--font-display); font-size: 52px; line-height: 1;
  letter-spacing: 0.02em; color: var(--text-bright);
}
.buy-amount__input::-webkit-outer-spin-button,
.buy-amount__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-amount__input { -moz-appearance: textfield; }
.buy-amount__input.flash { animation: amt-flash 0.5s ease; }
@keyframes amt-flash { 0% { color: var(--accent-gold); } 100% { color: var(--text-bright); } }

.buy-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 6px; outline: none;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.55), rgba(255, 215, 0, 0.12));
}
.buy-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(180deg, #ffe97a, #ffd700 60%, #b8870a);
  border: 1px solid #fff3a0; box-shadow: var(--glow-gold); cursor: pointer;
}
.buy-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(180deg, #ffe97a, #ffd700 60%, #b8870a);
  border: 1px solid #fff3a0; box-shadow: var(--glow-gold); cursor: pointer;
}
.buy-hero__bounds {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px; color: var(--text-dim);
}

.buy-hero__quote {
  padding: 24px 24px 22px;
  border-left: 1px solid var(--border-steel);
  background: rgba(0, 0, 0, 0.28);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.buy-quote__you-get {
  font-family: var(--font-chrome); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-dim);
}
.buy-quote__total { display: flex; align-items: baseline; gap: 10px; }
.buy-quote__emblem {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  align-self: center; box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}
.buy-quote__total #quoteTotal {
  font-family: var(--font-display); font-size: 46px; line-height: 1;
  color: var(--accent-gold); text-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
}
.buy-quote__unit { font-family: var(--font-chrome); font-size: 16px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.1em; }
.buy-quote__break { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.buy-quote__break b { color: var(--accent-green); }
.buy-bonus-badge {
  margin-top: 2px; padding: 4px 12px;
  border: 1px solid var(--accent-green); border-radius: var(--radius-pill);
  color: var(--accent-green);
  font-family: var(--font-chrome); font-weight: 700; font-size: 12px; letter-spacing: 0.14em;
}
.buy-bonus-badge.is-zero { border-color: var(--border-steel); color: var(--text-dim); }
.buy-cta { width: 100%; margin-top: 12px; padding: 14px; font-size: 16px; }
.buy-hero__fine {
  font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim);
}

/* ── Quick-pick chests ───────────────────────────────────── */

.shop-subhead {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 0 14px;
  font-family: var(--font-chrome); font-size: 13px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-bright);
}
.shop-subhead__meta { font-size: 10px; letter-spacing: 0.16em; color: var(--text-dim); }

.chest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 14px;
}
.chest-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 14px 14px;
  border: 1px solid var(--border-steel);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0e1322 0%, #0a0e1c 100%);
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.chest-card:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.chest-card:focus-visible { outline: 1px solid var(--accent-gold); outline-offset: 2px; }
.chest-card--best {
  border-color: var(--border-gold); box-shadow: var(--glow-gold);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.10), transparent 60%),
    linear-gradient(180deg, #141018 0%, #0a0e1c 100%);
}
.chest-card__art {
  width: 112px; height: 112px; display: grid; place-items: center;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.5));
}
.chest-card__art img { width: 100%; height: 100%; object-fit: contain; }
.chest-card__name {
  font-family: var(--font-chrome); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
}
.chest-card__ash { font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--accent-gold); }
.chest-card__ash span { font-family: var(--font-chrome); font-size: 11px; color: var(--text-dim); }
.chest-card__bonus { font-family: var(--font-mono); font-size: 10px; color: var(--accent-green); min-height: 13px; }
.chest-card__buy { width: 100%; margin-top: 6px; }
.chest-card__ribbon {
  position: absolute; top: 10px; right: -1px;
  padding: 3px 10px;
  font-family: var(--font-chrome); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  background: var(--bg-panel); border: 1px solid var(--border-steel); border-right: 0;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill); color: var(--text-dim);
}
.chest-card__ribbon--best { color: #1a0e02; background: linear-gradient(180deg, #ffe97a, #ffd700); border-color: var(--border-gold); }

.shop-termlog { margin-top: 20px; }

/* ── Mint tab - folded mint-station fits the content column ─ */

.shop-mint-station {
  padding: 8px 0 24px;
  max-width: none;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 40px;
}
.shop-mint-station .mint-item { top: calc(var(--header-h) + 20px); }

/* ── Token tab - coming soon ─────────────────────────────── */

.token-soon {
  max-width: 560px; margin: 32px auto;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: 40px 24px 56px;
}
.token-soon__coin { animation: coin-float 4.5s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.28)); }
@keyframes coin-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}
.token-soon__eyebrow { margin: 4px 0 0; }
.token-soon__title {
  margin: 0; font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px); letter-spacing: 0.06em; color: var(--text-bright);
}
.token-soon__body { margin: 0; max-width: 440px; color: var(--text-secondary); font-family: var(--font-body); font-size: 14px; line-height: 1.7; }
.token-soon__meta {
  display: flex; gap: 10px; margin-top: 4px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim);
}
.token-soon__meta span:nth-child(even) { opacity: 0.4; }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .shop-shell { grid-template-columns: 1fr; gap: 16px; padding: 20px 14px 64px; }
  .shop-rail { position: static; }
  .shop-cats { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .shop-cats::-webkit-scrollbar { display: none; }
  .shop-cat { min-width: 172px; flex-shrink: 0; }
  .shop-cat__chev { display: none; }
  .shop-rail__foot { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .buy-hero { grid-template-columns: 1fr; }
  .buy-hero__quote { border-left: 0; border-top: 1px solid var(--border-steel); }
}
@media (max-width: 560px) {
  .buy-amount__input { font-size: 42px; }
  .chest-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .chest-card__art { width: 92px; height: 92px; }
}
