/* ============ شبكة تيربو — المتجر ============ */
:root, [data-theme="dark"] {
  --bg: #04080F;
  --bg-2: #081227;
  --surface: rgba(16, 30, 60, .55);
  --surface-solid: #0C1730;
  --surface-2: rgba(34, 184, 255, .06);
  --border: rgba(125, 200, 255, .14);
  --border-strong: rgba(34, 184, 255, .35);
  --text: #E8F0FC;
  --muted: #8DA1C3;
  --faint: #5C6F92;
  --cyan: #22B8FF;
  --cyan-2: #7DF9FF;
  --blue: #2563EB;
  --turbo: #FF5A2E;
  --turbo-2: #FFB020;
  --ok: #22C55E;
  --err: #F43F5E;
  --warn: #F59E0B;
  --grad: linear-gradient(135deg, #7DF9FF 0%, #22B8FF 45%, #2563EB 100%);
  --grad-btn: linear-gradient(135deg, #22B8FF 0%, #2563EB 100%);
  --grad-turbo: linear-gradient(135deg, #FFB020 0%, #FF5A2E 55%, #E11D48 100%);
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
  --glow: 0 10px 30px -8px rgba(34, 184, 255, .45);
  --nav-bg: rgba(5, 10, 20, .92);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F5F7FA;
  --bg-2: #F5F7FA;
  --surface: #FFFFFF;
  --surface-solid: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E5E7EB;
  --border-strong: rgba(37, 99, 235, .55);
  --text: #0F172A;
  --muted: #64748B;
  --faint: #94A3B8;
  --cyan: #1D4ED8;
  --cyan-2: #FFFFFF;
  --grad: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  --grad-btn: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  --shadow: 0 4px 14px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --glow: 0 8px 20px -6px rgba(37, 99, 235, .45);
  --nav-bg: rgba(255, 255, 255, .98);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
.num { font-family: 'Inter', sans-serif; font-feature-settings: "tnum"; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.center { text-align: center; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 92px; background: var(--bg); }
@media (min-width: 560px) { .app { box-shadow: 0 0 80px rgba(0,0,0,.35); } }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden; padding: 16px 18px 70px;
  background: radial-gradient(120% 90% at 50% 0%, #12306A 0%, #081227 55%, #04080F 100%);
  color: #E8F0FC;
}
[data-theme="light"] .hero { background: radial-gradient(90% 70% at 50% 0%, rgba(37,99,235,.16), transparent 70%), #FFFFFF; color: var(--text); border-bottom: 1px solid var(--border); }
[data-theme="light"] .hero-glow { background: radial-gradient(circle, rgba(37,99,235,.18), transparent 65%); }
[data-theme="light"] .hero-lines span { background: linear-gradient(90deg, transparent, rgba(37,99,235,.25), transparent); }
[data-theme="light"] .brand-word .w1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .brand-word .w2 { color: #0F172A; }
[data-theme="light"] .brand-sub { color: var(--muted); }
[data-theme="light"] .live { color: #1E40AF; }
[data-theme="light"] .ticker { background: #EFF6FF; border-color: #DBEAFE; backdrop-filter: none; }
[data-theme="light"] .ticker-text { color: #1E3A8A; font-weight: 700; }
[data-theme="light"] .pulse { background: #2563EB; box-shadow: 0 0 10px #2563EB; }
[data-theme="light"] .icon-btn { background: #EFF6FF; border-color: #DBEAFE; color: #1E40AF; }
[data-theme="light"] .sheet { background: var(--bg); border-top: 0; margin-top: -30px; }
[data-theme="light"] .statbar, [data-theme="light"] .act, [data-theme="light"] .pk-c, [data-theme="light"] .pk-f, [data-theme="light"] .quick { border: 1.5px solid var(--border); box-shadow: var(--shadow); backdrop-filter: none; }
[data-theme="light"] .pk-c:hover, [data-theme="light"] .pk-f:hover { border-color: #2563EB; box-shadow: 0 14px 32px rgba(15,23,42,.09); }
[data-theme="light"] .pk-c.in-cart { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.15), var(--shadow); }
[data-theme="light"] .act-restore .act-ic { background: linear-gradient(135deg, #3B82F6, #1D4ED8); box-shadow: 0 6px 16px -4px rgba(59,130,246,.5); }
[data-theme="light"] .ad { background: linear-gradient(135deg, #EFF6FF, #FFFFFF); border-color: #DBEAFE; }
[data-theme="light"] .ad::after { background: radial-gradient(circle, rgba(37,99,235,.18), transparent 70%); }
[data-theme="light"] .ad b { color: #1E40AF; }
[data-theme="light"] .pk-f-head { background: radial-gradient(70% 120% at 90% 0%, rgba(255,255,255,.22), transparent 60%), linear-gradient(135deg, #3B82F6, #1D4ED8 70%, #1E40AF); }
[data-theme="light"] .pk-f-head::before { opacity: .5; }
[data-theme="light"] .pk-f-col small, [data-theme="light"] .pk-f-col .v em { color: #EFF6FF; }
[data-theme="light"] .pk-f-div { background: linear-gradient(transparent, rgba(255,255,255,.6), transparent); }
[data-theme="light"] .pk-c-foot { background: #F8FAFC; }
[data-theme="light"] .ring { background: conic-gradient(#2563EB 0 75%, #E0EAFB 75% 100%); }
[data-theme="light"] .feats li { background: #F8FAFC; }
[data-theme="light"] .feats li svg { color: #2563EB; }
[data-theme="light"] .inp, [data-theme="light"] .otp span, [data-theme="light"] .cred { background: #F8FAFC; }
[data-theme="light"] .inp:focus { border-color: #2563EB; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
[data-theme="light"] .otp span.cur { border-color: #2563EB; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
[data-theme="light"] .cartbar { border-color: #DBEAFE; box-shadow: 0 14px 34px -12px rgba(15,23,42,.22); }
[data-theme="light"] .cb-ic { background: #EFF6FF; }
[data-theme="light"] .sheet-m { border-color: var(--border); box-shadow: 0 -16px 50px rgba(15,23,42,.16); }
[data-theme="light"] .overlay { background: rgba(15,23,42,.45); }
[data-theme="light"] .vc::before { background: #2563EB; }
[data-theme="light"] .toast { background: #1E3A8A; border-color: #1E40AF; }
.hero-glow { position: absolute; width: 340px; height: 340px; top: -120px; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, rgba(34,184,255,.35), transparent 65%); pointer-events: none; }
.hero-lines span { position: absolute; height: 1px; width: 140%; left: -20%; background: linear-gradient(90deg, transparent, rgba(125,249,255,.25), transparent); }
.hero-lines span:nth-child(1) { top: 38%; transform: rotate(-9deg); }
.hero-lines span:nth-child(2) { top: 62%; transform: rotate(5deg); opacity: .5; }
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.live { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #9FD8FF; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 18px; color: #fff; transition: .2s; }
.icon-btn:active { transform: scale(.94); }
.brand { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; margin: 6px 0 18px; }
.brand-mark { width: 88px; height: 88px; filter: drop-shadow(0 10px 24px rgba(34,184,255,.35)); }
.brand-word { font-family: 'Inter', sans-serif; font-size: 34px; line-height: 1; letter-spacing: -1px; margin-top: 2px; direction: ltr; }
.brand-word .w1 { font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-word .w2 { font-weight: 300; color: #fff; }
.brand-sub { font-size: 12.5px; color: #A9BBDA; margin-top: 8px; font-weight: 500; }
.ticker { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--turbo); box-shadow: 0 0 10px var(--turbo); flex-shrink: 0; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-text { display: flex; width: max-content; white-space: nowrap; font-size: 11.5px; color: #C9D7EE; animation: marquee 30s linear infinite; }
.ticker-text span { padding-inline-start: 3rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- SHEET ---------- */
.sheet {
  position: relative; z-index: 5; margin-top: -42px; padding: 22px 16px 10px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 320px);
  border-radius: 28px 28px 0 0; border-top: 1px solid var(--border); min-height: 60vh;
}
.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.statbar { display: flex; align-items: center; justify-content: space-around; padding: 14px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(14px); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat strong { font-family: 'Inter'; font-size: 20px; font-weight: 800; color: var(--cyan); }
.stat span { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; line-height: 1.3; }
.stat.secure { flex-direction: row; gap: 7px; }
.stat.secure svg { font-size: 22px; color: var(--ok); }
.stat-sep { width: 1px; height: 30px; background: var(--border); }

.testbar { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 12px; font-size: 12px; font-weight: 800; color: #1A1206; background: var(--grad-turbo); }

/* ads */
.ads { margin-top: 14px; position: relative; }
.ads-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; scrollbar-width: none; }
.ads-track::-webkit-scrollbar { display: none; }
.ad { flex: 0 0 100%; scroll-snap-align: center; padding: 16px 18px; border-radius: 18px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(34,184,255,.16), rgba(37,99,235,.08)); border: 1px solid var(--border-strong); min-height: 88px; }
.ad::after { content: ''; position: absolute; width: 120px; height: 120px; left: -30px; bottom: -50px; background: radial-gradient(circle, rgba(255,90,46,.3), transparent 70%); }
.ad b { display: block; font-size: 15px; font-weight: 900; color: var(--cyan); margin-bottom: 5px; }
.ad p { font-size: 12.5px; color: var(--muted); line-height: 1.7; position: relative; z-index: 1; }
.ads-dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.ads-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--border-strong); transition: .3s; }
.ads-dots i.on { width: 18px; background: var(--cyan); }

/* quick buy */
.quick { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); }
.quick-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.quick-head strong { flex: 1; font-size: 14px; }
.chip { display: inline-flex; gap: 4px; align-items: center; font-size: 10.5px; font-weight: 900; padding: 4px 8px; border-radius: 8px; color: #1A1206; background: var(--grad-turbo); }
.quick-items { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; line-height: 1.8; }
.x { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); font-size: 16px; }

/* actions */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.act { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); text-align: start; transition: .2s; }
.act:active { transform: scale(.97); }
.act-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #fff; flex-shrink: 0; }
.act-wallet .act-ic { background: linear-gradient(135deg, #22C55E, #15803D); box-shadow: 0 6px 16px -4px rgba(34,197,94,.5); }
.act-restore .act-ic { background: var(--grad-btn); box-shadow: var(--glow); }
.act-tx b { display: block; font-size: 13px; font-weight: 800; }
.act-tx small { font-size: 10.5px; color: var(--muted); font-weight: 500; }

/* section titles */
.sec-h { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 14px; }
.sec-h h3 { font-size: 15px; font-weight: 900; color: var(--cyan); display: flex; align-items: center; gap: 6px; }
.sec-h .vl { width: 1px; height: 20px; background: linear-gradient(transparent, var(--border-strong), transparent); }
.sec-h p { font-size: 11.5px; color: var(--muted); }
.sec-title { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; }
.sec-title > svg { font-size: 26px; color: var(--cyan); }
.sec-title h2 { font-size: 18px; font-weight: 900; }
.sec-title p { font-size: 12px; color: var(--muted); }

/* ---------- FEATURED PACKAGE ---------- */
.pk-f { position: relative; border-radius: 22px; overflow: hidden; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.pk-f-head { position: relative; display: flex; align-items: center; padding: 26px 0; background:
   radial-gradient(80% 120% at 85% 0%, rgba(34,184,255,.45), transparent 60%),
   radial-gradient(70% 120% at 10% 100%, rgba(255,90,46,.28), transparent 60%),
   linear-gradient(135deg, #0B2257, #050B18); color: #fff; }
.pk-f-head::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 14px); }
.pk-f-col { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.pk-f-col small { font-size: 11px; font-weight: 800; color: #B9CBEA; margin-bottom: 4px; }
.pk-f-col .v { font-family: 'Inter'; font-weight: 900; font-size: 42px; line-height: 1; color: var(--cyan-2); display: flex; align-items: baseline; gap: 4px; direction: ltr; }
.pk-f-col .v em { font-style: normal; font-size: 14px; font-weight: 700; color: #B9CBEA; }
.pk-f-div { width: 1px; height: 56px; background: linear-gradient(transparent, rgba(125,249,255,.5), transparent); position: relative; }
.pk-f-body { padding: 16px 16px 14px; }
.pk-f-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pk-f-title h4 { font-size: 17px; font-weight: 900; }
.badge { font-size: 10px; font-weight: 900; padding: 4px 10px; border-radius: 8px; color: #1A1206; background: var(--grad-turbo); white-space: nowrap; }
.badge.cool { background: var(--grad-btn); color: #fff; }
.pk-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.feats { list-style: none; display: grid; gap: 7px; margin-bottom: 14px; }
.feats li { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.feats li svg { color: var(--cyan); font-size: 15px; }

.pk-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--border); }
.pk-foot .stock { flex: 1; font-size: 11.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stock .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.stock.low .dot { background: var(--warn); }
.stock.out { color: var(--err); }
.stock.out .dot { background: var(--err); }

/* ---------- COMPACT PACKAGE ---------- */
.pk-c { border-radius: 18px; overflow: hidden; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: border-color .2s; }
.pk-c.in-cart { border-color: var(--border-strong); box-shadow: var(--glow); }
.pk-c-main { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.ring { width: 50px; height: 50px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
  background: conic-gradient(var(--cyan) 0 75%, rgba(34,184,255,.15) 75% 100%); position: relative; }
.ring::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--surface-solid); }
.ring b, .ring small { position: relative; font-family: 'Inter'; line-height: 1; }
.ring b { font-size: 17px; font-weight: 900; color: var(--cyan); }
.ring small { font-size: 8px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.pk-c-info { flex: 1; min-width: 0; }
.pk-c-info .badge { display: inline-block; margin-bottom: 5px; font-size: 9px; padding: 3px 7px; }
.pk-c-info h4 { font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-c-info p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pk-c-price { display: flex; align-items: baseline; gap: 3px; padding-inline-start: 12px; border-inline-start: 1px solid var(--border); direction: ltr; }
.pk-c-price b { font-family: 'Inter'; font-size: 26px; font-weight: 900; color: var(--cyan); line-height: 1; }
.pk-c-price small { font-size: 14px; font-weight: 800; color: var(--muted); }
.pk-c-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; background: var(--surface-2); border-top: 1px solid var(--border); }

/* qty / add */
.add { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 12px; font-size: 13px; font-weight: 900; color: #fff; background: var(--grad-btn); box-shadow: var(--glow); transition: .2s; }
.add:active { transform: scale(.95); }
.add:disabled { background: var(--surface-2); color: var(--faint); box-shadow: none; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); }
.qty button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--grad-btn); color: #fff; }
.qty button.minus { background: var(--surface-solid); color: var(--cyan); border: 1px solid var(--border); }
.qty b { min-width: 26px; text-align: center; font-family: 'Inter'; font-weight: 800; }

.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 6px; }
.notes span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.notes span svg { color: var(--cyan); }
.notes span.w { grid-column: span 2; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ei { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; color: var(--cyan); background: var(--surface-2); border: 1px solid var(--border); }
.empty h4 { color: var(--text); font-size: 15px; margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.loader { display: flex; justify-content: center; gap: 6px; padding: 60px 0; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); animation: bounce 1s infinite; }
.loader span:nth-child(2) { animation-delay: .15s; } .loader span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-10px); opacity: 1; } }

.foot { text-align: center; font-size: 10.5px; color: var(--faint); padding: 26px 0 10px; letter-spacing: .3px; }

/* ---------- CART BAR ---------- */
.cartbar { position: fixed; z-index: 40; bottom: 78px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 8px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 16px 40px -10px rgba(0,0,0,.55), var(--glow); animation: up .3s ease; }
@keyframes up { from { transform: translate(-50%, 20px); opacity: 0; } }
.cb-ic { position: relative; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: var(--cyan); background: var(--surface-2); }
.cb-n { position: absolute; top: -5px; left: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 11px; font-weight: 900; color: #fff; background: var(--turbo); display: grid; place-items: center; font-family: 'Inter'; }
.cb-info { flex: 1; min-width: 0; }
.cb-info b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-info small { font-size: 11px; color: var(--muted); }
.cb-total { display: flex; align-items: baseline; gap: 2px; direction: ltr; }
.cb-total .num { font-size: 20px; font-weight: 900; color: var(--cyan); }
.cb-total small { color: var(--muted); font-weight: 800; }
.cb-pay { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 13px; font-weight: 900; font-size: 13.5px; color: #fff; background: var(--grad-btn); white-space: nowrap; }

/* ---------- NAV ---------- */
.nav { position: fixed; z-index: 45; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; justify-content: space-around;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom)); background: var(--nav-bg); backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.nav-i { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--faint); font-size: 10.5px; font-weight: 700; padding: 2px 10px; transition: color .2s; }
.nav-i svg { font-size: 23px; transition: transform .2s; }
.nav-i.active { color: var(--cyan); }
.nav-i.active svg { transform: translateY(-2px); filter: drop-shadow(0 3px 6px rgba(34,184,255,.5)); }
.nav-badge-wrap { position: relative; display: inline-flex; }
.nav-badge { position: absolute; top: -6px; left: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 10px; font-weight: 900; color: #fff; background: var(--turbo); display: grid; place-items: center; font-family: 'Inter'; }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 15px; font-weight: 900; font-size: 15px; transition: .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { color: #fff; background: var(--grad-btn); box-shadow: var(--glow); }
.btn-ghost { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.btn-block { width: 100%; }
.btn-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--cyan); padding: 8px; }
.btn-link.danger { color: var(--err); margin: 8px auto 0; display: flex; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- MODAL SHEETS ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(2,6,15,.7); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.on { opacity: 1; pointer-events: auto; }
.sheet-m { position: fixed; z-index: 90; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface-solid); border: 1px solid var(--border); border-bottom: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.5);
  transform: translate(-50%, 105%); visibility: hidden; transition: transform .32s cubic-bezier(.2,.9,.3,1), visibility 0s .32s; }
.sheet-m.on { transform: translate(-50%, 0); visibility: visible; transition: transform .32s cubic-bezier(.2,.9,.3,1), visibility 0s; }
.sheet-m::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 10px auto 0; flex-shrink: 0; }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 8px; }
.m-head h3 { font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.m-head h3 svg { color: var(--cyan); font-size: 20px; }
.m-body { padding: 8px 18px 18px; overflow-y: auto; flex: 1; }
.m-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.m-foot.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.steps { display: flex; align-items: center; justify-content: center; padding: 8px 18px 6px; gap: 6px; }
.st { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: 'Inter'; font-size: 13px; font-weight: 800; color: var(--faint); background: var(--surface-2); border: 1.5px solid var(--border); }
.st i { position: absolute; top: 34px; font-style: normal; font-family: 'Tajawal'; font-size: 10px; font-weight: 700; white-space: nowrap; color: var(--faint); }
.st.on { color: #fff; background: var(--grad-btn); border-color: transparent; box-shadow: var(--glow); }
.st.on i { color: var(--cyan); }
.st.done { color: #fff; background: var(--ok); border-color: transparent; }
.st-l { width: 48px; height: 2px; border-radius: 1px; background: var(--border); }
.st-l.on { background: var(--ok); }
.steps + .m-body { padding-top: 26px; }

.summary { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; }
.summary div { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); padding: 4px 0; }
.summary div.big { border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 10px; }
.summary div.big b { font-size: 20px; color: var(--cyan); font-weight: 900; }
.lbl { display: block; font-size: 12.5px; font-weight: 800; margin: 12px 0 6px; color: var(--muted); }
.inp { width: 100%; height: 54px; padding: 0 16px; border-radius: 15px; font: inherit; font-size: 17px; font-weight: 700; color: var(--text); background: var(--bg); border: 1.5px solid var(--border); outline: none; transition: .2s; }
.inp:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34,184,255,.15); }
.inp-phone { font-family: 'Inter'; letter-spacing: 2px; text-align: center; font-size: 20px; }
.inp-otp { font-family: 'Inter'; letter-spacing: 12px; text-align: center; font-size: 24px; }
.hint { font-size: 11.5px; color: var(--faint); margin: 8px 2px 14px; }
.trust { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 12px; font-weight: 700; }
.trust svg { color: var(--ok); }
.alert { padding: 11px 13px; border-radius: 12px; font-size: 13px; font-weight: 700; margin: 10px 0; background: rgba(244,63,94,.12); color: #FB7185; border: 1px solid rgba(244,63,94,.3); line-height: 1.6; }
.alert.warn { background: rgba(245,158,11,.12); color: #FBBF24; border-color: rgba(245,158,11,.3); }
[data-theme="light"] .alert { color: #BE123C; } [data-theme="light"] .alert.warn { color: #B45309; }

.amount-banner { padding: 14px; border-radius: 16px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(255,90,46,.16), rgba(255,176,32,.08)); border: 1px solid rgba(255,90,46,.35); }
.amount-banner > span { display: block; font-size: 12px; font-weight: 800; color: var(--muted); }
.amount-banner b { font-size: 28px; font-weight: 900; color: var(--turbo); }
.otp-phone { font-size: 20px; font-weight: 800; margin-top: 4px; letter-spacing: 1px; }
.otp { position: relative; display: flex; justify-content: center; gap: 9px; margin: 16px 0 12px; direction: ltr; }
.otp input { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 24px; z-index: 2; caret-color: transparent; }
.otp span { width: 52px; height: 60px; border-radius: 15px; display: grid; place-items: center; font-family: 'Inter'; font-size: 26px; font-weight: 800; background: var(--bg); border: 1.5px solid var(--border); transition: .15s; }
.otp span.fill { border-color: var(--border-strong); color: var(--cyan); }
.otp span.cur { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34,184,255,.15); }
.otp.err span { border-color: var(--err); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.timer { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.timer b { color: var(--cyan); font-size: 15px; }
.timer.low b { color: var(--err); }
#resendBtn { margin-top: 8px; height: 46px; font-size: 13px; }

/* cart items */
.ci { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 9px; }
.ci-info { flex: 1; min-width: 0; }
.ci-info b { display: block; font-size: 13.5px; }
.ci-info small { font-size: 11.5px; color: var(--muted); }
.sum-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 800; color: var(--muted); }
.sum-row b { font-size: 22px; color: var(--cyan); }

/* success + my cards */
.success-ic { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; color: #fff; background: linear-gradient(135deg, #22C55E, #15803D); box-shadow: 0 0 0 10px rgba(34,197,94,.12), 0 14px 30px -8px rgba(34,197,94,.6); animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.success-t { text-align: center; font-size: 19px; font-weight: 900; margin-bottom: 4px; }
#successCards { margin-top: 16px; }
.vc { position: relative; padding: 14px 14px 12px; border-radius: 17px; margin-bottom: 12px; overflow: hidden; background: var(--surface-2); border: 1.5px solid var(--border); }
.vc::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.vc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed var(--border); }
.vc-head b { font-size: 14px; font-weight: 900; }
.vc-head small { font-size: 11px; color: var(--muted); }
.cred { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 7px; }
.cred span { font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.cred code { font-family: 'Inter', monospace; font-size: 18px; font-weight: 800; letter-spacing: .5px; direction: ltr; text-align: left; word-break: break-all; }
.cp { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--grad-btn); font-size: 15px; }
.cp.ok { background: var(--ok); }
.vc .use { margin-top: 6px; height: 44px; font-size: 13.5px; width: 100%; }
.order-g { margin-bottom: 18px; }
.order-g-h { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 0 4px 8px; }
.order-g-h b { color: var(--text); font-family: 'Inter'; }

.sup { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 9px; }
.sup-i { flex: 1; }
.sup-i b { display: block; font-size: 13.5px; color: var(--cyan); }
.sup-i span { font-family: 'Inter'; font-size: 14px; font-weight: 700; color: var(--muted); direction: ltr; display: inline-block; }
.sup a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px; }
.sup .wa { background: #25D366; } .sup .call { background: var(--blue); }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 100px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 11px 20px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; background: #0F2A5A; border: 1px solid var(--border-strong); box-shadow: var(--shadow); transition: .3s; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #7F1D2D; border-color: rgba(244,63,94,.5); }

@media (max-width: 380px) {
  .pk-f-col .v { font-size: 34px; }
  .otp span { width: 46px; height: 54px; }
  .cb-pay { padding: 12px 10px; font-size: 12.5px; }
  .brand-word { font-size: 30px; }
}
