/* ── The BlankSlate Expansion Store — store-specific styles ──────────────────
   Builds on styles.css design tokens (--bg, --gold, --text, …). Not a public
   marketplace: this is the official, owner-curated expansion storefront. */

.store-body { background: radial-gradient(1200px 600px at 50% -10%, rgba(214,164,76,0.10), transparent 60%), var(--bg); }

/* reveal (this page doesn't load the landing script's observer; store.js wires it) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.in { opacity: 1; transform: none; } }

.muted { color: var(--muted); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.store-hero { padding: 120px 0 70px; text-align: center; }
.store-hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.02; margin: 14px 0 18px; }
.store-hero .lead { max-width: 640px; margin: 0 auto 30px; color: var(--muted); font-size: 19px; }
.store-hero .hero-cta { justify-content: center; }

/* ── Stats / value row ─────────────────────────────────────────────────── */
.store-stats { padding: 8px 0 40px; }
.vrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vcell { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
         border-radius: var(--radius); padding: 22px 20px; }
.vcell h3 { font-size: 16px; color: var(--gold-bright); margin: 0 0 6px; }
.vcell p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ── Store header + search ─────────────────────────────────────────────── */
.store-main { padding: 40px 0 60px; }
.store-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.store-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 8px 0 0; max-width: 620px; }
.store-search input {
  width: min(360px, 80vw); padding: 13px 16px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-family: inherit; font-size: 15px; outline: none; transition: border-color .2s;
}
.store-search input:focus { border-color: var(--gold-dim); }

/* ── Filters ───────────────────────────────────────────────────────────── */
.store-filters { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-group, .filter-flags, .store-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.store-tags { margin-bottom: 30px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; color: var(--muted);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-soft);
  transition: all .18s var(--ease); white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--gold-dim); }
.chip.active, .chip[aria-pressed="true"] { color: #1a1304; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.store-tags .chip { font-size: 12px; padding: 6px 12px; }

/* ── Bank grid + cards ─────────────────────────────────────────────────── */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.bank-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.bank-card:hover { transform: translateY(-4px); border-color: var(--gold-dim); box-shadow: 0 18px 50px rgba(0,0,0,0.45); }
.bank-cover { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.bank-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.bank-card:hover .bank-cover img { transform: scale(1.04); }
.cover-preview {
  position: absolute; inset: auto 12px 12px auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text); background: rgba(10,10,12,0.7); border: 1px solid var(--line);
  backdrop-filter: blur(8px); transition: all .18s; opacity: 0; transform: translateY(6px);
}
.bank-card:hover .cover-preview { opacity: 1; transform: none; }
.cover-preview:hover { background: var(--gold); color: #1a1304; border-color: var(--gold); }

.badges { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 24px); }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 7px; text-transform: uppercase; }
.badge.new     { background: var(--gold); color: #1a1304; }
.badge.owned   { background: #2f7d4f; color: #eafff1; }
.badge.soon    { background: rgba(10,10,12,0.78); color: var(--gold-bright); border: 1px solid var(--gold-dim); backdrop-filter: blur(6px); }
.badge.feat    { background: rgba(241,207,134,0.14); color: var(--gold-bright); border: 1px solid var(--gold-dim); }

.bank-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bank-cat { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dim); }
.bank-title { font-size: 19px; font-weight: 600; color: var(--text); line-height: 1.2; }
.bank-desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bank-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); }
.bank-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bank-tags span { font-size: 11px; color: var(--muted); background: rgba(255,255,255,0.04); padding: 3px 9px; border-radius: 6px; }
.bank-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.price { font-family: "Fraunces", serif; font-size: 24px; color: var(--gold-bright); }
.price small { font-family: "Inter", sans-serif; font-size: 12px; color: var(--muted); }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.btn-owned { background: rgba(47,125,79,0.16); color: #8fe6ad; border: 1px solid rgba(47,125,79,0.5); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.store-empty { text-align: center; padding: 60px 0; }
.store-empty h3 { font-size: 22px; margin-bottom: 8px; }
.store-empty p { color: var(--muted); margin-bottom: 18px; }

/* ── Closing band ──────────────────────────────────────────────────────── */
.store-band { text-align: center; padding: 90px 0; border-top: 1px solid var(--line-soft);
  background: radial-gradient(700px 320px at 50% 0%, rgba(214,164,76,0.08), transparent 70%); }
.store-band h2 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 16px; }
.store-band p { max-width: 600px; margin: 0 auto 26px; color: var(--muted); font-size: 18px; }
.store-band .hero-cta { justify-content: center; }

