:root {
  --bg: #04060c;
  --bg-2: #0a0f1c;
  --card: #0d1424;
  --line: #1a2740;
  --text: #e8eefc;
  --muted: #8a9ab8;
  --blue: #1e8bff;
  --cyan: #3cc8ff;
  --glow: 0 0 24px rgba(30, 139, 255, 0.35);
  --radius: 14px;
  --head: "Chakra Petch", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #0b1f44 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 40px; width: auto; mix-blend-mode: lighten; }
.brand span { display: none; font-family: var(--head); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.02em; }
.nav { display: flex; gap: 1.2rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--cyan); }
.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.cart-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn:hover { border-color: var(--blue); box-shadow: var(--glow); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--blue); color: #fff; font-size: 0.75rem; font-weight: 600;
  display: grid; place-items: center;
}

/* Hero */
.hero { display: grid; justify-items: center; padding: 1rem 1rem 3rem; }
.hero-logo { width: min(720px, 100%); aspect-ratio: 16 / 7.4; object-fit: cover; object-position: center; mix-blend-mode: lighten; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.2rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem; border-radius: 12px; border: 1px solid transparent;
  font: 600 0.95rem var(--body); text-decoration: none; cursor: pointer; transition: 0.15s;
}
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #021028; }
.btn.primary:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.btn.primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn.ghost:hover { border-color: var(--blue); }
.btn.block { width: 100%; }

/* Sections */
.section { max-width: 1200px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2.5rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
h2 { font-family: var(--head); font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; letter-spacing: 0.02em; }
.search {
  flex: 1 1 260px; max-width: 360px; padding: 0.7rem 1rem; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font: inherit;
}
.search:focus { outline: none; border-color: var(--blue); box-shadow: var(--glow); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.chip {
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--muted); font: 500 0.88rem var(--body); cursor: pointer;
}
.chip[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.product {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: 0.15s;
}
.product:hover { border-color: #26406b; transform: translateY(-2px); }
.thumb {
  aspect-ratio: 1 / 1; display: grid; place-items: center; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, var(--c1, #0f2a55), var(--c2, #071125) 75%);
}
/* Show the whole card (not a cropped corner), sharp, with a little shadow. */
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0.9rem; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55)); }
.thumb img.photo { object-fit: cover; padding: 0; filter: none; }
.thumb .tag {
  font-family: var(--head); font-weight: 700; font-size: 1.15rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.9); text-shadow: 0 0 18px rgba(60, 200, 255, 0.6);
  padding: 0 1rem; text-align: center;
}
.badge {
  position: absolute; top: 10px; left: 10px; padding: 0.2rem 0.55rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600; background: rgba(0, 0, 0, 0.6); color: #ffd36b;
}
.badge.out { color: #ff7a7a; }
.product-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 1rem 1rem; flex: 1; }
.product-body h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.product-body p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.6rem; }
.price { font-family: var(--head); font-weight: 700; font-size: 1.2rem; color: var(--cyan); }
.add { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

/* Lists (events / releases) */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.list-item { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--radius); padding: 1rem 1.1rem; }
.list-item .when { font-size: 0.8rem; font-weight: 600; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.06em; }
.list-item h3 { margin: 0.3rem 0; font-size: 1.05rem; }
.list-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Footer */
.footer { display: grid; justify-items: center; gap: 0.3rem; padding: 3rem 1rem 4rem; border-top: 1px solid var(--line); margin-top: 2rem; text-align: center; }
.footer img { width: 160px; aspect-ratio: 16 / 7.4; object-fit: cover; mix-blend-mode: lighten; }
.footer p { margin: 0; letter-spacing: 0.12em; font-size: 0.8rem; text-transform: uppercase; }

/* Cart drawer */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 50;
  display: flex; flex-direction: column; background: var(--bg-2); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.4rem; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 0.4rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0.6rem 1.2rem; }
