/* AwalTalab — fresh, mobile-first design system */
:root {
  --brand: #ff5a3c;
  --brand-dark: #e8421f;
  --brand-soft: #ffe9e2;
  --accent: #1b1d3a;
  --accent-soft: #f3f4ff;
  --ink: #1a1c2b;
  --ink-2: #4a4d62;
  --ink-3: #7a7d92;
  --line: #ececf2;
  --bg: #fffaf7;
  --surface: #ffffff;
  --success: #1f9d55;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20,20,40,.05), 0 2px 8px rgba(20,20,40,.04);
  --shadow: 0 6px 24px rgba(20,20,40,.08);
  --shadow-lg: 0 12px 36px rgba(255,90,60,.18);
  --grad-brand: linear-gradient(135deg, #ff7a4a 0%, #ff3d2e 100%);
  --grad-soft: linear-gradient(180deg, #fff2ec 0%, #fffaf7 100%);
  --font-ar: "Tajawal", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed; top: 8px; inset-inline-start: 8px;
  width: auto; height: auto;
  padding: 10px 16px; margin: 0;
  background: #fff; color: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  clip: auto;
  z-index: 100;
}

body {
  margin: 0;
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .6em; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw + .5rem, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.5vw + .5rem, 1.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 60px;
}
.brand-mark {
  display: flex; align-items: center; gap: 10px; color: var(--ink);
  font-weight: 800; font-size: 1.05rem;
}
.brand-mark .logo-badge {
  width: 36px; height: 36px;
  display: block;
  border-radius: 12px;
  filter: drop-shadow(0 6px 12px rgba(255,90,60,.35));
}
.brand-mark .brand-name { line-height: 1; font-size: 1.1rem; }
html[dir="rtl"] .brand-mark .brand-name { font-size: 1.2rem; }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link {
  display: none;
  padding: 8px 12px; border-radius: 10px; color: var(--ink-2);
  font-weight: 600; font-size: .92rem;
}
.nav-link:hover { background: var(--accent-soft); color: var(--ink); }
.nav-link.is-active { color: var(--brand); }
@media (min-width: 760px) {
  .nav-link { display: inline-flex; }
}
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--ink);
  font-weight: 700; font-size: .85rem;
}
.lang-switch:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 36px 0 28px;
  background: var(--grad-soft);
}
.hero::before {
  content: ""; position: absolute; inset: -120px -60px auto auto;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,60,.18), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { max-width: 22ch; }
.hero p.lead { max-width: 60ch; font-size: 1.05rem; color: var(--ink-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px; font-weight: 700; font-size: .98rem;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translateY(-1px); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--ink); }

/* ===== Sections ===== */
.section { padding: 44px 0; }
.section-head { margin-bottom: 22px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--ink-3); margin: 0; }

/* ===== Country grid ===== */
.country-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 520px) { .country-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .country-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .country-grid { grid-template-columns: repeat(6, 1fr); } }
.country-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-weight: 700; font-size: .95rem;
  transition: all .18s ease;
}
.country-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.country-card .flag { font-size: 1.6rem; line-height: 1; }

/* ===== Store grid ===== */
.store-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 520px) { .store-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .store-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .store-grid { grid-template-columns: repeat(5, 1fr); } }

.store-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-align: center; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.store-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--store-color, var(--brand)) 50%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--store-color, var(--brand)) 22%, transparent);
  color: var(--ink);
}
.store-card .logo-wrap {
  width: 76px; height: 76px; border-radius: 18px;
  background: var(--store-color, var(--brand));
  padding: 10px; display: grid; place-items: center;
  margin-bottom: 10px;
}
.store-card .logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.store-card .name { font-weight: 700; font-size: .93rem; }

/* ===== How / Why lists (conversational) ===== */
.how-row {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 760px) { .how-row { grid-template-columns: 1fr 1.4fr; gap: 36px; } }
.how-row h2 { margin: 0; }
.how-list, .why-list {
  margin: 0; padding: 0; list-style: none;
  counter-reset: step;
}
.how-list li, .why-list li {
  position: relative;
  padding: 14px 0 14px 44px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 1rem;
}
html[dir="rtl"] .how-list li, html[dir="rtl"] .why-list li {
  padding: 14px 44px 14px 0;
}
.how-list li:first-child, .why-list li:first-child { border-top: none; }
.how-list li strong, .why-list li strong { color: var(--ink); font-weight: 800; }
.how-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center;
  font-weight: 800; font-size: .85rem;
  font-family: var(--font-en);
}
.why-list li::before {
  content: "—";
  position: absolute; inset-inline-start: 8px; top: 14px;
  color: var(--brand); font-weight: 900;
}