/* ── Modals ────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.74); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; z-index: 1; width: min(560px, 96vw); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: pop .25s var(--ease);
}
.detail-card { width: min(820px, 96vw); padding: 0; overflow: hidden; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-x { position: absolute; top: 14px; right: 16px; z-index: 3; background: rgba(0,0,0,0.4); border: 1px solid var(--line);
  color: var(--text); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; }
.modal-x:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
.modal-card h2 { font-size: 26px; margin: 6px 0 14px; }
.modal-card .ticks { margin-top: 14px; }

/* detail modal layout */
.detail-grid { display: grid; grid-template-columns: 320px 1fr; }
.detail-cover { position: relative; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { padding: 30px 30px 32px; }
.detail-info h2 { font-size: 28px; margin: 4px 0 10px; }
.detail-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.detail-row b { color: var(--text); }
.detail-info .long { color: var(--muted); line-height: 1.65; font-size: 14.5px; margin-bottom: 18px; }
.detail-section h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dim); margin: 18px 0 10px; }
.included { list-style: none; display: grid; gap: 8px; padding: 0; margin: 0 0 8px; }
.included li { position: relative; padding-left: 24px; color: var(--muted); font-size: 14px; }
.included li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.preview-list { display: grid; gap: 8px; margin: 6px 0 18px; }
.preview-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line-soft);
  border-radius: 10px; background: rgba(255,255,255,0.02); cursor: pointer; transition: border-color .2s; }
.preview-item:hover { border-color: var(--gold-dim); }
.preview-item .pp { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a1304; font-size: 12px; flex: none; }
.preview-item .pn { font-size: 13.5px; color: var(--text); }
.detail-buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* ── Library (auth + owned list) ───────────────────────────────────────── */
.lib-form { display: flex; gap: 10px; margin: 14px 0; }
.lib-form input {
  flex: 1; padding: 12px 14px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.lib-form input:focus { border-color: var(--gold-dim); }
.lib-msg { font-size: 13px; min-height: 18px; margin: 6px 0 0; }
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.lib-list { display: grid; gap: 10px; }
.lib-item { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line-soft);
  border-radius: 12px; background: rgba(255,255,255,0.02); }
.lib-item img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.lib-meta { flex: 1; min-width: 0; }
.lib-title { font-size: 15px; font-weight: 600; color: var(--text); }

/* ── Preview player ────────────────────────────────────────────────────── */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 12px;
  background: linear-gradient(180deg, rgba(12,12,16,0.6), var(--bg-2)); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); animation: slideup .3s var(--ease); }
.player[hidden] { display: none; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.player-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.player-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--gold-dim);
  background: var(--gold); color: #1a1304; font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.player-btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); font-size: 20px; }
.player-meta { min-width: 0; flex: none; width: 200px; }
.player-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 11px; color: var(--muted-2); }
.player-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); cursor: pointer; overflow: hidden; }
.player-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }
.player-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px); z-index: 120;
  background: var(--panel-2); border: 1px solid var(--gold-dim); color: var(--text); padding: 13px 20px;
  border-radius: 12px; font-size: 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.5); opacity: 0; transition: all .3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .vrow { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-cover { aspect-ratio: 16/9; }
}
@media (max-width: 560px) {
  .bank-grid { grid-template-columns: 1fr; }
  .store-head { flex-direction: column; align-items: stretch; }
  .store-search input { width: 100%; }
  .player-meta { width: 120px; }
  .player-time { display: none; }
}
