:root {
  --bg: #f6f7f9; --surface: #ffffff; --ink: #1c2230; --muted: #667085; --line: #e4e7ec;
  --accent: #5b21b6; --accent-ink: #ffffff; --warn: #92400e; --warn-bg: #fef3c7;
  --ok: #166534; --ok-bg: #dcfce7; --bad: #b42318; --bad-bg: #fee4e2;
}
@font-face { font-family: Vazirmatn; src: url("fonts/Vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.8;
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-top: 24px; padding-bottom: 48px; width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 0 0 12px; line-height: 1.5; }
h2 { font-size: 1.1rem; margin: 24px 0 12px; }
.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 16px; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--ink); display: inline-flex; align-items: center; gap: .6rem; line-height: 1.15; }
.logo:hover { text-decoration: none; }
.logo img { border-radius: 10px; box-shadow: 0 3px 10px rgba(60, 30, 140, .28); }
.logo span { display: flex; flex-direction: column; }
.logo small { font-size: .6rem; font-weight: 700; letter-spacing: .26em; color: var(--muted); text-align: right; margin-top: 2px; }
.closed-note { background: #fff4d6; color: #5c4400; text-align: center; padding: .55rem 1rem; font-size: .9rem; }
nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.inline { display: inline; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.slider { position: relative; overflow: hidden; color: #fff; background: #25115f; }
.slides { display: grid; }
/* The new slide fades in on top; the old one disappears only after it is fully covered. */
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0s .6s, visibility 0s .6s; position: relative; overflow: hidden; }
.slide.on { opacity: 1; visibility: visible; z-index: 1; transition: opacity .6s ease; }
.slide::before { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; left: -90px; top: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, .17), rgba(255, 255, 255, 0) 68%); }
.s-apple { background: linear-gradient(115deg, #2a1470, #5b21b6 58%, #b0349a); }
.s-game { background: linear-gradient(115deg, #071a44, #0b3a8a 60%, #0f76c6); }
.s-sub { background: linear-gradient(115deg, #052e24, #0a5c45 58%, #14946a); }
.s-fast { background: linear-gradient(115deg, #3a1259, #8a1f7d 55%, #e8743b); }
.slide-row { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; min-height: 430px; padding-block: 44px 64px; }
.slide-tag { display: inline-block; font-size: .82rem; font-weight: 700; background: rgba(255, 255, 255, .16); padding: 4px 14px; border-radius: 99px; margin-bottom: 14px; }
.slide h1, .slide h2 { font-size: 2.25rem; font-weight: 800; line-height: 1.4; margin: 0 0 12px; }
.slide p { margin: 0 0 24px; font-size: 1.05rem; opacity: .9; max-width: 34em; }
.slide-btn { display: inline-block; background: #fff; color: #25115f; font-weight: 700; padding: 11px 26px; border-radius: 10px; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.slide-btn:hover { transform: translateY(-2px); text-decoration: none; }
.fan { position: relative; height: 290px; }
.s-card { position: absolute; width: 300px; aspect-ratio: 1.58; border-radius: 18px; overflow: hidden; left: 50%; top: 50%; color: #fff;
  border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 22px 48px rgba(0, 0, 0, .42); }
.s-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 46%); }
.s-card.n1 { transform: translate(-82%, -66%) rotate(-9deg); }
.s-card.n3 { transform: translate(-18%, -66%) rotate(9deg); }
.s-card.n2 { transform: translate(-50%, -36%); }
.fan > .n1:first-child:nth-last-child(2) { transform: translate(-64%, -72%) rotate(-8deg); }
.s-card-logo { position: absolute; top: 16%; right: 8%; width: 24%; height: 34%; object-fit: contain; }
.s-card-chip { position: absolute; top: 18%; left: 8%; width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #ffe08a, #d99a1e); }
.s-card-word { position: absolute; bottom: 11%; left: 8%; font-size: .78rem; font-weight: 700; letter-spacing: .24em; opacity: .9; }
.s-receipt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 320px; max-width: 100%; background: #fff; color: var(--ink); border-radius: 18px;
  padding: 26px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 22px 48px rgba(0, 0, 0, .38); }
.s-tick { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.s-code { width: 100%; text-align: center; font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; background: var(--bg); border: 1px dashed #c6cbd5; border-radius: 10px; padding: 9px; }
.s-copy { font-size: .85rem; font-weight: 700; color: var(--accent); }
.s-arrow { z-index: 2; position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3); }
.s-arrow[hidden], .s-bar[hidden] { display: none; }
.s-arrow:hover { background: rgba(255, 255, 255, .28); }
.s-prev { right: 14px; }
.s-next { left: 14px; }
.s-bar { z-index: 2; position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 12px; }
.s-dots { display: flex; gap: 8px; }
.s-dots button { width: 26px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .38); cursor: pointer; position: relative; }
.s-dots button::after { content: ""; position: absolute; inset: -12px -2px; }
.s-dots button[aria-current="true"] { background: #fff; }
.s-pause { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
.s-pause span { width: 8px; height: 10px; border-inline: 2.5px solid #fff; }
.s-pause.paused span { width: 0; height: 0; border-block: 5px solid transparent; border-inline: 0; border-left: 8px solid #fff; margin-left: 2px; }
.slider button:focus-visible, .slide-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.notes { background: var(--surface); border-bottom: 1px solid var(--line); }
.notes-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; padding-block: 22px; }
.note { display: flex; gap: 12px; align-items: flex-start; }
.note-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #f1eafd; color: var(--accent); }
.notes p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.7; }
.notes strong { display: block; color: var(--ink); font-size: .96rem; }
.how { margin-top: 28px; }
.how h2 { font-size: 1.15rem; margin: 0 0 14px; }
.how-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.how-row li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; font-size: .9rem; color: var(--muted); line-height: 1.75; }
.how-row b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #8b3df0, #25115f); color: #fff; margin-bottom: 10px; }
.how-row strong { display: block; color: var(--ink); font-size: .98rem; margin-bottom: 2px; }
@media (max-width: 760px) {
  .slide-row { grid-template-columns: 1fr; gap: 12px; min-height: 0; padding-block: 28px 56px; }
  .slide h1, .slide h2 { font-size: 1.45rem; }
  .slide p { font-size: .95rem; margin-bottom: 16px; }
  .fan { height: 190px; }
  .s-card { width: 200px; border-radius: 13px; }
  .s-card-chip { width: 30px; height: 23px; border-radius: 5px; }
  .s-card-word { font-size: .6rem; }
  .s-receipt { padding: 14px; gap: 6px; width: 260px; }
  .s-tick { width: 40px; height: 40px; }
  .s-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .slide, .slide-btn { transition: none; } }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.sheet hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.step { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 1.15rem; }
.step span { background: linear-gradient(90deg, #4f8ff0, #6fb4f7); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 3px 12px; border-radius: 6px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.brand-card { border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink); text-align: center; transition: transform .15s ease; }
.brand-card:hover { transform: translateY(-3px); text-decoration: none; }
.brand-tile { width: 100%; aspect-ratio: 1.45; border-radius: 14px; display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 1.05rem; padding: 10px; box-shadow: 0 6px 16px rgba(20, 24, 40, .18); }
.brand-card.on .brand-tile { outline: 3px solid #4f8ff0; outline-offset: 2px; }
.brand-tile img { width: 46%; height: 62%; object-fit: contain; }
.mono { filter: brightness(0) invert(1); }
.brand-name { font-size: .9rem; font-weight: 600; }
.gift { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1.6; border-radius: 14px; color: #fff;
  box-shadow: 0 8px 20px rgba(20, 24, 40, .22); }
.gift::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: #fff; opacity: .1;
  inset-block-start: -35%; inset-inline-start: -18%; }
.gift::after { content: ""; position: absolute; width: 45%; aspect-ratio: 1; border-radius: 50%; background: #fff; opacity: .07;
  inset-block-end: -28%; inset-inline-end: -8%; }
.gift-logo { position: absolute; inset-block-start: 12%; inset-inline-end: 7%; width: 24%; height: 34%; object-fit: contain; z-index: 1; }
.gift-word { position: absolute; inset-block-start: 11%; inset-inline-end: 7%; font-weight: 700; font-size: .95rem; z-index: 1; }
.gift-flag { position: absolute; inset-block-start: 12%; inset-inline-start: 7%; width: 26px; height: 19px; object-fit: cover;
  border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); z-index: 1; }
.gift-face { position: absolute; inset-block-end: 11%; inset-inline-start: 7%; font-size: 1.2rem; font-weight: 800; z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.c-bookmate { background: linear-gradient(135deg, #6b4f3a, #b08a5e); }
.c-itunes { background: linear-gradient(135deg, #ff4d8d, #7b5cff); }
.c-1storage { background: linear-gradient(135deg, #075985, #38bdf8); }
.c-steam { background: linear-gradient(135deg, #171a21, #2a6a8e); }
.c-googleplay { background: linear-gradient(135deg, #01694a, #34a853); }
.c-playstation { background: linear-gradient(135deg, #00337c, #0070d1); }
.c-xbox { background: linear-gradient(135deg, #0b5c0b, #3fa43f); }
.c-razergold { background: linear-gradient(135deg, #8a6508, #dcaa1c); }
.c-roblox { background: linear-gradient(135deg, #232527, #666b73); }
.c-amazon { background: linear-gradient(135deg, #232f3e, #b36b00); }
.c-origin { background: linear-gradient(135deg, #c8461a, #ff8a4c); }
.c-riotgames { background: linear-gradient(135deg, #8f1418, #eb2e33); }
.c-battlenet { background: linear-gradient(135deg, #073f7a, #148eff); }
.c-skype { background: linear-gradient(135deg, #005a9e, #00aff0); }
.c-amexpress { background: linear-gradient(135deg, #014f96, #3f9de6); }
.c-ucpubg { background: linear-gradient(135deg, #2b2b2b, #c98c00); }
.c-mint { background: linear-gradient(135deg, #087a5b, #2fc98f); }
.c-gamestop { background: linear-gradient(135deg, #1a1a1a, #c7000d); }
.c-nintendo { background: linear-gradient(135deg, #b5000e, #ff4b52); }
.c-spotify { background: linear-gradient(135deg, #121212, #1a9e4a); }
.choose { border: 1px solid #4f8ff0; color: #1d6fc4; border-radius: 8px; padding: 4px 0; width: 100%; font-size: .88rem; font-weight: 600; text-align: center; margin-top: 2px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; text-align: center; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 24, 40, .12); text-decoration: none; }
.item:hover .choose { background: #1d6fc4; color: #fff; }
.item.off { opacity: .6; }
.item-title { font-weight: 600; font-size: .92rem; min-height: 3.2em; margin-top: 6px; }
.product-card { max-width: 320px; margin-bottom: 18px; }
@media (prefers-reduced-motion: reduce) { .brand-card, .item { transition: none; } .brand-card:hover, .item:hover { transform: none; } }
.toman { color: #15803d; font-size: 1.3rem; font-weight: 700; }
.toman small { color: var(--muted); font-size: .78rem; font-weight: 400; }
.eur { color: #1d6fc4; }
.price { font-weight: 700; margin-top: auto; }
.price small { font-weight: 400; color: var(--muted); }
.price.big { font-size: 1.5rem; margin: 8px 0 16px; }
.sold-out { color: var(--bad); font-weight: 600; margin-top: auto; }
.muted { color: var(--muted); font-size: .92rem; }
.empty { color: var(--muted); }
.pre { white-space: pre-line; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin-inline: auto; }
label { display: block; font-size: .95rem; margin-bottom: 12px; }
input, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; margin: 0; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 8px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.small { padding: 4px 14px; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--accent); }
.stack { display: grid; gap: 10px; }
.buy { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.buy label { margin: 0; width: 100px; }
.warn { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 8px; }
.warn-text { color: var(--warn); font-size: .92rem; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 12px 0; color: var(--ink); }
.badge { display: inline-block; font-size: .82rem; padding: 1px 10px; border-radius: 99px; background: var(--line); color: var(--ink); }
.badge.delivered { background: var(--ok-bg); color: var(--ok); }
.badge.review, .badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.cancelled, .badge.expired, .badge.refunded { background: var(--bad-bg); color: var(--bad); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px;
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; margin-bottom: 8px; }
.code code { font-size: 1.05rem; overflow-wrap: anywhere; }
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 14px; font-size: .92rem; }
.foot-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px 48px; flex-wrap: wrap; }
.foot-about { flex: 1 1 280px; max-width: 420px; }
.foot-about p { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.foot-links strong { margin-bottom: 4px; }
.foot-legal { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.seal { height: 72px; }
.admin-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; }
.stat strong { font-size: 1.4rem; }
.review { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: .92rem; }
.filters .on { font-weight: 700; text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; align-items: end; }
.form-grid .full, .form-grid .actions, .form-grid > .btn { grid-column: 1 / -1; }
.form-grid > .btn { justify-self: start; }
