/* ============================================================
   GAME POLYGONS — store styles (mobile-first)
   Dark purple theme in the style of a console game store.
   ============================================================ */
:root {
  --bg: #1d1730;
  --bg2: #141021;
  --card: #2b2140;
  --card2: #34284c;
  --line: #423359;
  --text: #f5f1fb;
  --muted: #beb3d6;
  --accent: #f5c07c;
  --accent-strong: #eeaf60;
  --accent-ink: #241b10;
  --pink: #f26fa7;
  --green: #7ed6a2;
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 56px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; }
body {
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand svg { flex: 0 0 auto; }
.brand-name {
  font-weight: 700; font-size: 17px; letter-spacing: .4px; white-space: nowrap;
  color: var(--accent);
}
.brand-name span { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.cart-btn {
  position: relative;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 10px; color: var(--text);
}
.cart-btn:hover { background: rgba(255,255,255,.07); }
.cart-badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--pink); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
  display: none;
}
.cart-badge.show { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 16px;
  padding: 14px 22px; min-height: 48px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  text-align: center;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 30px 0 26px;
  background: linear-gradient(180deg, #332647 0%, #281e3a 55%, var(--bg) 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('/assets/img/gtavi/hero-bg-828.jpg');
  background-size: cover; background-position: center 30%;
  opacity: .45;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(29,23,48,.15) 0%, rgba(29,23,48,.5) 62%, var(--bg) 100%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-art {
  width: clamp(200px, 30vw, 320px);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.badge-new {
  margin-top: 20px;
  display: inline-block; padding: 4px 12px;
  background: var(--pink); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 1.2px;
  border-radius: 8px;
}
.hero h1 { margin-top: 12px; font-size: 34px; font-weight: 700; letter-spacing: -.3px; }
.hero-sub { margin-top: 6px; color: var(--muted); font-size: 15px; }
.platform-label { margin-top: 22px; font-weight: 700; font-size: 17px; }
.platform-row { margin-top: 10px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.platform-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; min-height: 40px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-weight: 600; font-size: 14.5px;
}
.pill-logo { height: 15px; width: auto; filter: brightness(0) invert(1); }
.platform-pill.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.hero-cta { margin-top: 18px; width: 100%; max-width: 420px; }
.hero-price { margin-top: 8px; color: var(--muted); font-size: 14px; }
.hero-price b { color: var(--text); }

/* ---------- sections ---------- */
.section { padding: 30px 0 6px; }
#editions-section { scroll-margin-top: 70px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section h2 { font-size: 24px; font-weight: 700; letter-spacing: -.2px; }
.section-note { color: var(--muted); font-size: 14px; }

/* ---------- screenshots ---------- */
.shots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shots-grid figure {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  cursor: zoom-in;
}
.shots-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
@media (min-width: 760px) { .shots-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- editions ---------- */
.editions { display: grid; gap: 14px; }
@media (min-width: 760px) { .editions { grid-template-columns: 1fr 1fr; } }
.edition-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.edition-banner { position: relative; }
.edition-banner img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.edition-tag {
  position: absolute; left: 12px; top: 12px;
  padding: 3px 10px; border-radius: 7px;
  background: rgba(13,10,18,.75); backdrop-filter: blur(4px);
  font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
}
.edition-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.edition-kicker { color: var(--muted); font-size: 13.5px; }
.edition-body h3 { font-size: 22px; font-weight: 700; }
.edition-list { list-style: none; display: grid; gap: 6px; }
.edition-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14.5px; }
.edition-list li::before {
  content: ''; position: absolute; left: 2px; top: 7px;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg); opacity: .85;
}
.edition-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.edition-price { font-size: 24px; font-weight: 700; }
.edition-price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.edition-foot .btn { min-width: 132px; }

/* ---------- games grid ---------- */
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 560px) { .games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .games-grid { grid-template-columns: repeat(4, 1fr); } }
.game-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.game-card:hover { border-color: #6a5590; transform: translateY(-2px); }
.game-cover { position: relative; overflow: hidden; }
.game-cover img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.game-actions {
  position: absolute; inset: auto 0 0 0;
  padding: 10px; display: grid; gap: 8px;
  background: linear-gradient(180deg, rgba(13,10,18,0) 0%, rgba(13,10,18,.88) 42%);
  opacity: 0; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.game-card:hover .game-actions, .game-card:focus-within .game-actions { opacity: 1; transform: none; }
@media (hover: none) {
  .game-actions { opacity: 1; transform: none; padding-top: 22px; }
}
.game-actions .btn { min-height: 38px; padding: 7px 10px; font-size: 14px; border-radius: 10px; }
.game-body { padding: 10px 12px 13px; display: grid; gap: 3px; }
.game-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.game-platform { color: var(--muted); font-size: 12.5px; }
.game-price { margin-top: 3px; font-size: 17px; font-weight: 700; color: var(--accent); }

/* ---------- sticky bar ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; top: 0;
  z-index: 40;
  background: rgba(20,16,33,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform .22s ease;
  padding-top: var(--header-h);
}
.sticky-bar.show { transform: none; }
.sticky-inner {
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sticky-info { min-width: 0; }
.sticky-info b { font-size: 15.5px; }
.sticky-info span { display: block; color: var(--muted); font-size: 12.5px; }
.sticky-inner .btn { min-height: 40px; padding: 8px 18px; font-size: 15px; flex: 0 0 auto; }
body.with-header-offset .sticky-bar { padding-top: 0; }

/* ---------- cart drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; z-index: 61; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--bg2); border-left: 1px solid var(--line);
  transform: translateX(105%); transition: transform .24s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: none; }
.drawer-head {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-head h2 { font-size: 19px; font-weight: 700; }
.drawer-close {
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.07); color: var(--text); font-size: 19px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: grid; gap: 12px; align-content: start; }
.cart-empty { color: var(--muted); text-align: center; padding: 34px 10px; font-size: 15px; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px;
}
.cart-item img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; }
.cart-item-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.cart-item-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cart-item-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.cart-item-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--text); font-size: 16px; font-weight: 700;
}
.qty-val { min-width: 24px; text-align: center; font-weight: 700; }
.cart-remove {
  margin-left: auto; border: 0; background: none; color: var(--muted);
  font-size: 13px; text-decoration: underline;
}
.cart-remove:hover { color: var(--pink); }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 16px 18px; display: grid; gap: 12px; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total-row span { color: var(--muted); font-size: 14.5px; }
.cart-total-row b { font-size: 22px; }
.cart-hint { color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  z-index: 70; background: var(--card2); border: 1px solid var(--line);
  color: var(--text); font-size: 14.5px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- footer ---------- */
.site-footer { margin-top: 44px; background: var(--bg2); border-top: 1px solid var(--line); padding: 34px 0 96px; }
.footer-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-weight: 700; font-size: 18px; color: var(--accent); }
.footer-brand span { color: var(--accent); }
.footer-tagline { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 320px; }
.footer-h { font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-links { list-style: none; display: grid; gap: 9px; font-size: 15px; }
.footer-links a:hover { color: var(--accent); }
.footer-address { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.footer-address a { color: var(--text); }
.footer-address a:hover { color: var(--accent); }
.footer-legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.footer-legal p { color: var(--muted); font-size: 13px; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.footer-legal nav a { color: var(--text); }
.footer-legal nav a:hover { color: var(--accent); }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 16px; bottom: 18px; z-index: 45;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  font-size: 18px; display: none; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.to-top.show { display: flex; }

/* ---------- cookie bar ---------- */
.cookie-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 65;
  background: var(--card2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; display: none; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--muted); max-width: 760px; margin: 0 auto;
}
.cookie-bar.show { display: flex; }
.cookie-bar a { color: var(--text); text-decoration: underline; }
.cookie-bar button {
  border: 0; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 13.5px; padding: 9px 16px; flex: 0 0 auto;
}

/* ---------- checkout / policy pages ---------- */
.page-main { padding-top: 26px; padding-bottom: 10px; }
.page-title { font-size: 30px; font-weight: 700; }
.page-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; }
.page-back:hover { color: var(--accent); }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px 20px;
}
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px;
  background: #beb3d6; color: #2a2138;
  border: 1px solid #a89ac6; border-radius: 10px;
  padding: 11px 13px; font-size: 15.5px; font-family: inherit;
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: #75678f; opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-strong); }
.field input[readonly] { background: #ad9fc9; opacity: 1; }
.field .hint { color: var(--muted); font-size: 13px; }
.field .hint.ok { color: var(--green); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: span 2; } }
.checkout-layout { display: grid; gap: 18px; }
@media (min-width: 960px) { .checkout-layout { grid-template-columns: 1fr 360px; align-items: start; } }
.pay-methods { display: grid; gap: 10px; }
@media (min-width: 640px) { .pay-methods { grid-template-columns: 1fr 1fr; } }
.pay-method {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 64px; padding: 12px;
  background: #beb3d6; border: 1px solid #a89ac6; border-radius: 12px;
  color: #2a2138; font-weight: 600; font-size: 17px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pay-method.is-active { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
.pay-chase-img { width: 148px; height: auto; }
.pay-note { margin-top: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.card-brand-icons { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 5px; }
.card-brand-icons img { height: 17px; width: auto; display: block; }
.cvc-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #6f6390; pointer-events: none; }
.cvc-icon svg { height: 1.3rem; width: auto; display: block; }
.card-field-wrap { position: relative; }
.card-field-wrap input { padding-right: 124px; }
.summary-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; padding: 6px 0; }
.summary-line.muted { color: var(--muted); }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 17px; }
.summary-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; }
.summary-item img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; }
.summary-item .n { font-size: 14px; font-weight: 600; line-height: 1.25; }
.summary-item .q { color: var(--muted); font-size: 12.5px; }
.summary-item .p { font-weight: 700; font-size: 14px; white-space: nowrap; }
.bank-line { color: var(--accent); font-weight: 600; font-size: 13.5px; min-height: 18px; }
.submit-btn { margin-top: 16px; }
.btn-primary.submit-btn {
  background: #e0393e; color: #ffffff;
  box-shadow: 0 6px 18px rgba(224,57,62,.35);
}
.btn-primary.submit-btn:hover { background: #c72f34; }

/* policy pages */
.policy-body { max-width: 780px; }
.policy-body h2 { font-size: 19px; margin: 22px 0 8px; }
.policy-body p, .policy-body li { color: var(--muted); font-size: 15px; margin-bottom: 9px; }
.policy-body ul { padding-left: 20px; }
.policy-body strong { color: var(--text); }
.policy-body a { color: var(--accent); }
.policy-body .updated { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.contact-card { display: grid; gap: 10px; }
.contact-card .row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: 15px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.contact-card .row:last-child { border-bottom: 0; }
.contact-card .k { color: var(--muted); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(5,4,8,.9);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; }
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 18px;
}

/* ---------- platform choice modal ---------- */
.platform-modal-backdrop {
  position: fixed; inset: 0; z-index: 75; background: rgba(5,4,8,.72);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.platform-modal-backdrop.open { display: flex; }
.platform-modal {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px 16px; width: 100%; max-width: 380px;
}
.platform-modal h3 { font-size: 20px; font-weight: 700; }
.pm-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.pm-sub b { color: var(--text); }
.pm-row { display: grid; gap: 10px; margin-top: 16px; }
.pm-choice {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 12px;
  background: #beb3d6; border: 1px solid #a89ac6; border-radius: 12px;
  color: #2a2138; font-weight: 700; font-size: 16px;
}
.pm-choice:hover { border-color: var(--accent-strong); box-shadow: 0 0 0 2px rgba(238,175,96,.35); }
.pm-choice.is-pre { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.pm-logo { height: 14px; width: auto; display: block; }
.pm-cancel {
  margin-top: 12px; width: 100%; background: none; border: 0;
  color: var(--muted); font-size: 14px; text-decoration: underline; padding: 8px;
}
