/* Game Site theme: the shop wears the game's own site.
   Nothing here names a game. Every colour comes from the tokens of the game's
   landing stylesheet (--magenta, --lime, --corn, --text, --card, --card-line,
   --grape ...), which the white-label header already loads on every shop page
   (shop.headerCss, views/layouts/shop.ejs). Each var() carries the landing
   template's own default, so a shop with no white-label header still renders
   as a complete dark theme instead of a broken one.

   Why this exists (FEAT-2026-1114-0085): a game shop on the 'tyga' theme got
   the game's nav on top of a white page with red buttons, and because the
   game's stylesheet turns body text white, the checkout's consent labels were
   white on white. */

:root {
  /* The game's tokens, read once. The --gs- names stop a token from being
     defined in terms of itself when the game's sheet is absent. */
  --gs-cta: var(--magenta, #ff4fa3);
  --gs-cta-deep: var(--magenta-deep, #c11f6e);
  --gs-go: var(--lime, #a6f34a);
  --gs-go-deep: var(--lime-deep, #4e9c12);
  --gs-gold: var(--corn, #ffd23f);
  --gs-ink: var(--text, #ffffff);
  --gs-ink-dim: var(--text-dim, rgba(255, 255, 255, 0.82));
  --gs-panel: var(--card, rgba(255, 255, 255, 0.10));
  --gs-line: var(--card-line, rgba(255, 255, 255, 0.26));
  /* The landing template's solid panel colour (its nav and menus). Solid on
     purpose: dropdowns, modals and inputs sit on it and must not show through. */
  --gs-solid: #1a1c23;
  --gs-cta-gloss: linear-gradient(180deg, color-mix(in srgb, var(--gs-cta) 55%, #ffffff) 0%, var(--gs-cta) 45%, var(--gs-cta-deep) 100%);
  --gs-go-gloss: linear-gradient(180deg, color-mix(in srgb, var(--gs-go) 60%, #ffffff) 0%, var(--gs-go) 45%, var(--gs-go-deep) 100%);
  --gs-go-ink: #143d00;

  /* The storefront's tokens, in terms of the game's. */
  --primary: var(--gs-cta);
  --primary-dark: var(--gs-cta-deep);
  --hov-primary: color-mix(in srgb, var(--gs-cta) 72%, #ffffff);
  --soft-primary: color-mix(in srgb, var(--gs-cta) 16%, transparent);
  --secondary: var(--grape, #7b2ff7);
  --accent: var(--gs-go);
  --success: var(--gs-go);
  --warning: var(--gs-gold);
  --danger: var(--gs-cta-deep);
  --info: var(--sky, #48bfe3);
  --light: var(--gs-solid);
  --dark: var(--gs-ink);
  --gray: color-mix(in srgb, var(--gs-ink) 62%, transparent);
  --gray-light: color-mix(in srgb, var(--gs-ink) 22%, transparent);
  /* Transparent: the page wrapper paints var(--background) inline, and the
     game's own body backdrop has to show through it. */
  --background: transparent;
  --card-bg: var(--gs-solid);
  --border-color: color-mix(in srgb, var(--gs-ink) 18%, transparent);
  --border-radius: 14px;
  --text-muted: var(--gs-ink-dim);
  --font-primary: var(--font-body, 'Segoe UI', system-ui, sans-serif);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Storefront navbar tokens, for a shop that has the theme but no injected nav. */
  --header-bg: var(--gs-solid);
  --header-fg: #ffffff;
  --header-muted: rgba(255, 255, 255, 0.62);
  --header-border: rgba(255, 255, 255, 0.14);
  --wordmark-filter: brightness(0) invert(1);
}

/* The page wears what the game's own body wears. The header stylesheet does
   not style the shop's body (BUG-2026-1114-0100); it offers the site's body
   as --wl-body-* (scripts/games/header-css.js) and this theme is the one that
   takes it. The second value of each is what the page gets when no game
   stylesheet is loaded. */
body {
  font-family: var(--wl-body-font-family, var(--font-primary));
  color: var(--wl-body-color, var(--gs-ink));
  background: var(--wl-body-background, linear-gradient(180deg, #22242c 0%, #1a1c23 48%, #14161b 100%));
  background-attachment: var(--wl-body-background-attachment, fixed);
}

/* One face for the whole page: whatever the game's body rule says. The
   storefront base sets its own face on headings and controls. */
.aiz-main-wrapper h1, .aiz-main-wrapper h2, .aiz-main-wrapper h3,
.aiz-main-wrapper h4, .aiz-main-wrapper h5, .aiz-main-wrapper h6,
.aiz-main-wrapper .btn, .aiz-main-wrapper .form-control,
.aiz-main-wrapper input, .aiz-main-wrapper select, .aiz-main-wrapper textarea,
.aiz-main-wrapper button {
  font-family: inherit;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--gs-gold);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

h4, h5, h6 {
  font-weight: 700;
  color: var(--gs-ink);
}

a {
  color: var(--gs-go);
  text-decoration: none;
}

a:hover {
  color: var(--gs-gold);
}

/* ── Buttons: the game's two glossy pills ─────────────────────────────────
   `.btn.btn-primary` (0,2,0) on purpose. The game's sheet styles a bare
   `.btn-primary` for its hero call to action (large padding, 1.05rem+ type)
   and loads later, so a single-class rule here would lose and every
   storefront button would be hero sized. */
.btn.btn-primary {
  display: inline-block;
  background: var(--gs-cta-gloss);
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 1.4rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 0 var(--gs-cta-deep), 0 6px 14px rgba(0, 0, 0, 0.3),
              inset 0 2px 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn.btn-primary:hover,
.btn.btn-primary:focus {
  background: var(--gs-cta-gloss);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--gs-cta-deep), 0 10px 20px rgba(0, 0, 0, 0.35),
              inset 0 2px 2px rgba(255, 255, 255, 0.6);
}
.btn.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--gs-cta-deep), 0 2px 6px rgba(0, 0, 0, 0.3),
              inset 0 2px 2px rgba(255, 255, 255, 0.5);
}

.btn.btn-success,
.btn.btn-secondary {
  display: inline-block;
  background: var(--gs-go-gloss);
  border: none;
  border-radius: 9999px;
  color: var(--gs-go-ink);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 1.4rem;
  box-shadow: 0 4px 0 var(--gs-go-deep), 0 6px 14px rgba(0, 0, 0, 0.3),
              inset 0 2px 2px rgba(255, 255, 255, 0.7);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn.btn-success:hover,
.btn.btn-secondary:hover {
  color: var(--gs-go-ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--gs-go-deep), 0 10px 20px rgba(0, 0, 0, 0.35),
              inset 0 2px 2px rgba(255, 255, 255, 0.7);
}
.btn.btn-success:active,
.btn.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--gs-go-deep), 0 2px 6px rgba(0, 0, 0, 0.3),
              inset 0 2px 2px rgba(255, 255, 255, 0.6);
}

.btn.btn-sm { font-size: 0.875rem; padding: 0.35rem 0.9rem; }
.btn.btn-lg { font-size: 1.1rem; padding: 0.8rem 1.8rem; }
.btn.btn-block { display: block; }

.btn.btn-outline-primary {
  color: var(--gs-go);
  border-color: var(--gs-go);
  border-radius: 9999px;
  background: transparent;
}
.btn.btn-outline-primary:hover {
  background: var(--gs-go);
  border-color: var(--gs-go);
  color: var(--gs-go-ink);
}
.btn.btn-outline-secondary,
.btn.btn-light {
  color: var(--gs-ink);
  border-color: var(--border-color);
  background: var(--gs-panel);
}
/* The storefront writes this one as rgba(var(--primary-rgb), .1), and an rgb
   triple cannot be read out of the game's hex token, so it is restated. */
.btn.btn-soft-primary {
  color: var(--gs-ink);
  background: color-mix(in srgb, var(--gs-cta) 26%, transparent);
  border-radius: 9999px;
}
.btn.btn-soft-primary:hover {
  color: #ffffff;
  background: var(--gs-cta);
}
.btn.btn-outline-danger {
  color: color-mix(in srgb, var(--gs-cta) 70%, #ffffff);
  border-color: color-mix(in srgb, var(--gs-cta) 70%, #ffffff);
  border-radius: 9999px;
  background: transparent;
}
.btn.btn-outline-danger:hover {
  color: #ffffff;
  background: var(--gs-cta-deep);
  border-color: var(--gs-cta-deep);
}

/* ── Panels ── */
.card, .product-card {
  background: var(--gs-panel);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--gs-ink);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover, .product-card:hover {
  border-color: var(--gs-gold);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 30px color-mix(in srgb, var(--gs-gold) 22%, transparent);
}

.price {
  color: var(--gs-gold);
  font-weight: 700;
}

.text-primary { color: var(--gs-cta) !important; }
.text-dark, .text-reset { color: var(--gs-ink) !important; }
.text-muted { color: var(--gs-ink-dim) !important; }
.badge-primary, .bg-primary { background-color: var(--gs-cta) !important; }

.form-control,
.aiz-main-wrapper select.form-control {
  background: var(--gs-solid);
  border-color: var(--border-color);
  color: var(--gs-ink);
}
.form-control:focus {
  background: var(--gs-solid);
  color: var(--gs-ink);
  border-color: var(--gs-cta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gs-cta) 22%, transparent);
}
.form-control::placeholder { color: color-mix(in srgb, var(--gs-ink) 48%, transparent); }
/* Bootstrap paints read-only and disabled controls light grey at (0,2,0):
   the cart's quantity box was white ink on a pale box. */
.form-control[readonly],
.form-control:disabled {
  background: var(--gs-solid);
  color: var(--gs-ink);
}
.form-control:disabled { color: var(--gs-ink-dim); }

/* Body text is light on this theme, so Bootstrap's white and light panels
   (product description and review tabs, the review box, related products)
   would be light on light. Put dark ink back inside any light container. */
.bg-white,
.bg-light {
  color: #22242c;
}
.bg-white .text-reset,
.bg-light .text-reset,
.bg-white .text-dark,
.bg-light .text-dark {
  color: #22242c !important;
}
.bg-white .text-muted,
.bg-light .text-muted {
  color: #5b6270 !important;
}
.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.bg-light h1, .bg-light h2, .bg-light h3, .bg-light h4, .bg-light h5, .bg-light h6 {
  color: #22242c;
}
.bg-white .aiz-editor-data,
.bg-white .aiz-editor-data * {
  color: #22242c;
}
.bg-white a:not(.btn),
.bg-light a:not(.btn) {
  color: color-mix(in srgb, var(--gs-cta-deep) 70%, #000000);
}

::-webkit-scrollbar {
  width: 12px;
  background: #14161b;
}
::-webkit-scrollbar-thumb {
  background: var(--gs-cta-gloss);
  border-radius: 9999px;
  border: 2px solid #14161b;
}

/* ── Design-variant picker on the product page ── */
.variant-swatches {
  padding: 4px;
  scrollbar-width: thin;
}
.variant-swatch {
  background: var(--gs-panel);
  border: 2px solid var(--border-color) !important;
  border-radius: var(--radius-sm);
  outline: 3px solid transparent;
  outline-offset: -1px;
}
.variant-swatch:hover {
  border-color: var(--gs-gold) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--gs-gold) 35%, transparent);
}
.variant-swatch.active {
  outline-color: var(--gs-go);
  border-color: var(--gs-go) !important;
  box-shadow: 0 0 18px color-mix(in srgb, var(--gs-go) 50%, transparent);
}
/* Option tiles on the product page (size, colour): the page draws the picked
   one with rgba(var(--primary-rgb)), the platform's red. */
.aiz-main-wrapper .aiz-megabox .aiz-megabox-elem {
  border-color: var(--border-color);
}
.aiz-main-wrapper .aiz-megabox input:checked ~ .aiz-megabox-elem {
  border-color: var(--gs-cta);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gs-cta) 35%, transparent);
}
#selected-variant-label {
  color: var(--gs-gold) !important;
  letter-spacing: 0.02em;
}

/* ── The game's sheet styles the BARE `nav` element as its fixed top bar,
   which also captures the storefront's own <nav> wrappers (pagination,
   breadcrumbs) and pins them under the header. Put those back in flow. ── */
nav:has(.pagination),
nav[aria-label="breadcrumb"],
nav[aria-label="Pagination"] {
  position: static !important;
  width: auto;
  background: none;
  backdrop-filter: none;
  border-bottom: 0;
  z-index: auto;
}

/* The injected game nav: pin the inner row to the bar height and centre it. */
nav > .nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
}

/* ── Pagination pills ── */
.pagination .page-link {
  background: var(--gs-panel);
  border-color: var(--border-color) !important;
  color: var(--gs-ink) !important;
  border-radius: 9999px !important;
  margin: 0 0.2rem;
  font-weight: 600;
}
.pagination .page-link:hover {
  border-color: var(--gs-go) !important;
  color: var(--gs-go) !important;
  background: color-mix(in srgb, var(--gs-go) 12%, transparent);
}
.pagination .page-item.active .page-link {
  background: var(--gs-go-gloss) !important;
  border-color: var(--gs-go-deep) !important;
  color: var(--gs-go-ink) !important;
  box-shadow: 0 2px 0 var(--gs-go-deep), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}
.pagination .page-item.disabled .page-link {
  background: color-mix(in srgb, var(--gs-ink) 4%, transparent);
  color: var(--gray) !important;
}

/* ── Cart page ── */
.cart-page .text-primary { color: var(--gs-gold) !important; }
.cart-page .card-header.bg-white {
  background: color-mix(in srgb, var(--gs-ink) 5%, transparent) !important;
  color: var(--gs-gold);
  border-bottom: 1px solid var(--border-color);
}
.cart-page .card-header.bg-white h5 { color: var(--gs-gold); }

/* ── Tables (cart, order history) ──
   Bootstrap 4 paints the light header on the <thead> itself, not on its
   cells, so the row has to be cleared as well as the cells restyled. */
.table { color: var(--gs-ink); }
.table th, .table td { border-color: var(--border-color); }
.table .table-light,
.table .thead-light,
.table .table-light > th,
.table .table-light > td {
  background: transparent;
}
.table .table-light th,
.table .thead-light th {
  background: color-mix(in srgb, var(--gs-ink) 8%, transparent);
  color: var(--gs-gold);
  border-color: var(--border-color);
}
.table-hover tbody tr:hover {
  background: color-mix(in srgb, var(--gs-ink) 4%, transparent);
  color: var(--gs-ink);
}
.bg-white .table, .bg-light .table { color: #22242c; }

/* ── Product cards on list pages ──
   The card partial paints itself white in its own <style>, later in the
   document, so these carry two classes. Same card as the theme's home page:
   white tile for the art, dark caption, gold name, price in the play colour. */
.aiz-card-box.product-card {
  background: var(--gs-solid);
  border: 2px solid var(--gs-line) !important;
  border-radius: 16px !important;
}
.aiz-card-box.product-card .product-card-media { background: #ffffff; }
/* The card's art is an inline image at a fixed height, so square art sat at
   the left of a wider tile with a bare strip beside it. A square tile that the
   art fills, the same shape as the storefront home's cards. */
.aiz-card-box.product-card .product-card-media img {
  display: block;
  width: 100%;
  height: auto !important; /* the base's .h-md-210px is !important */
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.aiz-card-box.product-card h3,
.aiz-card-box.product-card h3 a.text-reset { color: var(--gs-gold) !important; }
.aiz-card-box.product-card .text-primary { color: var(--gs-go) !important; }
.aiz-card-box.product-card .rating { color: color-mix(in srgb, var(--gs-ink) 30%, transparent); }
.aiz-card-box.product-card .rating .opacity-50 { opacity: 1 !important; color: var(--gs-ink-dim); }
.aiz-card-box.product-card .card-footer { padding: 0 0.6rem 0.7rem !important; }

/* ── Store sub-navigation (Store Home / All Products / Reviews / Contact) ──
   A white Bootstrap strip under the game's dark nav. */
.bg-white:has(> .container > .nav) {
  background: color-mix(in srgb, var(--gs-solid) 82%, transparent) !important;
  border-color: var(--border-color) !important;
}
.bg-white:has(> .container > .nav) .nav-link.text-muted { color: var(--gs-ink-dim) !important; }
.bg-white:has(> .container > .nav) .nav-link.text-muted:hover { color: var(--gs-gold) !important; }
.bg-white:has(> .container > .nav) .nav-link.text-dark {
  color: var(--gs-gold) !important;
  border-color: var(--gs-gold) !important;
}

/* ── Checkout page ────────────────────────────────────────────────────────
   The page reads the tokens above for every colour, so only its shape and
   its one call to action are restated. `main.checkout-page` (0,1,1) because
   the page's own <style> block comes later in the document. */
main.checkout-page {
  background: transparent;
}
main.checkout-page .checkout-main,
main.checkout-page .order-summary {
  background: color-mix(in srgb, var(--gs-solid) 82%, transparent);
  backdrop-filter: blur(6px);
}
main.checkout-page .checkout-main {
  border: 1px solid var(--border-color);
}
main.checkout-page .checkout-header h1,
main.checkout-page .section-title,
main.checkout-page .summary-title {
  color: var(--gs-gold);
}
main.checkout-page .section-number {
  background: var(--gs-cta-gloss);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
main.checkout-page .checkout-input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gs-cta) 22%, transparent);
}
main.checkout-page .checkout-input::placeholder {
  color: color-mix(in srgb, var(--gs-ink) 48%, transparent);
}
main.checkout-page label,
main.checkout-page .form-check-label,
main.checkout-page .custom-control-label {
  color: var(--gs-ink);
}
main.checkout-page .summary-row.total {
  color: var(--gs-gold);
}
/* The button that takes the money is the game's play pill: the one green
   thing on the page. */
main.checkout-page .complete-order-btn {
  background: var(--gs-go-gloss);
  color: var(--gs-go-ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 5px 0 var(--gs-go-deep), 0 8px 18px rgba(0, 0, 0, 0.35),
              inset 0 2px 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.12s, box-shadow 0.12s;
}
main.checkout-page .complete-order-btn:hover {
  background: var(--gs-go-gloss);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--gs-go-deep), 0 12px 22px rgba(0, 0, 0, 0.4),
              inset 0 2px 2px rgba(255, 255, 255, 0.6);
}
main.checkout-page .complete-order-btn:disabled {
  background: var(--gray-light);
  color: var(--gs-ink-dim);
  box-shadow: none;
  transform: none;
}

/* ── Customer sign-in page ────────────────────────────────────────────────
   layouts/auth loads this sheet for the shop's colours but keeps its own
   white form column and does not load the game's stylesheet. Light ink and
   dark inputs belong to the storefront, not to that column. */
.auth-wrapper h1, .auth-wrapper h2, .auth-wrapper h3 { color: inherit; }
.auth-wrapper .marketing-headline { color: #ffffff; }
.auth-wrapper .text-muted { color: #6b7280 !important; }
.auth-wrapper .form-control,
.auth-wrapper .form-control:focus {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}
.auth-wrapper .form-control:focus { border-color: var(--gs-cta); }
.auth-wrapper .form-control::placeholder { color: #9ca3af; }
.auth-wrapper .auth-divider span { color: #6b7280; }
.auth-wrapper .btn-auth-primary,
.auth-wrapper .btn-auth-primary:hover {
  background: linear-gradient(180deg, var(--gs-cta) 0%, var(--gs-cta-deep) 100%);
  border-radius: 9999px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
/* :where() keeps this at the weight of a bare `a`, so it replaces the
   storefront's light link colour without beating the page's own buttons. */
:where(.auth-wrapper) a { color: var(--gs-cta-deep); }

@media (prefers-reduced-motion: reduce) {
  .btn.btn-primary, .btn.btn-success, .btn.btn-secondary,
  .card, .product-card, main.checkout-page .complete-order-btn {
    transition: none !important;
  }
  .btn.btn-primary:hover, .btn.btn-success:hover, .btn.btn-secondary:hover,
  main.checkout-page .complete-order-btn:hover {
    transform: none !important;
  }
}
