/* =============================================================================
   Rojsky — Design System
   Light-first, trust-forward tech retail. Full RTL (Arabic/Kurdish) + LTR (EN).
   Uses CSS logical properties so layout flips automatically with `dir`.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700;800&family=Noto+Kufi+Arabic:wght@500;600;700;800&family=Rubik:wght@400;500;600;700;800&family=Nunito+Sans:wght@300;400;500;600;700&display=swap');

/* ----------------------------------------------------------------- Tokens -- */
:root {
  /* Brand palette */
  --navy: #0B2545;
  --navy-700: #112f57;
  --blue: #1D4ED8;
  --blue-600: #2563EB;
  --emerald: #10B981;
  --emerald-600: #059669;
  --amber: #F59E0B;
  --amber-600: #D97706;

  /* Neutrals */
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --surface-2: #EEF3F9;
  --text: #0F172A;
  --muted: #475569;
  --muted-2: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;

  /* Status */
  --success: #10B981;
  --danger: #DC2626;

  /* Typography */
  --font-ar: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-ar-head: 'Noto Kufi Arabic', 'Noto Sans Arabic', sans-serif;
  --font-en: 'Nunito Sans', system-ui, sans-serif;
  --font-en-head: 'Rubik', system-ui, sans-serif;

  /* Radius & shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 18px 40px rgba(11, 37, 69, .14);
  --shadow-cta: 0 10px 24px rgba(16, 185, 129, .35);

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
}

/* ------------------------------------------------------------------ Reset -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--font-en); }

img, svg, video { display: block; max-width: 100%; }
/* default size for inline icons; specific contexts (.btn svg, etc.) override */
.ic { width: 1.2em; height: 1.2em; flex: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

/* ------------------------------------------------------------- Typography -- */
h1, h2, h3, h4 { font-family: var(--font-ar-head); line-height: 1.25; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4 { font-family: var(--font-en-head); }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  color: var(--emerald-600); text-transform: uppercase;
}
.section-head { text-align: center; max-width: 640px; margin-inline: auto; margin-bottom: 44px; }
.section-head p { margin-top: 12px; font-size: 1.05rem; }
.text-muted { color: var(--muted); }

/* ----------------------------------------------------------------- Layout -- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.bg-surface { background: var(--surface); }
.bg-soft { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }

.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* --------------------------------------------------------------- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-md); font-weight: 700; font-size: .98rem;
  cursor: pointer; transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 20px; height: 20px; }
.btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--emerald-600); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: var(--surface); color: var(--navy); border: 1.5px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-whatsapp { background: #25D366; color: #073d1f; }
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-ghost { color: var(--navy); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 1.05rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

/* ----------------------------------------------------------------- Badges -- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-grade { background: #ECFDF5; color: var(--emerald-600); border: 1px solid #A7F3D0; }
.badge-grade.b { background: #EFF6FF; color: var(--blue); border-color: #BFDBFE; }
.badge-grade.c { background: #FFFBEB; color: var(--amber-600); border-color: #FDE68A; }
.badge-soft { background: var(--surface-2); color: var(--muted); }
.badge-stock { background: #ECFDF5; color: var(--emerald-600); }
.badge-out { background: #FEF2F2; color: var(--danger); }

/* ------------------------------------------------ Tubelight header -- */
/* Floating glass bar at the top; on mobile a slim top bar + bottom icon pill.
   Adapted (vanilla) from the shadcn "tubelight-navbar" — glowing active tab. */
.site-header { display: block; }
body { padding-top: 88px; }

.tl-topbar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  display: flex; justify-content: center; padding: 14px 16px 0; pointer-events: none;
}
.tl-bar {
  /* Wider than --container (used for page content): the nav has 6 links plus
     the lang switch/cart/WhatsApp actions, and in the ckb/en translations that
     content is wider than 1200px — capping it there pushed the WhatsApp
     button past the pill's right edge. */
  pointer-events: auto; width: 100%; max-width: 1320px;
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .72); backdrop-filter: saturate(170%) blur(16px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-md);
  padding-inline: 18px 12px; padding-block: 8px; min-height: 56px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.12rem; color: var(--navy); }
