/* GiftCodeStore — warm editorial theme */
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-latin-wght-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #fbf6ef; --bg-2: #f5ece0; --surface: #fffdf9; --surface-2: #f8f0e6;
  --text: #22142b; --text-2: #5f4f66; --text-3: #918297;
  --border: #ebe0d3; --border-strong: #d9cab9;
  --primary: #2d1640; --primary-ink: #fff; --primary-soft: #f0e6f5;
  --accent: #ff5b3a; --accent-ink: #fff;
  --gold: #f2b84b;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --display-weight: 600; --display-tracking: -0.03em;
  --radius: 18px; --radius-lg: 28px;
  --media-ratio: 640 / 404; --media-bg: transparent;
  --footer-bg: #1d0e29; --footer-ink: #f8eefc; --footer-muted: #b6a4c2;
  --shadow: 0 10px 30px -12px rgb(45 22 64 / 28%);
  --shadow-lg: 0 30px 70px -24px rgb(45 22 64 / 40%);
}
h1 em, h2 em { font-style: italic; color: var(--accent); font-weight: 500; }

/* Product cards show the gift card art floating on a soft panel */
.pcard { background: var(--surface); }
.pcard-media { margin: 14px 14px 0; border-radius: 14px; background: radial-gradient(120% 120% at 0 0, #fff 0, var(--surface-2) 70%); padding: 14px; aspect-ratio: auto; }
.pcard-media img { object-fit: contain; aspect-ratio: 640 / 404; filter: drop-shadow(0 10px 16px rgb(45 22 64 / 22%)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.pcard:hover .pcard-media img { transform: translateY(-4px) rotate(-1.5deg); }
.pcard-badges { top: auto; left: auto; bottom: 20px; right: 20px; }
.pdp-media { background: radial-gradient(120% 120% at 10% 0, #fff 0, var(--bg-2) 75%); padding: clamp(24px, 5vw, 56px); aspect-ratio: auto; box-shadow: none; border: 1px solid var(--border); }
.pdp-media img { object-fit: contain; filter: drop-shadow(0 24px 30px rgb(45 22 64 / 30%)); transform: rotate(-3deg); }
.line-thumb { aspect-ratio: 640 / 404; background: none; }
.line-thumb img { object-fit: contain; }

/* ---------- Home ---------- */
.g-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); }
.g-hero::before { content: ''; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; background: radial-gradient(circle, rgb(255 91 58 / 16%), transparent 62%); pointer-events: none; }
.g-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .g-hero-grid { grid-template-columns: 1fr; } }
.g-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; margin-bottom: .35em; }
.g-trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; color: var(--text-2); font-size: .9rem; }
.g-trust span { display: inline-flex; gap: 8px; align-items: center; }
.g-trust .icon { color: var(--accent); }
.g-fan { position: relative; height: clamp(300px, 38vw, 460px); }
.g-fan img { position: absolute; width: 74%; left: 13%; top: 18%; filter: drop-shadow(0 28px 36px rgb(45 22 64 / 32%)); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.g-fan img:nth-child(1) { transform: rotate(-16deg) translate(-16%, 6%); }
.g-fan img:nth-child(2) { transform: rotate(-2deg) translate(0, -6%); z-index: 1; }
.g-fan img:nth-child(3) { transform: rotate(13deg) translate(18%, 10%); z-index: 2; }
.g-fan:hover img:nth-child(1) { transform: rotate(-22deg) translate(-24%, 4%); }
.g-fan:hover img:nth-child(3) { transform: rotate(19deg) translate(26%, 10%); }
.g-toast { position: absolute; z-index: 3; right: 2%; bottom: 6%; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); font-size: .88rem; border: 1px solid var(--border); animation: g-float 4s ease-in-out infinite; }
.g-toast b { display: block; }
.g-toast .tick { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
@keyframes g-float { 50% { transform: translateY(-8px); } }
@media (max-width: 900px) { .g-fan { height: 300px; } .g-fan img { top: 10%; width: 66%; left: 17%; } .g-toast { right: 0; bottom: 2%; } }

.g-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .g-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-cat-blurb { display: inline-block; margin: 2px 0 4px; font-size: .88rem; color: var(--text-2); }
.g-cat { position: relative; display: flex; flex-direction: column; gap: 26px; padding: 20px; border-radius: 20px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.g-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.g-cat .ci { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.g-cat strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.g-cat small { color: var(--text-3); }

.g-gift { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .g-gift { grid-template-columns: 1fr; } }
.g-mail { position: relative; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 26px; border: 1px solid var(--border); max-width: 460px; margin-inline: auto; transform: rotate(-1.5deg); }
.g-mail-top { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--text-3); padding-bottom: 14px; border-bottom: 1px dashed var(--border-strong); margin-bottom: 16px; }
.g-mail-top .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }
.g-mail blockquote { margin: 16px 0; font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.35; color: var(--primary); }
.g-mail img { filter: drop-shadow(0 12px 18px rgb(45 22 64 / 25%)); }

.g-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; counter-reset: gs; }
.g-step { position: relative; padding: 28px 24px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); counter-increment: gs; }
.g-step::before { content: '0' counter(gs); font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; color: var(--accent); opacity: .9; display: block; margin-bottom: 10px; }
.g-step h3 { font-family: var(--font-body); letter-spacing: 0; font-size: 1.08rem; }
.g-step p { color: var(--text-2); margin: 0; font-size: .95rem; }

