:root {
  --bg: #11141b;
  --surface: #1a1e28;
  --surface-2: #232836;
  --border: #2c3242;
  --text: #e9ecf2;
  --muted: #9aa3b5;
  --accent: #f7c315;
  --accent-text: #1a1400;
  --danger: #ff5a5f;
  --success: #2ecc71;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { padding: 6px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface-2); color: var(--text); }

/* ---------- هدر ---------- */
#site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: -.02em; }
.logo img { display: block; border-radius: 10px; }
.logo b { color: var(--accent); font-weight: 900; }
.nav { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.header-left { margin-right: auto; display: flex; align-items: center; gap: 14px; }
.phone { font-size: 13px; color: var(--muted); direction: ltr; }

/* ---------- صفحه اصلی ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 24px;
}
.hero h1 { margin: 0 0 4px; font-size: 26px; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }

.banner {
  flex: 0 1 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #1db954, #0e6b30);
  color: #fff;
}
.banner strong { display: block; font-size: 17px; }
.banner span { font-size: 13px; opacity: .9; }
.banner .btn { background: #fff; color: #0e6b30; white-space: nowrap; }

.search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.search:focus { outline: 2px solid var(--accent); border-color: transparent; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* کارت گیفت کارت */
.gc-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--c);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.gc-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.gc-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: #1a1e28;
  clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 100%);
}
.gc-en {
  position: absolute;
  top: 12px; left: 14px;
  direction: ltr;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .85);
}
.gc-icon {
  position: absolute;
  inset: 0 0 25% 0;
  display: grid;
  place-items: center;
}
.gc-name {
  position: absolute;
  z-index: 1;
  bottom: 10px; right: 14px;
  font-weight: 700;
  font-size: 15px;
}

.brand-icon {
  width: var(--s); height: var(--s);
  display: grid; place-items: center;
}
.brand-icon img {
  width: 100%; height: 100%;
  filter: brightness(0) invert(1);
}
.brand-icon b { font-size: calc(var(--s) * .8); color: #fff; line-height: 1; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

/* بخش‌های متنی */
.section { padding: 48px 0 0; }
.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.box h2 { margin-top: 0; font-size: 19px; }
.box p { color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.step b {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  margin-bottom: 8px;
}
.step p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- صفحه محصول ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 20px 0; }
.breadcrumb a:hover { color: var(--accent); }

.product {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
.product-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.product-logo {
  width: 96px; height: 96px;
  border-radius: var(--radius);
  background: var(--c);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.product-head h1 { margin: 0; font-size: 24px; }
.product-head p { margin: 4px 0 0; color: var(--muted); }

.buy-box { position: sticky; top: 84px; }
.buy-box h3 { margin: 0 0 12px; font-size: 16px; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
}
.option span small { display: block; color: var(--muted); font-size: 12px; }
.option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.option input:focus-visible + span { outline: 2px solid var(--accent); }

.qty { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.qty-ctrl { display: flex; align-items: center; gap: 4px; }
.qty-ctrl button {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.qty-ctrl output { min-width: 36px; text-align: center; font-weight: 700; }

.total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 14px; margin-bottom: 16px;
}
.total strong { font-size: 18px; color: var(--accent); }

.content h2 { font-size: 18px; margin: 28px 0 10px; }
.content p { color: var(--muted); margin: 0 0 12px; }
.content ol { color: var(--muted); padding-right: 20px; margin: 0; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badges span {
  font-size: 12px;
  background: var(--surface-2);
  border-radius: 20px;
  padding: 4px 12px;
  color: var(--muted);
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; }

/* ---------- صفحه پرداخت ---------- */
.checkout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  padding-bottom: 20px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 10px 14px;
}
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--danger); display: none; }
.field.invalid .error { display: block; }
.field.invalid input { border-color: var(--danger); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }

.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row span:first-child { color: var(--muted); }
.summary-item { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.summary-item .product-logo { width: 56px; height: 56px; }

/* ---------- صفحه نتیجه ---------- */
.result { max-width: 520px; margin: 60px auto; text-align: center; }
.result-icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 36px;
  color: #fff;
}
.result-icon.ok { background: var(--success); }
.result-icon.fail { background: var(--danger); }
.code-box {
  direction: ltr;
  font-family: monospace;
  font-size: 18px;
  letter-spacing: .1em;
  background: var(--surface-2);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0;
}

/* ---------- فوتر ---------- */
#site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 16px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner p { margin: 0; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 900px) {
  .product, .checkout { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .hero { flex-direction: column; align-items: stretch; }
  .banner { flex-basis: auto; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .nav, .phone { display: none; }
  .gc-name { font-size: 13px; }
  .gc-icon { inset: 22px 0 28% 0; }
  .gc-icon .brand-icon { --s: 34px !important; }
  .gc-en { top: 8px; left: 10px; font-size: 9px; }
}
@media (max-width: 400px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- صفحات متنی (درباره ما، قوانین، تماس) ---------- */
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover, .nav a.active { color: var(--accent); }
.page-title { margin: 0 0 6px; font-size: 26px; }
.page-sub { margin: 0 0 24px; color: var(--muted); }
.prose h2 { font-size: 18px; margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose ul, .prose ol { padding-right: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.stats div { background: var(--surface-2); border-radius: var(--radius); padding: 16px; text-align: center; }
.stats strong { display: block; font-size: 22px; color: var(--accent); }
.stats span { font-size: 13px; color: var(--muted); }
.contact { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.contact-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-item:last-child { border-bottom: 0; }
.contact-item span { display: block; font-size: 13px; color: var(--muted); }
.field textarea {
  width: 100%; min-height: 130px; resize: vertical;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font: inherit; padding: 10px 14px;
}
.field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field.invalid textarea { border-color: var(--danger); }
.notice { background: rgba(46, 204, 113, .12); color: var(--success); border-radius: 10px; padding: 12px 16px; display: none; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .stats { grid-template-columns: 1fr; } }