.brand .logo { height: 42px; width: auto; max-width: 150px; flex: none; object-fit: contain; }
.brand small { display: block; font-size: .66rem; font-weight: 600; color: var(--muted-2); letter-spacing: .02em; }
.brand .brand-text { line-height: 1.15; }

.tl-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.tl-actions .btn-whatsapp { min-height: 42px; }

/* Cart icon button in the header */
.tl-cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; color: var(--navy);
  background: transparent; border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}
.tl-cart:hover { background: var(--surface-2); border-color: var(--line); }
.tl-cart .ic { width: 22px; height: 22px; }
.tl-cart-badge {
  position: absolute; top: -2px; inset-inline-end: -2px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--emerald); color: #fff;
  font-size: .7rem; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* tubelight nav links */
.tl-nav { display: flex; align-items: center; gap: 4px; }
.tl-nav-desktop { margin-inline: auto; }
.tl-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  color: var(--muted); white-space: nowrap; cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.tl-link:hover { color: var(--navy); }
.tl-link.active { color: var(--navy); background: var(--surface-2); }
.tl-link:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.tl-link .tl-icon { display: inline-flex; }
.tl-link .tl-icon svg { width: 22px; height: 22px; }

/* the glowing "lamp" on the active link */
.tl-lamp { position: absolute; inset: 0; border-radius: 999px; background: rgba(16, 185, 129, .06); z-index: -1; animation: tlFade .35s ease; }
.tl-lamp-bar { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 34px; height: 4px; background: var(--emerald); border-radius: 4px 4px 0 0; }
.tl-glow { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); border-radius: 999px; background: rgba(16, 185, 129, .32); }
.tl-glow.g1 { width: 50px; height: 24px; filter: blur(14px); }
.tl-glow.g2 { width: 30px; height: 20px; filter: blur(10px); }
.tl-glow.g3 { width: 14px; height: 14px; filter: blur(7px); top: -3px; }
@keyframes tlFade { from { opacity: 0; } to { opacity: 1; } }