.drawer-foot { padding: 1rem 1.2rem 1.4rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.total-row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.line h4 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.line .lp { color: var(--cyan); font-weight: 600; }
.qty { justify-self: start; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 28px; background: var(--card); border: 0; color: var(--text); cursor: pointer; font-size: 1rem; }
.qty span { min-width: 30px; text-align: center; font-size: 0.9rem; }
.remove { background: none; border: 0; color: var(--muted); font-size: 0.8rem; cursor: pointer; justify-self: end; }
.remove:hover { color: #ff7a7a; }
.error { color: #ff8a8a; font-size: 0.88rem; margin: 0; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--card); border: 1px solid var(--blue); box-shadow: var(--glow);
  padding: 0.7rem 1.1rem; border-radius: 12px; font-size: 0.92rem;
}

@media (max-width: 640px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.7rem; }
  .product-body { padding: 0.7rem; }
}

/* Product cards open a details view */
.product { cursor: pointer; }
.product:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.product-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.7); display: grid; place-items: center; padding: 1rem; }
.pd[hidden] { display: none; }
body.pd-open { overflow: hidden; }
.pd-box { position: relative; width: min(980px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--card, #0c1426); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.pd-close { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; background: rgba(5, 10, 20, 0.7); }
.pd-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.pd-media { display: grid; place-items: center; padding: 1.5rem; min-height: 360px; background: radial-gradient(circle at 30% 20%, var(--c1), var(--c2)); border-radius: 18px 0 0 18px; }
.pd-media img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); }
.pd-media .tag { font: 700 1.6rem "Chakra Petch", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.pd-info { padding: 1.6rem 1.6rem 1.4rem; display: grid; gap: 0.7rem; align-content: start; }
.pd-cat { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
.pd-info h2 { margin: 0; font-size: 1.6rem; line-height: 1.2; padding-right: 2rem; }
.pd-price { font-size: 2rem; font-weight: 700; color: var(--cyan); }
.pd-stock { font-weight: 600; color: #34d399; }
.pd-stock.low { color: #ffd36b; }
.pd-stock.out { color: #ff7a7a; }
.pd-about h3 { font-size: 0.95rem; margin: 0.4rem 0 0.3rem; }
.pd-about ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; color: var(--text); }
.pd-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.pd-actions .btn { flex: 1 1 160px; }
@media (max-width: 720px) {
  .pd { padding: 0; place-items: end center; }
  .pd-box { max-height: 100vh; border-radius: 18px 18px 0 0; }
  .pd-body { grid-template-columns: 1fr; }
  .pd-media { border-radius: 18px 18px 0 0; min-height: 0; padding: 1.2rem 1.2rem 0.6rem; }
  .pd-media img { max-height: 48vh; }
  .pd-info { padding: 1.1rem 1.1rem 1.4rem; }
}

/* Pickup / shipping choice in the cart */
.ful { display: grid; gap: 0.45rem; border: 0; margin: 0; padding: 0; }
.ful legend { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.ful label { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ful label:has(input:checked) { border-color: var(--blue); background: rgba(30, 139, 255, 0.08); }
.ful label.off { opacity: 0.45; cursor: not-allowed; }
.ful input { accent-color: var(--blue); width: 1.05rem; height: 1.05rem; }
.ful .fn { display: grid; gap: 0.1rem; }
.ful .fn small { color: var(--muted); font-size: 0.78rem; }
.ful .fp { font-weight: 600; color: var(--cyan); }
.total-row.sub { font-size: 0.92rem; color: var(--muted); }

.badge.pre { color: #7dd3fc; }
.ev-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.ev-form { padding: 1.6rem; display: grid; gap: .6rem; grid-column: 1 / -1; max-width: 520px; }
.ev-form form { display: grid; gap: .6rem; }
.ev-form label { display: grid; gap: .25rem; font-size: .85rem; color: var(--muted); }
.ev-form input { padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: #0b1424; color: var(--text); font: 1rem inherit; }
.ev-form h2 { margin: 0; }
.pd-box.narrow { width: min(560px, 100%); }

/* Home page: one scrolling row of products + "View entire inventory" */
.row-wrap { position: relative; }
.grid.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 230px; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 .2rem; padding: .2rem .2rem 1rem; scrollbar-width: thin; }
.grid.strip > * { scroll-snap-align: start; }
.grid.strip > p { grid-column: 1 / -1; }
.row-arrow { position: absolute; top: 40%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(6, 11, 24, .85); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.row-arrow:hover { border-color: var(--blue); }
.row-arrow.prev { left: -14px; }
.row-arrow.next { right: -14px; }
.view-all { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; }
@media (max-width: 640px) { .grid.strip { grid-auto-columns: 72%; } .row-arrow { display: none; } .view-all .btn { width: 100%; text-align: center; } }

/* Rewards promo */
.rw { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.6rem; align-items: center; padding: 1.8rem; border-radius: 22px;
  background: radial-gradient(circle at 15% 10%, rgba(243, 201, 105, .16), transparent 45%), radial-gradient(circle at 90% 90%, rgba(30, 139, 255, .18), transparent 50%), var(--card);
  border: 1px solid rgba(243, 201, 105, .35); }
.rw-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f3c969; }
.rw h2 { margin: .3rem 0 .4rem; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.rw-lead { margin: 0 0 .8rem; color: var(--text); }
.rw-earn { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: .45rem; }
.rw-earn li { padding-left: 1.6rem; position: relative; }
.rw-earn li::before { content: "★"; position: absolute; left: 0; color: #f3c969; }
.rw-cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.rw-side { display: grid; gap: .8rem; }
.rw-card { background: rgba(4, 8, 18, .55); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; }
.rw-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.rw-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.rw-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.rw-list li strong { color: #f3c969; white-space: nowrap; }
.rw-list small { display: block; color: var(--muted); font-size: .78rem; }
.cart-pts { margin: 0; font-size: .86rem; color: #f3c969; }
.cart-pts a { color: var(--cyan); }
.pd-pts { color: #f3c969; font-weight: 600; font-size: .92rem; }
@media (max-width: 760px) { .rw { grid-template-columns: 1fr; padding: 1.2rem; } }
.pd-lock { padding: .8rem .9rem; border-radius: 12px; border: 1px solid rgba(243,201,105,.45); background: rgba(243,201,105,.08); font-size: .92rem; display: grid; gap: .5rem; flex: 1 1 100%; }
.pd-lock-cta { display: flex; gap: .5rem; flex-wrap: wrap; }
.rw-pre { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7dd3fc; border: 1px solid rgba(125,211,252,.45); border-radius: 99px; padding: 0 .4rem; margin-left: .3rem; vertical-align: middle; }

/* Shop sections, one per game */
.cat-sec { margin: 1.4rem 0 1.8rem; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.cat-head h3 { margin: 0; font-size: 1.3rem; }
.cat-head h3 .small { font-weight: 500; margin-left: .3rem; }
.cat-all { color: var(--cyan); font-weight: 600; text-decoration: none; white-space: nowrap; background: none; border: 0; cursor: pointer; font-size: .95rem; }
.more-card { display: grid; place-items: center; text-align: center; text-decoration: none; color: var(--cyan); font-weight: 700; min-height: 200px; border-style: dashed; }

/* Members-only preorders spot */
.pre-sec { padding: 1rem 1.1rem 0.4rem; border-radius: 18px; border: 1px solid rgba(243, 201, 105, .4);
  background: radial-gradient(circle at 10% 0%, rgba(243, 201, 105, .12), transparent 45%), rgba(13, 20, 36, .6); }
.pre-sec .cat-head h3 { color: #f3c969; }
.pre-banner { margin: 0 0 .8rem; font-size: .92rem; color: var(--text); }
.pre-banner a { color: var(--cyan); }
.pre-banner.ok { color: #6fe3a1; }

/* Locked preorders (not Pro yet) */
.product.locked .thumb img, .product.locked .thumb .tag { filter: blur(7px) saturate(.6) brightness(.7); }
.lock-over { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .2rem; z-index: 1;
  color: #f3c969; font-weight: 700; font-size: .9rem; text-shadow: 0 2px 10px rgba(0,0,0,.8); background: rgba(4, 8, 18, .25); }
.lock-over b { font-size: 2rem; line-height: 1; }

/* 10-minute cart holds */
.badge.hold { background: #6b4a00; color: #ffd98a; }
.hold-note { margin: 0 0 .75rem; padding: .6rem .8rem; border-radius: 10px; background: rgba(31, 139, 255, .12); border: 1px solid rgba(31, 139, 255, .35); font-size: .88rem; }
.hold-note strong { font-variant-numeric: tabular-nums; }
.hold-note.ended { background: rgba(255, 196, 0, .1); border-color: rgba(255, 196, 0, .35); }