/* ===== Store / coupon hero ===== */
.store-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--store-color, var(--brand)) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 30px 0 36px;
}
.store-hero::before {
  content: ""; position: absolute; inset: -40px -40px auto auto;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.store-hero-inner {
  position: relative; display: flex; align-items: center; gap: 18px;
}
.store-hero .logo-tile {
  flex: 0 0 88px; width: 88px; height: 88px;
  background: var(--store-color, var(--brand));
  border-radius: 22px; padding: 12px;
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.store-hero .logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.store-hero h1 { color: #fff; font-size: clamp(1.3rem, 4vw, 1.9rem); margin: 0 0 6px; }
.store-hero p { color: rgba(255,255,255,.92); margin: 0; font-size: .98rem; }

/* ===== Coupon code card ===== */
.code-card {
  margin: -20px auto 0; max-width: 720px;
  position: relative; z-index: 2;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(20,20,40,.12);
  padding: 22px;
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .code-card { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.code-card .code-label { font-size: .78rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
html[dir="rtl"] .code-card .code-label { letter-spacing: 0; }
.code-pill {
  margin-top: 6px;
  display: flex; align-items: center; justify-content: space-between;
  background: repeating-linear-gradient(135deg, #fff7f4 0 8px, #fff 8px 16px);
  border: 2px dashed var(--brand);
  border-radius: 14px;
  padding: 12px 14px;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: inherit;
  transition: border-color .15s ease, transform .1s ease;
}
.code-pill:hover { border-color: var(--brand-dark); }
.code-pill:active { transform: scale(.99); }
.code-pill.is-copied { border-color: var(--success); background: #f0fbf5; }
.code-pill .code-text {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 800; font-size: 1.25rem; color: var(--brand-dark);
  letter-spacing: .04em;
  word-break: break-all;
}
.code-pill .code-pill-icon { color: var(--brand); flex-shrink: 0; }
.code-pill.is-copied .code-pill-icon,
.code-pill.is-copied .code-text { color: var(--success); }
.btn-copy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-copy svg { flex-shrink: 0; }
.code-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-copy {
  background: var(--grad-brand); color: #fff;
  border-radius: 14px; padding: 14px; font-weight: 800;
  border: none; box-shadow: var(--shadow-lg);
  transition: transform .15s ease;
}
.btn-copy.is-copied { background: var(--success); box-shadow: 0 8px 24px rgba(31,157,85,.3); }
.btn-copy:hover { transform: translateY(-1px); color: #fff; }
.btn-visit {
  text-align: center; padding: 13px; border-radius: 14px;
  background: var(--accent-soft); color: var(--ink); font-weight: 700;
  border: 1px solid var(--line);
}
.btn-visit:hover { background: #fff; border-color: var(--brand); color: var(--brand); }

.coupon-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px;
  font-size: .85rem; color: var(--ink-3);
}
.coupon-meta strong { color: var(--ink); font-weight: 700; }
.coupon-meta .pill {
  background: var(--accent-soft); color: var(--ink); padding: 4px 10px; border-radius: 999px; font-weight: 600;
}

/* ===== Generic content blocks ===== */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ol, .prose ul { padding-inline-start: 1.25em; }
.prose li { margin-bottom: .35em; color: var(--ink-2); }
.prose code { background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; font-weight: 700; color: var(--brand-dark); }

.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: inline-end; color: var(--brand); font-weight: 900; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; }

/* ===== Coupon list (smaller cards) ===== */
.coupon-list { display: grid; gap: 12px; }
.coupon-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.coupon-row .meta { font-size: .9rem; color: var(--ink-2); }
.coupon-row .meta strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 700; }
.coupon-row .code-mini {
  font-family: "JetBrains Mono", monospace; font-weight: 800;
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--brand);
  white-space: nowrap;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 60px;
  background: var(--accent); color: rgba(255,255,255,.78);
  padding: 50px 0 26px;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid {
  display: grid; gap: 30px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid a { color: rgba(255,255,255,.78); display: block; padding: 4px 0; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem; color: rgba(255,255,255,.55); text-align: center;
}
.footer-bottom .disclaimer { max-width: 620px; margin: 8px auto 0; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: .85rem; color: var(--ink-3); margin: 14px 0 4px;
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { margin: 0 6px; opacity: .6; }

/* ===== Utility ===== */
.muted { color: var(--ink-3); }
.text-center { text-align: center; }
.empty {
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 24px; text-align: center; color: var(--ink-3);
}

/* ===== Small screens ===== */
@media (max-width: 480px) {
  .hero { padding: 28px 0 22px; }
  .section { padding: 32px 0; }
  .code-pill .code-text { font-size: 1.1rem; }
}

/* Reduce CLS — force a min-height on logo wraps */
.store-card .logo-wrap, .store-hero .logo-tile { contain: layout paint; }