/* language switcher (reused in the bar) */
.lang-switch { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.lang-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 84px; padding: 6px 10px; box-sizing: border-box; white-space: nowrap;
  border-radius: 999px; font-weight: 700; font-size: .82rem;
  color: var(--muted); transition: background-color .2s ease, color .2s ease;
}
.lang-flag { width: 20px; height: 13px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang-switch button.active { background: var(--navy); color: #fff; }
.lang-switch button:hover:not(.active) { color: var(--navy); }

/* mobile bottom icon nav */
.tl-nav-mobile {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 50;
  display: none; justify-content: center; padding-block: 8px 18px; pointer-events: none;
}
.tl-nav-mobile .tl-pill {
  pointer-events: auto; display: flex; gap: 4px;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(170%) blur(16px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg); padding: 6px;
}
.tl-nav-mobile .tl-link { min-width: 52px; min-height: 48px; padding: 10px 16px; }

/* swap desktop links ↔ bottom icon nav at the md breakpoint (768px) */
@media (max-width: 767px) {
  .tl-nav-desktop { display: none; }
  .tl-nav-mobile { display: flex; }
  body { padding-bottom: 86px; }
  .tl-wa-label { display: none; }
  /* On phones the WhatsApp button becomes a plain logo (no green pill) — the icon
     already holds its own green bubble + white glyph, so dropping the green
     background reveals the real WhatsApp logo. Compact like the cart so it never
     gets clipped at the screen edge. */
  .tl-actions .btn-whatsapp {
    width: 44px; height: 44px; min-height: 44px; padding: 0; gap: 0;
    background: transparent; border-color: transparent; box-shadow: none; border-radius: 999px;
  }
  .tl-actions .btn-whatsapp svg { width: 30px; height: 30px; }
  /* Tighten the top bar so brand + language switch + cart + WhatsApp all fit a
     phone width (they previously overflowed, clipping the WhatsApp icon). */
  .tl-topbar { padding-inline: 10px; }
  .tl-bar { gap: 8px; padding-inline: 12px 10px; }
  .tl-actions { gap: 6px; }
  /* Icon-only language buttons on phones (flag only, no text) — same reasoning
     as the WhatsApp button above: keeps the header from overflowing and
     pushing the WhatsApp/cart icons off the edge of the screen. */
  .lang-switch button { min-width: 0; min-height: 40px; padding: 0; width: 34px; height: 34px; }
  .lang-label { display: none; }
  .lang-flag { width: 22px; height: 15px; }
}
@media (max-width: 420px) {
  .brand .brand-text { display: none; }
}

/* ------------------------------------------------------------------- Hero -- */
.hero { position: relative; overflow: hidden; background:
    radial-gradient(1100px 480px at 85% -10%, rgba(29, 78, 216, .14), transparent 60%),
    radial-gradient(900px 420px at 0% 110%, rgba(16, 185, 129, .12), transparent 55%),
    linear-gradient(180deg, #fff, var(--bg)); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: clamp(48px, 7vw, 88px); }
.hero h1 { color: var(--navy); }
.hero h1 .hl { color: var(--emerald-600); }
.hero p.lead { font-size: 1.15rem; margin-top: 18px; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; }
.hero-trust .item { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); font-size: .95rem; }
.hero-trust .item svg { width: 22px; height: 22px; color: var(--emerald); flex: none; }

.hero-visual { position: relative; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 22px; transform: rotate(-1.5deg);
}
.hero-card img { border-radius: var(--r-lg); width: 100%; aspect-ratio: 16/11; object-fit: cover; background: var(--surface-2); }
.hero-pill {
  position: absolute; inset-inline-end: -14px; inset-block-start: 20px;
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-md);
  box-shadow: var(--shadow-md); font-weight: 700; font-size: .9rem; display: flex; gap: 8px; align-items: center;
}
.hero-pill .price { color: var(--amber); }
.hero-pill2 {
  position: absolute; inset-inline-start: -10px; inset-block-end: 26px;
  background: var(--surface); border: 1px solid var(--line); padding: 11px 15px; border-radius: var(--r-md);
  box-shadow: var(--shadow-md); font-weight: 700; font-size: .85rem; color: var(--navy); display: flex; gap: 8px; align-items: center;
}
.hero-pill2 svg { width: 20px; height: 20px; color: var(--emerald); }

/* search box in hero */
.hero-search { margin-top: 26px; display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 7px; box-shadow: var(--shadow-sm); max-width: 460px; }
.hero-search input { flex: 1; border: none; outline: none; padding: 10px 12px; background: transparent; font-size: 1rem; }
.hero-search .btn { min-height: 44px; }

/* --------------------------------------------------------------- Trust row -- */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-strip .cell { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.trust-strip .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #ECFDF5; color: var(--emerald-600); flex: none; }
.trust-strip .icon svg { width: 24px; height: 24px; }
.trust-strip strong { display: block; color: var(--navy); font-size: .98rem; }
.trust-strip span { font-size: .85rem; color: var(--muted); }

/* ------------------------------------------------------------ Laptop card -- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.laptop-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.laptop-card:hover { box-shadow: var(--shadow-lg); border-color: #C7D7EC; transform: translateY(-4px); }
.laptop-card .thumb { position: relative; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.laptop-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.laptop-card:hover .thumb img { transform: scale(1.04); }
.laptop-card .thumb .badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; box-shadow: var(--shadow-sm); }
.laptop-card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.laptop-card .brand-line { font-size: .8rem; color: var(--muted-2); font-weight: 600; }
.laptop-card h3 { font-size: 1.08rem; color: var(--navy); }
/* Five chips (CPU, RAM, storage, screen, GPU) have to sit on a 260px card, so
   they are a shade tighter than a stand-alone pill and never break mid-value —
   "8 / 16GB" wrapping after the slash would read as two separate options. */
.laptop-card .specs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.laptop-card .spec { font-size: .73rem; background: var(--surface-2); color: var(--muted); padding: 4px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
/* A discrete graphics card is the one spec a gamer scans for — tinted the same
   blue as the grade badge so it reads as "worth noticing", not as a warning. */
.laptop-card .spec-gpu { background: #EFF6FF; color: var(--blue); }
.laptop-card .foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--font-en-head); font-weight: 800; color: var(--navy); font-size: 1.3rem; }
.price .iqd { display: block; font-size: .72rem; font-weight: 600; color: var(--muted-2); font-family: var(--font-ar); }
/* Old (pre-discount) price — struck through with a line to emphasise it's the old price. */
.price-old { font-family: var(--font-en-head); font-weight: 700; color: var(--muted-2); text-decoration: line-through; text-decoration-color: var(--rose, #e11d48); text-decoration-thickness: 2px; opacity: .85; margin-inline-end: 8px; font-size: .8em; }
.price-old .iqd { display: none; }

/* ----------------------------------------------------------- How it works -- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); position: relative; }
.step .num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; font-family: var(--font-en-head); margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }

/* ------------------------------------------------------------- CTA banner -- */
.cta-banner { background: linear-gradient(135deg, var(--navy), #143b6b); color: #fff; border-radius: var(--r-xl); padding: clamp(32px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.cta-banner::after { content: ""; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; width: 420px; height: 420px; background: radial-gradient(circle, rgba(16,185,129,.35), transparent 60%); }
.cta-banner h2 { color: #fff; position: relative; }
.cta-banner p { color: #c9d6ea; margin-top: 12px; position: relative; }
.cta-banner .actions { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ------------------------------------------------------------- Filter bar -- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 28px; }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 12px; }
.search-field svg { width: 20px; height: 20px; color: var(--muted-2); flex: none; }
.search-field input { flex: 1; border: none; background: transparent; outline: none; padding: 12px 4px; }
.select {
  appearance: none; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 38px 12px 14px; font-weight: 600; color: var(--navy); cursor: pointer; min-height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2364748B' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
[dir="rtl"] .select { padding: 12px 14px 12px 38px; background-position: left 12px center; }
.select:focus-visible { outline: 3px solid rgba(37,99,235,.4); outline-offset: 1px; }
.results-count { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }

/* About page: description + "visit us" card; stacks on phones. */
.about-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; align-items: start; }
@media (max-width: 768px) { .about-split { grid-template-columns: 1fr; gap: 28px; } }

/* ----------------------------------------------------------- Product page -- */
.product-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; }
.gallery .main-img { aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery .thumbs button { width: 76px; height: 60px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid var(--line); background: var(--surface-2); }
.gallery .thumbs button.active { border-color: var(--blue); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info .price-row { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.product-info .price-row .price { font-size: 2rem; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.spec-table tr:not(:last-child) { border-bottom: 1px solid var(--line); }
.spec-table th { text-align: start; padding: 12px 16px; background: var(--surface-2); color: var(--muted); font-weight: 600; width: 42%; font-size: .92rem; }
.spec-table td { padding: 12px 16px; color: var(--navy); font-weight: 600; }
.product-desc { color: var(--muted); line-height: 1.8; margin: 12px 0 22px; }
.assurance { display: flex; flex-direction: column; gap: 10px; background: #F0FAF6; border: 1px solid #BBF7D0; border-radius: var(--r-md); padding: 16px; margin-top: 20px; }
.assurance .row { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: #065f46; font-weight: 600; }
.assurance svg { width: 20px; height: 20px; color: var(--emerald-600); flex: none; margin-top: 1px; }

/* ------------------------------------------------------------------ Forms -- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: clamp(20px, 4vw, 32px); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 7px; font-size: .94rem; }
.field .req { color: var(--danger); }
.field input[type="text"], .field input[type="tel"], .field input[type="number"], .field input[type="email"],
.field input[type="password"], .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px; min-height: 50px; transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.field .hint { font-size: .82rem; color: var(--muted-2); margin-top: 6px; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field .error-msg { color: var(--danger); font-size: .82rem; margin-top: 6px; display: none; }
.field.invalid .error-msg { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* radio cards (payment method) */
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-option { position: relative; }
.pay-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pay-option .box { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--bg); transition: border-color .2s ease, background-color .2s ease; height: 100%; }
.pay-option .box svg { width: 26px; height: 26px; color: var(--navy); flex: none; }
.pay-option .box strong { display: block; color: var(--navy); }
.pay-option .box span { font-size: .82rem; color: var(--muted); }
.pay-option input:checked + .box { border-color: var(--emerald); background: #F0FAF6; box-shadow: 0 0 0 3px rgba(16,185,129,.14); }
.pay-option input:focus-visible + .box { outline: 3px solid rgba(37,99,235,.4); outline-offset: 2px; }

/* order page layout */
.order-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }

/* order summary aside */
.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
.summary-card .item { display: flex; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.summary-card .item img { width: 84px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); flex: none; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); }
.summary-row.total { font-size: 1.2rem; font-weight: 800; color: var(--navy); padding-top: 14px; border-top: 2px solid var(--line); margin-top: 6px; }
.summary-row.total .price { font-size: 1.4rem; }

/* cart line item */
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 84px; height: 84px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); }
.cart-line-body { min-width: 0; }
.cart-line-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line-foot .price { font-size: 1.05rem; }
.icon-btn.danger { color: var(--danger); }
@media (max-width: 600px) {
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line img { width: 64px; height: 64px; }
  .cart-line-foot { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
}

/* ------------------------------------------------------------ Confirmation -- */
.confirm-wrap { max-width: 640px; margin-inline: auto; text-align: center; }
.confirm-check { width: 84px; height: 84px; border-radius: 50%; background: #ECFDF5; color: var(--emerald-600); display: grid; place-items: center; margin: 0 auto 22px; box-shadow: 0 0 0 8px rgba(16,185,129,.1); }
.confirm-check svg { width: 44px; height: 44px; }
.confirm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: clamp(24px, 5vw, 44px); margin-top: 10px; }
.order-ref { display: inline-block; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 10px 18px; font-family: var(--font-en-head); font-weight: 800; color: var(--navy); letter-spacing: .04em; margin: 6px 0 4px; }
.fib-box { text-align: start; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--r-md); padding: 18px; margin-top: 22px; }
.fib-box h3 { color: var(--amber-600); font-size: 1.05rem; margin-bottom: 10px; }
.fib-box .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; color: var(--navy); font-weight: 600; }

/* ------------------------------------------------------------------ Steps page contact strip -- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); text-align: center; }
.contact-card .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; background: #EFF6FF; color: var(--blue); }
.contact-card .ic svg { width: 28px; height: 28px; }
.contact-card a { font-weight: 700; color: var(--navy); font-size: 1.1rem; direction: ltr; display: inline-block; }
.map-embed { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* The About page's location section is the target of the footer pin link
   (/about#location). The header is fixed (body carries padding-top: 88px), so a
   raw anchor jump parks the section top at y=0 and slides the heading under the
   bar. scroll-margin-top offsets where the browser stops -- CSS only, no scroll
   maths in JS. */
#location { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------------------------------------------------------- Prose (about) -- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 36px; margin-bottom: 12px; }
.prose h3 { margin-top: 26px; margin-bottom: 8px; }
.prose p { margin-bottom: 14px; line-height: 1.85; }
.prose ul.checklist { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.prose ul.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.prose ul.checklist svg { width: 22px; height: 22px; color: var(--emerald); flex: none; margin-top: 3px; }

/* ------------------------------------------------------------------ Admin -- */
.admin-shell { min-height: 100vh; }
.login-card { max-width: 420px; margin: 8vh auto; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tabs { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.admin-tabs button { padding: 9px 18px; border-radius: 999px; font-weight: 700; color: var(--muted); }
.admin-tabs button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.data-table th { text-align: start; padding: 14px 16px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .85rem; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: #fafcff; }
.data-table img { width: 56px; height: 44px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); }

/* --- admin: search box + brand grouping ---------------------------------- */
.admin-search { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-search-field { position: relative; display: flex; align-items: center; flex: 1 1 280px; max-width: 420px; }
.admin-search-field svg { position: absolute; inset-inline-start: 12px; width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.admin-search-field input { width: 100%; min-height: 44px; padding: 10px 14px; padding-inline-start: 40px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); font: inherit; color: var(--text); }
.admin-search-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.admin-search-count { font-size: .85rem; color: var(--muted-2); font-weight: 600; }

/* A brand heading row inside the laptops table. Its own <tbody> per brand. */
.data-table .group-row td { background: var(--surface-2); border-top: 2px solid var(--line); padding: 9px 16px; }
.data-table .group-row:hover td { background: var(--surface-2); }
.group-row .g-name { font-weight: 800; color: var(--navy); letter-spacing: .01em; }
.group-row .g-count { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .75rem; font-weight: 700; color: var(--muted); }

.table-actions { display: flex; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--navy); }
.icon-btn.danger:hover { background: #FEF2F2; color: var(--danger); }

/* A destructive button: red outline, filling in on hover so the action reads
   as dangerous before it is clicked. Used by "Delete all orders". */
.btn.btn-outline.danger { color: var(--danger); border-color: #FCA5A5; }
.btn.btn-outline.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.icon-btn svg { width: 19px; height: 19px; }

/* analytics — logical properties throughout so the panel mirrors in RTL */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.stat-card .n { font-size: 1.75rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.stat-card .k { font-size: .82rem; color: var(--muted-2); margin-block-start: 2px; }
.stat-card.accent .n { color: var(--emerald-600); }

.stat-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-block-end: 16px; }
.stat-panel h3 { font-size: 1rem; margin-block-end: 14px; }
.stat-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

/* Daily bars. Height is set inline from the data; everything else lives here. */
.spark { display: flex; align-items: flex-end; gap: 2px; height: 110px; }
.spark .bar { flex: 1; min-width: 3px; background: var(--blue); border-radius: 3px 3px 0 0; opacity: .85; transition: opacity .15s; }
.spark .bar:hover { opacity: 1; }
.spark .bar.zero { background: var(--line); }
.spark-axis { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted-2); margin-block-start: 6px; }

/* Language / referrer / device breakdowns. */
.stat-rows { display: flex; flex-direction: column; gap: 10px; }
.stat-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .87rem; }
.stat-row .lbl { color: var(--navy); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row .val { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.stat-row .track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stat-row .fill { height: 100%; border-radius: 999px; background: var(--blue); }

/* file upload */
.uploader { border: 2px dashed var(--line-strong); border-radius: var(--r-md); padding: 20px; text-align: center; background: var(--bg); cursor: pointer; transition: border-color .2s, background-color .2s; }
.uploader:hover { border-color: var(--blue); background: #fff; }
.uploader svg { width: 30px; height: 30px; color: var(--muted-2); margin: 0 auto 8px; }
.upload-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.upload-previews .pv { position: relative; width: 80px; height: 64px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.upload-previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.upload-previews .pv button { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(15,23,42,.7); color: #fff; display: grid; place-items: center; font-size: 14px; line-height: 1; }

/* ---------------------------------------------------------------- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(11,37,69,.5); backdrop-filter: blur(3px); z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 920px; margin-block: auto; }
/* The invoice editor carries an eight-column line-item grid, so it gets more
   room than the laptop/accessory forms. admin.js toggles this per modal. */
.modal.modal-wide { max-width: 1280px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.2rem; }
.modal-body { padding: 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: flex-end; }

/* ---------------------------------------------------------------- Toast ---- */
.toast-wrap { position: fixed; inset-block-end: 24px; inset-inline-end: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy); color: #fff; padding: 13px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-weight: 600; display: flex; align-items: center; gap: 10px; animation: toastIn .3s ease; max-width: 360px; }
.toast.success { background: var(--emerald-600); }
.toast.error { background: var(--danger); }
.toast svg { width: 20px; height: 20px; flex: none; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ----------------------------------------------------------------- Footer -- */
.site-footer { background: var(--navy); color: #c9d6ea; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 56px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: #c9d6ea; display: inline-block; padding: 5px 0; transition: color .2s ease; }
.site-footer a:hover { color: #fff; }
.site-footer .btn { display: inline-flex; padding: 12px 22px; }
.footer-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 12px; }
.footer-brand .logo { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact .ln { display: flex; align-items: center; gap: 10px; }
.footer-contact svg { width: 18px; height: 18px; color: var(--emerald); flex: none; }
.footer-contact a { direction: ltr; }
/* The pin line is now a link to /about#location. The rule above forces
   direction: ltr for the phone numbers; the city name is prose and must follow
   the page direction (RTL for ar/ckb, LTR for en). */
.footer-contact a.footer-loc { direction: inherit; }

/* Footer links had no focus ring, so a keyboard user tabbing to the new location
   link could not see where they were. Matches .btn / .tl-link, lightened for the
   navy footer. */
.footer-contact a:focus-visible { outline: 3px solid rgba(255, 255, 255, .65); outline-offset: 2px; border-radius: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 20px; text-align: center; font-size: .88rem; color: #95a9c6; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #c9d6ea; }
.footer-social a:hover { background: rgba(255,255,255,.16); color: #fff; }
.footer-social svg { width: 19px; height: 19px; }

/* page hero (sub pages) */
.page-hero { background: linear-gradient(180deg, #fff, var(--bg)); border-bottom: 1px solid var(--line); padding-block: clamp(36px, 6vw, 60px); }
.page-hero .crumbs { font-size: .88rem; color: var(--muted-2); margin-bottom: 10px; }
.page-hero .crumbs a:hover { color: var(--blue); }
.page-hero h1 { color: var(--navy); }
.page-hero p { margin-top: 10px; max-width: 60ch; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state svg { width: 56px; height: 56px; color: var(--line-strong); margin: 0 auto 14px; }

/* skeleton loading */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #e6edf6 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-card { height: 320px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* -------------------------------------------------------------- Utilities -- */
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.center{text-align:center}.flex{display:flex}.gap-2{gap:16px}.items-center{align-items:center}.wrap{flex-wrap:wrap}.justify-center{justify-content:center}
.hidden{display:none !important}
.ltr{direction:ltr;unicode-bidi:isolate}

/* ------------------------------------------------------------- Responsive -- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .product-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; max-width: 460px; }
  .steps { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .order-layout { grid-template-columns: 1fr !important; }
  .summary-card { position: static; }
}
@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .trust-strip { grid-template-columns: 1fr; }
  .pay-options { grid-template-columns: 1fr; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn, .hero-cta { width: 100%; }
  .card-grid { grid-template-columns: 1fr; }
  .toast-wrap { inset-inline: 16px; inset-block-end: 96px; }
  .toast { max-width: none; }
}

/* ------------------------------------------------------- Reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-card { transform: none; }
}