.g-kpay { border-radius: 32px; padding: clamp(28px, 5vw, 56px); background: radial-gradient(120% 140% at 100% 0, #5b2a7d 0, var(--primary) 55%); color: #fff; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; overflow: hidden; position: relative; }
@media (max-width: 860px) { .g-kpay { grid-template-columns: 1fr; } }
.g-kpay h2 { color: #fff; }
.g-kpay p { color: #e4d4ee; }
.g-kpay-cards { display: grid; gap: 12px; }
.g-kpay-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 14%); }
.g-kpay-card .ki { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.g-kpay-card small { color: #d4c2e0; display: block; }

.g-scam { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 20px; background: #fff4e5; border: 1px solid #f6d8a8; color: #6b4300; }
.g-scam .icon { color: #c77700; margin-top: 2px; }

/* ---------- Region rules (home guide, product cards, product page, checkout) ---------- */
.g-head-note { margin: 10px 0 0; max-width: 62ch; }
.g-regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .g-regions { grid-template-columns: 1fr; } }
.g-region { border-radius: 24px; padding: clamp(18px, 3vw, 26px); background: var(--surface); border: 1px solid var(--border); }
.g-region-ok { background: linear-gradient(180deg, #edf8f1 0, var(--surface) 140px); border-color: #cfe8da; }
.g-region-abroad { background: linear-gradient(180deg, #fdf3e2 0, var(--surface) 140px); border-color: #f0dcb4; }
.g-region-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.g-region-head h3 { margin: 0 0 2px; font-size: 1.25rem; }
.g-region-head p { margin: 0; color: var(--text-2); font-size: .93rem; }
.g-region-head .ri { flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.g-region-ok .ri { background: var(--success); }
.g-region-abroad .ri { background: #b86e00; }
.g-region-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.g-region-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: 14px; text-decoration: none; color: var(--text); transition: background .15s; }
.g-region-list a:hover { background: rgb(45 22 64 / 5%); }
.g-region-list img { width: 64px; height: auto; border-radius: 6px; filter: drop-shadow(0 4px 6px rgb(45 22 64 / 22%)); }
.g-rl-text { display: flex; flex-direction: column; min-width: 0; }
.g-rl-text strong { font-size: .98rem; line-height: 1.3; }
.g-rl-text small { color: var(--text-2); font-size: .84rem; line-height: 1.35; }
.g-rl-price { font-weight: 700; font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .g-region-list a { grid-template-columns: 52px minmax(0, 1fr); } .g-region-list img { width: 52px; } .g-rl-price { grid-column: 2; margin-top: -8px; font-size: .84rem; color: var(--text-2); } }
.g-region-foot { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; }
.g-region-foot .icon { flex-shrink: 0; margin-top: 3px; }

.g-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .g-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g-grid3 { grid-template-columns: 1fr; } }

.g-chip { align-self: flex-start; display: inline-flex; gap: 5px; align-items: center; margin: 4px 0 2px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.4; }
.g-chip-ok { background: var(--success-soft); color: #0e6b3f; }
.g-chip-lock { background: #fdf1dc; color: #7a4a00; }

/* Product page */
.g-pdp-media { position: sticky; top: 92px; }
.g-pdp-media .pdp-media { position: static; }
@media (max-width: 860px) { .g-pdp-media { position: static; } }
.g-caption { display: flex; gap: 6px; align-items: flex-start; margin: 10px 4px 0; font-size: .8rem; color: var(--text-3); }
.g-caption .icon { flex-shrink: 0; margin-top: 3px; }
.g-pdp-title { margin-top: 10px; }
.g-h1-note { display: block; margin-top: 8px; font-family: var(--font-body); font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 650; letter-spacing: 0; line-height: 1.35; }
.g-h1-note.is-lock { color: #8a5300; }
.g-h1-note.is-ok { color: #0e6b3f; }
.g-region-panel { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 6px; padding: 14px 16px; border-radius: 16px; border: 1px solid; font-size: .93rem; }
.g-region-panel strong { display: block; margin-bottom: 2px; }
.g-region-panel p { margin: 0; }
.g-region-panel.is-ok { background: var(--success-soft); border-color: #bfe3cf; color: #0b4f2f; }
.g-region-panel.is-lock { background: #fdf1dc; border-color: #f0d29b; color: #5c3800; }
.g-rp-icon { flex-shrink: 0; margin-top: 1px; }
.g-region-panel.is-ok .g-rp-icon { color: var(--success); }
.g-region-panel.is-lock .g-rp-icon { color: #b86e00; }
.g-rp-gift { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed #e6c27f; }
.g-rp-gift .icon { flex-shrink: 0; margin-top: 3px; }
.g-pdp-lower { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .g-pdp-lower { grid-template-columns: 1fr; gap: 28px; } }
.g-redeem { margin: 12px 0 0; }
.g-redeem li { color: var(--text-2); }
.prose .g-redeem { padding-left: 0; }
.g-links { list-style: none; padding: 0 !important; margin: 20px 0 6px; display: grid; gap: 8px; }
.g-links a { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.g-brandbox h3 { display: flex; gap: 8px; align-items: center; }
.g-scam-sm { padding: 14px 16px; border-radius: 16px; font-size: .88rem; gap: 10px; }
.g-scam-sm .icon { margin-top: 1px; flex-shrink: 0; }

/* Checkout region check */
.g-region-check h3 { display: flex; gap: 8px; align-items: center; }
.g-region-check.has-lock { border-color: #f0d29b; background: #fffaf0; }
.g-region-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.g-region-check li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text-2); }
.g-region-check li .icon { flex-shrink: 0; margin-top: 3px; }
.g-region-check li.is-lock .icon { color: #b86e00; }
.g-region-check li.is-ok .icon { color: var(--success); }
.g-region-check li strong { display: block; color: var(--text); }
/* Long issuer URLs (e.g. Steam's redeem page) must wrap on phones instead of widening the page */
.specs dd, .g-redeem li, .g-rl-text small, .g-region-panel p { overflow-wrap: anywhere; }
