/* ========================================================================
   Primal — token store (/store)

   The product listing a payment processor reviews and a buyer actually
   spends money on, so it leans clearer than the rest of the site: real
   prices, an explicit "what you're buying" block, and a checkout summary
   that shows the arithmetic instead of hiding it behind a badge.
   Tokens come from style.css.
   ======================================================================== */

.store-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 24px 88px;
}

/* ---- heading ---------------------------------------------------------- */
.store-head { text-align: center; margin-bottom: 30px; }

.store-head h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 44px);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
}

.store-sub {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---- what you're buying ----------------------------------------------- */
.store-explain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 0 0 42px;
}

.explain-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.explain-item h2 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--accent);
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

.explain-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.explain-item strong { color: var(--text); }

.store-grid-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 23px);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 20px;
  text-align: center;
}

/* ---- the bundle grid --------------------------------------------------- */
.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}

.token-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.token-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .38);
}

.token-card:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* Selected state has to be obvious at a glance — a buyer must never be
   unsure which bundle the checkout total refers to. */
.token-card[aria-checked="true"] {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, var(--accent-fade), transparent 62%),
    var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 30px rgba(0, 0, 0, .45);
}

.token-card.is-popular { border-color: rgba(217, 166, 72, .55); }

.tc-ribbon {
  position: absolute;
  top: 10px;
  right: -1px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #24180a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px 0 0 3px;
}

.tc-amount {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .02em;
}

.tc-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tc-price span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12.5px;
}

.tc-art {
  width: 100%;
  max-width: 148px;
  margin: 4px auto 2px;
}

.tc-art svg { width: 100%; height: auto; display: block; }

.tc-bonus {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.b-free { color: var(--gold-bright); }
.b-pct { color: var(--emerald); }

/* ---- checkout ---------------------------------------------------------- */
.checkout {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
}

.checkout h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 16px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.co-empty {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 18px;
  text-align: center;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.co-lines { margin: 0 0 18px; }

.co-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.co-lines dt { color: var(--text-muted); margin: 0; }
.co-lines dd { margin: 0; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.co-lines .co-total { border-bottom: none; padding-top: 11px; }
.co-lines .co-total dt { color: var(--text); font-weight: 700; }
.co-lines .co-total dd { color: var(--accent); font-size: 16px; font-weight: 800; }

.co-field { display: block; margin-bottom: 16px; }

.co-field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.co-field input {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.co-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-fade);
}

.co-field input.invalid { border-color: var(--danger); }

.co-field small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.co-buy { width: 100%; justify-content: center; }
.co-buy[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.co-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gold-bright);
  text-align: center;
  min-height: 0;
}

.co-note:empty { display: none; }

.co-legal {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
}

.co-legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 520px) {
  .token-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .tc-amount { font-size: 16px; }
  .checkout { padding: 20px 18px; }
}
