/* Zakka shop effects (website + app), 2026-11-01.
   Ported from the old storefront: one-time intro, hero brake disc, receipt +
   stamp, VIN scramble, logo loader, VIP foil, scroll reveal, quality band,
   stats, footer, floating WhatsApp, favourites heart, theme switch.
   Everything decorative switches off with "reduce motion" (?intro=1 forces it). */
:root { --primary: var(--teal); --primary-ink: var(--teal-ink); }
:root[data-theme="dark"] { --primary: #5ec2d8; --primary-ink: #9fd6e4; }

/* ---------------- one-time intro (from the old website) ---------------- */
#intro-overlay {
  --in-navy: #121c3f; --in-navy-2: #0a1128; --in-teal: #5fb3c6; --in-teal-hi: #a6e6f2;
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(900px 520px at 50% 45%, #1a2a5a 0%, var(--in-navy) 45%, var(--in-navy-2) 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer; will-change: transform;
}
/* faint engineering grid, fades in behind the logo */
.intro-grid {
  position: absolute; inset: -2px; opacity: 0;
  background-image:
    linear-gradient(rgba(166,230,242,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166,230,242,.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 30%, transparent 100%);
          mask-image: radial-gradient(closest-side at 50% 50%, #000 30%, transparent 100%);
}
.intro-glow {
  position: absolute; left: 50%; top: 50%; width: 70vmin; height: 70vmin;
  transform: translate(-50%, -50%) scale(.6); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(95,179,198,.28) 0%, rgba(95,179,198,0) 65%);
  filter: blur(10px);
}
.intro-content {
  position: relative; z-index: 1; text-align: center; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 0 24px;
  will-change: transform, opacity;
}
.intro-logo-wrap {
  position: relative; line-height: 0;
  clip-path: inset(0 100% 0 0);
  -webkit-mask: url(../img/logo-wordmark-white.png) center / contain no-repeat;
          mask: url(../img/logo-wordmark-white.png) center / contain no-repeat;
}
.intro-logo { height: clamp(64px, 15vw, 118px); width: auto; display: block; }
.intro-shine {
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 38%;
  background: linear-gradient(90deg, transparent, rgba(166,230,242,.95) 50%, transparent);
  mix-blend-mode: screen; pointer-events: none;
}
.intro-line {
  position: relative; width: min(340px, 70vw); height: 2px;
  background: rgba(255,255,255,.08); border-radius: 2px; overflow: visible;
}
.intro-line span {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); border-radius: 2px;
  background: linear-gradient(90deg, rgba(95,179,198,0), var(--in-teal) 35%, var(--in-teal-hi));
  box-shadow: 0 0 12px rgba(166,230,242,.7), 0 0 28px rgba(95,179,198,.45);
}
.intro-tagline {
  font-family: var(--font-num); font-weight: 600; font-size: clamp(11.5px, 2.8vw, 14px);
  letter-spacing: .22em; text-transform: uppercase; color: #cfe9ef;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .5em; overflow: hidden; padding: 2px 0;
}
.intro-tagline:not(.ready) { visibility: hidden; }
.intro-tagline .w { display: inline-block; transform: translateY(110%); opacity: 0; }
.intro-skip {
  position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 2;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #e6f2f5;
  padding: 8px 16px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  cursor: pointer; opacity: 0; transition: background .15s ease;
}
.intro-skip:hover { background: rgba(255,255,255,.18); }
.intro-skip:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.45); }
@media (prefers-reduced-motion: reduce) { #intro-overlay:not(.forced) { display: none !important; } }

/* ---------------- receipt, scramble, loader, VIP foil (from kitchen-v2.css) ---------------- */
/* ---------- 1. Order receipt ------------------------------------------------ */
.fx-receipt-wrap { text-align: center; padding: 4px 0 2px; }
.fx-printer {
  position: relative; margin: 0 auto; width: min(320px, 100%);
  height: 18px; border-radius: 10px;
  background: linear-gradient(180deg, #1c2a44, #0c1424);
  box-shadow: 0 6px 14px rgba(9,16,30,.25), inset 0 -3px 0 rgba(255,255,255,.06);
  z-index: 2;
}
.fx-printer::after {           /* the paper slot */
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px;
  border-radius: 2px; background: #05080f;
}
.fx-paper-clip { width: min(296px, calc(100% - 24px)); margin: -6px auto 0; overflow: hidden; position: relative; z-index: 1; }
.fx-paper {
  position: relative; background: #fbfaf6; color: #1c2230;
  font: 500 12.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-align: left; padding: 18px 16px 86px;
  box-shadow: 0 10px 22px rgba(9,16,30,.18);
  /* zig-zag torn bottom edge */
  --zz: 9px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--zz) * 2) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--zz) * 2) 100%;
  animation: fx-print 1.7s cubic-bezier(.25,.7,.35,1) both;
}
:root[data-theme="dark"] .fx-paper { background: #f1efe8; }
@keyframes fx-print {
  0%   { transform: translateY(-100%); }
  12%  { transform: translateY(-86%); }
  20%  { transform: translateY(-82%); }   /* little stutters like a thermal printer */
  34%  { transform: translateY(-60%); }
  42%  { transform: translateY(-57%); }
  60%  { transform: translateY(-30%); }
  68%  { transform: translateY(-27%); }
  100% { transform: translateY(0); }
}
.fx-paper .r-head { text-align: center; margin-bottom: 8px; }
.fx-paper .r-brand { font: 800 15px/1.2 var(--font-num), system-ui, sans-serif; letter-spacing: .14em; }
.fx-paper .r-small { font-size: 11px; color: #5b6475; }
.fx-paper .r-rule { border: 0; border-top: 1.5px dashed #b9bec8; margin: 9px 0; }
.fx-paper .r-row { display: flex; gap: 8px; justify-content: space-between; }
.fx-paper .r-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-paper .r-row span:last-child { flex: none; }
.fx-paper .r-total { font-weight: 800; font-size: 14px; }
.fx-paper .r-note { font-size: 11px; color: #5b6475; text-align: center; margin-top: 8px; }
.fx-paper .r-ar { direction: rtl; font-family: system-ui, sans-serif; }

/* CHECKED stamp */
.fx-stamp {
  position: absolute; right: 24px; bottom: 26px; pointer-events: none;
  padding: 6px 10px 5px; border: 3px solid #1f7f98; border-radius: 8px;
  color: #1f7f98; text-align: center; transform: rotate(-12deg);
  font: 800 15px/1.05 var(--font-num), system-ui, sans-serif; letter-spacing: .08em;
  background: rgba(251,250,246,.55);
  opacity: 0;
  animation: fx-stamp .42s cubic-bezier(.2,1.5,.4,1) 1.75s both;
  mix-blend-mode: multiply;
}
.fx-stamp small { display: block; font-size: 8.5px; letter-spacing: .18em; font-weight: 700; }
.fx-stamp::after {                 /* ink texture */
  content: ""; position: absolute; inset: -3px; border-radius: 8px;
  background: radial-gradient(circle at 30% 40%, transparent 0 55%, rgba(251,250,246,.55) 56% 60%, transparent 61%) 0 0 / 9px 9px;
}
@keyframes fx-stamp {
  0%   { opacity: 0; transform: rotate(-24deg) scale(2.3); }
  70%  { opacity: 1; transform: rotate(-11deg) scale(.94); }
  100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}
.fx-receipt-wrap.is-thump .fx-paper-clip { animation: fx-thump .28s ease-out; }
@keyframes fx-thump { 0%, 100% { transform: none; } 35% { transform: translateY(3px) scale(.995); } }
.fx-receipt-actions { width: min(296px, 100%); margin: 16px auto 0; }
.fx-receipt-title { margin: 16px 0 2px; font-weight: 750; font-size: 17px; }
.fx-receipt-sub { margin: 0 0 4px; font-size: 13px; color: var(--ink-soft); }

/* ---------- 2. VIN scramble ------------------------------------------------- */
.fx-scramble { display: inline-block; }
.fx-scramble .sc { color: var(--primary-ink); opacity: .7; }

/* ---------- 3. Logo-trace loader -------------------------------------------- */
.fx-loader { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 0; color: var(--ink-soft); font-size: 13px; }
.fx-loader svg { width: 150px; height: 40px; overflow: visible; }
.fx-loader text {
  font: 800 34px var(--font-num), system-ui, sans-serif; letter-spacing: .06em;
  fill: transparent; stroke: var(--primary); stroke-width: 1.2;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  animation: fx-trace 2.2s cubic-bezier(.6,.05,.3,1) infinite;
}
@keyframes fx-trace {
  0%   { stroke-dashoffset: 260; fill: transparent; }
  55%  { stroke-dashoffset: 0;   fill: transparent; }
  70%  { stroke-dashoffset: 0;   fill: var(--primary); }
  88%  { stroke-dashoffset: 0;   fill: var(--primary); opacity: 1; }
  100% { stroke-dashoffset: 0;   fill: var(--primary); opacity: 0; }
}
.finder-result .fx-loader { padding: 10px 0 4px; align-items: flex-start; }

/* ---------- 4. Holographic VIP card ---------------------------------------- */
.tier-vip .fx-foil {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 0;
  --fx: 50%; --fy: 50%;
  background:
    radial-gradient(420px circle at var(--fx) var(--fy), rgba(255,255,255,.55), transparent 42%),
    linear-gradient(115deg,
      rgba(255, 92, 168, .0) 0%, rgba(255, 92, 168, .22) 18%, rgba(255, 214, 92, .22) 32%,
      rgba(92, 255, 196, .22) 48%, rgba(92, 170, 255, .24) 64%, rgba(178, 102, 255, .22) 80%, rgba(255, 92, 168, 0) 100%);
  background-size: 100% 100%, 260% 260%;
  background-position: 0 0, calc(var(--fx) * 1.4) calc(var(--fy) * 1.1);
  mix-blend-mode: soft-light; opacity: .95;
  transition: opacity .3s ease;
}
:root[data-theme="dark"] .tier-vip .fx-foil { mix-blend-mode: screen; opacity: .5; }
.tier-vip > *:not(.fx-foil) { position: relative; z-index: 1; }
/* No mouse (phones): the foil drifts on its own */
@media (hover: none) {
  .tier-vip .fx-foil { animation: fx-foil-drift 7s ease-in-out infinite alternate; }
}
@keyframes fx-foil-drift {
  from { background-position: 0 0, 0% 30%; }
  to   { background-position: 0 0, 100% 70%; }
}
.tier-vip .fx-vip-tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: #fff;
  background: linear-gradient(110deg, #1f7f98, #6c5ce7, #1f7f98); background-size: 200% 100%;
  animation: fx-tag 4s linear infinite;
}
@keyframes fx-tag { to { background-position: -200% 0; } }

/* ---------- Reduced motion: everything lands in its final state ------------ */
@media (prefers-reduced-motion: reduce) {
  html:not(.fx-force) .fx-paper, html:not(.fx-force) .fx-stamp,
  html:not(.fx-force) .fx-receipt-wrap.is-thump .fx-paper-clip { animation: none !important; opacity: 1; }
  html:not(.fx-force) .fx-loader text { animation: none !important; stroke-dashoffset: 0; fill: var(--primary); }
  html:not(.fx-force) .tier-vip .fx-foil, html:not(.fx-force) .tier-vip .fx-vip-tag { animation: none !important; }
}

/* ---------------- theme switch (top bar) ---------------- */
.icon-btn#themeBtn .sun { display: none; }
:root[data-theme="dark"] .icon-btn#themeBtn .sun { display: block; }
:root[data-theme="dark"] .icon-btn#themeBtn .moon { display: none; }

/* ---------------- hero with the brake disc (home) ---------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); color: #fff; padding: 26px 20px 24px;
  background: radial-gradient(700px 360px at 85% 40%, #1f3a6e 0%, var(--navy) 55%, #0a1128 100%); box-shadow: var(--e2); min-height: 200px;
  display: flex; flex-direction: column; justify-content: center; }
.hero > :not(.hero-disc) { position: relative; z-index: 1; }
.hero h1 { font: 700 clamp(26px, 6vw, 44px)/1.05 var(--font-num); letter-spacing: .2px; margin: 0; max-width: 16ch; }
.hero .hero-ar { font-family: var(--font-ar); direction: rtl; text-align: left; color: rgba(255,255,255,.75); margin-top: 6px; font-size: 15px; }
.hero p { margin: 10px 0 0; color: rgba(255,255,255,.8); font-size: 15px; max-width: 46ch; }
.hero .hero-cta { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .hero-cta .btn { background: var(--amber); color: var(--amber-ink); border-color: transparent; }
.hero .hero-cta .btn.ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.25); }
/* ---------------- hero disc (rebuilt 2026-11-06, CSS-only) ----------------
   Always fully inside the banner: sized from the banner height (88%), vertically centred,
   never pushed past the edge. Motion: lines draw in once, rotor turns slowly forever,
   caliper slides in and stays still, a glint sweeps every 7 s. No JS animation library. */
.hero-disc { position: absolute; z-index: 0; pointer-events: none; top: 6%; bottom: 6%; right: 3%; aspect-ratio: 1; height: 88%; width: auto; opacity: .7; }
.hero-disc svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; transform-origin: 50% 50%; will-change: transform; }
.hero-disc .ln { fill: none; stroke: rgba(126, 211, 232, .6); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hero-disc .ln-strong { stroke: rgba(126, 211, 232, .9); stroke-width: 2.4; }
.hero-disc .ln-faint  { stroke: rgba(126, 211, 232, .45); stroke-width: 1.3; }
.hero-disc .vent      { stroke: rgba(126, 211, 232, .42); stroke-width: 1.3; }
.hero-disc .caliper   { fill: rgba(31, 127, 152, 0); stroke: rgba(160, 225, 240, .85); stroke-width: 2; }
.hero-disc .glint { fill: none; stroke: url(#discGlint); stroke-width: 6; stroke-linecap: round; opacity: 0; }
/* Turning = whole <svg> elements rotating around their own centre (reliable on iPhone). */
.hero-disc .d-cal { opacity: 0; transform: translateX(-6%); }
.hero-disc.go .ln { animation: discDraw 1.5s cubic-bezier(.45,0,.25,1) forwards; }
.hero-disc.go .vent { animation-delay: .25s; }
.hero-disc.go .ln-faint { animation-delay: .4s; }
.hero-disc.go .d-cal { animation: discCal .8s cubic-bezier(.2,.8,.2,1) 1s forwards; }
.hero-disc.go .caliper { animation: discDraw 1s ease 1s forwards, discCalFill .8s ease 1.6s forwards; }
.hero-disc.go .d-rotor { animation: discSpin 80s linear 1.2s infinite; }
.hero-disc.go .d-glint { animation: discGlint 7s ease-in-out 2.4s infinite; }
.hero-disc.go .glint { animation: discGlintOp 7s ease-in-out 2.4s infinite; }
@keyframes discDraw { to { stroke-dashoffset: 0; } }
@keyframes discCal { to { opacity: 1; transform: none; } }
@keyframes discCalFill { to { fill: rgba(31, 127, 152, .22); } }
@keyframes discSpin { to { transform: rotate(360deg); } }
@keyframes discGlint { 0% { transform: rotate(-50deg); } 26% { transform: rotate(30deg); } 100% { transform: rotate(30deg); } }
@keyframes discGlintOp { 0% { opacity: 0; } 13% { opacity: 1; } 26% { opacity: 0; } 100% { opacity: 0; } }
/* Phones: smaller and fainter so the headline stays readable, still fully visible. */
@media (max-width: 600px) { .hero { min-height: 240px; } .hero-disc { right: 3%; height: 80%; top: 10%; opacity: .32; } }
@media (min-width: 601px) and (max-width: 959px) { .hero { min-height: 260px; } .hero-disc { right: 2%; opacity: .5; } }
@media (min-width: 960px) { .hero { min-height: 300px; padding: 44px 48px; } .hero-disc { right: 5%; opacity: .75; } }
/* Arabic layout: disc on the left, mirrored. */
:root[dir="rtl"] .hero-disc { right: auto; left: 3%; transform: scaleX(-1); }
@media (max-width: 600px) { :root[dir="rtl"] .hero-disc { left: 3%; } }
@media (min-width: 601px) and (max-width: 959px) { :root[dir="rtl"] .hero-disc { left: 2%; } }
@media (min-width: 960px) { :root[dir="rtl"] .hero-disc { left: 5%; } }
/* Reduce Motion: drawn and still. */
@media (prefers-reduced-motion: reduce) {
  html:not(.fx-force) .hero-disc .ln { stroke-dashoffset: 0; animation: none !important; }
  html:not(.fx-force) .hero-disc .d-cal { opacity: 1; transform: none; animation: none !important; }
  html:not(.fx-force) .hero-disc .d-rotor, html:not(.fx-force) .hero-disc .d-glint, html:not(.fx-force) .hero-disc .glint { animation: none !important; }
}

/* ---------------- scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- quality band + stats ---------------- */
.quality-band { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: var(--r-lg); overflow: hidden; background: #0c1424; box-shadow: var(--e2); }
.quality-photo { background: #0c1424 center/cover no-repeat; min-height: 240px; position: relative; overflow: hidden; }
.quality-photo .qp-inner { position: absolute; left: 0; right: 0; top: -14%; bottom: -14%; background: center/cover no-repeat; will-change: transform; }
.quality-copy { padding: 28px 26px; color: #e8edf5; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.quality-copy h2 { margin: 0; font: 700 clamp(20px, 2.4vw, 26px)/1.2 var(--font-num); }
.quality-copy p { margin: 0; font-size: 14.5px; line-height: 1.6; opacity: .85; }
.quality-copy .ar { opacity: .75; font-size: 13.5px; }
@media (max-width: 700px) { .quality-band { grid-template-columns: 1fr; } .quality-photo { min-height: 170px; } }
.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.stats-band .stat { background: var(--panel); border-radius: var(--r); box-shadow: var(--e1); padding: 16px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat-num { font: 700 clamp(24px, 5vw, 34px)/1 var(--font-num); color: var(--navy); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .stat-num { color: #fff; }
.stat-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.stat-label .ar { display: block; font-size: 11.5px; font-weight: 400; }

/* ---------------- footer ---------------- */
.site-foot { margin-top: var(--s6); padding: 24px 0 8px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-foot h4 { margin: 0 0 6px; color: var(--ink); font: 700 15px var(--font-num); letter-spacing: .3px; }
.site-foot a { color: var(--teal-ink); text-decoration: none; }
:root[data-theme="dark"] .site-foot a { color: var(--ok); }
.site-foot .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; padding-top: 10px; border-top: 1px dashed var(--line); }
.site-foot .legal .spacer { flex: 1; }

/* ---------------- floating WhatsApp (computers; phones have it in the top bar) ---------------- */
.wa-float { display: none; }
@media (min-width: 960px) {
  .wa-float { display: grid; place-items: center; position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
    background: #25d366; color: #fff; box-shadow: 0 12px 30px -10px rgba(37,211,102,.6), var(--e2); transition: transform .18s ease; }
  .wa-float:hover { transform: translateY(-3px) scale(1.05); }
  .wa-float svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  body.has-action .wa-float { bottom: 96px; }
}

/* ---------------- favourites heart ---------------- */
.fav-btn { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); box-shadow: var(--e1); display: grid; place-items: center; color: #4f5b6c; }
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav-btn.on { color: #c2410c; }
.fav-btn.on svg { fill: currentColor; }
.fav-btn.pop { animation: fav-pop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes fav-pop { 40% { transform: scale(1.3); } }
.gallery-wrap { position: relative; }
.gallery-wrap .fav-btn { top: 12px; right: 12px; width: 44px; height: 44px; }

/* VIP card in the account screen gets the foil */
.tier-vip { position: relative; overflow: hidden; }

/* receipt inside the app's bottom sheet / screen */
.fx-receipt-wrap .btn { width: 100%; }
.fx-receipt-actions { display: flex; flex-direction: column; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  html:not(.fx-force) .reveal { opacity: 1; transform: none; transition: none; }
  html:not(.fx-force) .hero-disc .glint { display: none; }
  html:not(.fx-force) .fav-btn.pop { animation: none; }
}

/* product card wrapper (heart sits beside the link, not inside it) */
.pcard { position: relative; display: flex; min-width: 0; }
.pcard > .product { flex: 1; min-width: 0; }
.receipt-screen { max-width: 420px; margin: 0 auto; padding-top: 8px; }
/* plate text stays dark ink on the white plate in both themes */
.carbar .plate-car { color: #111c41; }
.carbar .plate-sub { color: #4f5b6c; }
/* class-less links that are really buttons/rows keep their own colours in dark mode */
:root[data-theme="dark"] .tabbar a:not(.active) { color: var(--ink-faint); }
:root[data-theme="dark"] .quick a, :root[data-theme="dark"] .list a { color: var(--ink); }
@media (min-width: 960px) { :root[data-theme="dark"] .tabbar a:not(.active) { color: rgba(255,255,255,.72); } }
#savedTop { position: relative; }
#savedTop .badge { top: 2px; left: auto; right: 0; }
:root[data-theme="dark"] .gallery { background: #10141f; }
.site-foot { max-width: 1200px; margin-left: auto; margin-right: auto; padding: 24px var(--s4) var(--s5); }
.site-foot:empty { display: none; }
@media (min-width: 960px) { .site-foot { padding: 28px 24px 40px; } }

/* tablets (iPad portrait/landscape): use the width */
@media (min-width: 700px) and (max-width: 959px) {
  main { max-width: 900px; padding-left: 24px; padding-right: 24px; }
  .products { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .offers { grid-auto-columns: 46%; margin-inline: -24px; padding-inline: 24px; }
  .rail-track { grid-auto-columns: 30%; margin-inline: -24px; padding-inline: 24px; }
  .sheet { max-width: 560px; bottom: 16px; border-radius: var(--r-lg); }
  .site-foot { max-width: 900px; }
}
/* small laptops (960–1199px): keep the whole top bar on one line */
@media (min-width: 960px) and (max-width: 1199px) {
  .topbar { column-gap: 10px; grid-template-columns: auto minmax(200px, 1fr) minmax(200px, 280px) auto; }
  .tabbar a { min-width: 50px; padding: 6px 6px; }
  .tabbar a .ar, .brand-name small { display: none; }
}
/* group card pictures: fixed box so every picture sits centred inside its card (2026-11-01) */
.group { overflow: hidden; }
.group .g-img { flex: 0 0 auto; width: 40%; max-width: 160px; height: 96px; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; }
.group .g-img img { width: 100%; height: 100%; max-height: 96px; object-fit: contain; display: block; }
@media (min-width: 960px) { .group .g-img { height: 104px; } .group .g-img img { max-height: 104px; } }
/* group cards v2 (2026-11-01): background-free pictures, smaller, card follows light/dark */
.group { background: var(--panel); color: var(--ink); min-height: 92px; padding: 10px 16px 10px 12px; }
:root[data-theme="dark"] .group { color: var(--ink); }
.group .g-ar { color: var(--ink-soft); }
.group .g-count { background: var(--unk-soft); color: var(--ink-soft); }
.group .g-count.fit { background: var(--ok-soft); color: var(--ok); }
.group .g-img { width: 30%; max-width: 116px; height: 72px; }
.group .g-img img { max-height: 72px; mix-blend-mode: normal; filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); }
.group .g-name { font-size: 17px; }
@media (min-width: 960px) { .group { min-height: 100px; } .group .g-img { height: 80px; } .group .g-img img { max-height: 80px; } }
.group-head img { background: transparent; box-shadow: none; }
.site-foot .ar-line { font-family: var(--font-ar); direction: rtl; text-align: right; font-size: 13.5px; line-height: 1.7; margin-top: 2px; color: var(--ink-soft); }
.site-foot .gap { margin-top: 8px; }
.site-foot > div > div + div { margin-top: 2px; }
/* VIN result: the car card (2026-11-01) */
.vin-car { display: flex; flex-direction: column; gap: 14px; }
.vin-car-head { display: flex; align-items: center; gap: 14px; }
.vin-car-name { font: 700 24px/1.15 var(--font-num); letter-spacing: .3px; }
.vin-count { font-size: 15px; line-height: 1.5; }
.vin-count b { font-size: 18px; }
.vin-year .chips { margin-top: 4px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.group .g-count { white-space: nowrap; }
/* footer v3: English half + mirrored Arabic half (2026-11-01) */
.site-foot { display: block; }
.site-foot .f-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.site-foot .f-half { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 4px 0 18px; }
.site-foot .f-half + .f-half { border-left: 1px solid var(--line); padding-left: 28px; margin-left: 28px; }
.site-foot section { min-width: 0; }
.site-foot h4 { margin: 0 0 8px; font: 700 15px/1.2 var(--font-num); color: var(--ink); letter-spacing: .2px; }
.site-foot .f-ar h4 { font-family: var(--font-ar); font-size: 15px; font-weight: 600; }
.site-foot p { margin: 0 0 6px; line-height: 1.55; }
.site-foot .f-ar { font-family: var(--font-ar); font-size: 13.5px; line-height: 1.8; text-align: right; }
.site-foot .f-ar p { line-height: 1.8; }
.site-foot .f-row { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.site-foot .f-lbl { color: var(--ink-faint); min-width: 64px; }
.site-foot .f-val { min-width: 0; overflow-wrap: anywhere; }
.site-foot .f-social { display: flex; gap: 14px; }
.site-foot .ar-line, .site-foot .gap { display: none; }
.site-foot .legal { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.site-foot .legal nav { display: flex; gap: 14px; margin: 0 auto; }
.site-foot .legal [lang="ar"] { font-family: var(--font-ar); }
/* laptops: each half stacks its 3 sections */
@media (max-width: 1199px) { .site-foot .f-half { grid-template-columns: 1fr; gap: 14px; } }
/* phones/tablets: English block, then the Arabic block under it */
@media (max-width: 760px) {
  .site-foot .f-halves { grid-template-columns: 1fr; }
  .site-foot .f-half + .f-half { border-left: 0; padding-left: 0; margin-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .site-foot .legal { justify-content: center; text-align: center; }
  .site-foot .legal nav { margin: 0; }
}
/* one clean column per half at every width (wide screens wrapped the email mid-word) */
.site-foot .f-half { grid-template-columns: 1fr; gap: 14px; }
.site-foot .f-val a[href^="mailto"] { overflow-wrap: normal; word-break: normal; }

/* ===== 2026-11-01 evening: faster shopping + slimmer header ===== */
/* Category pictures at AUTODOC size: about half the card, filling its height */
.group { min-height: 128px; padding: 8px 18px 8px 8px; gap: 10px; }
.group .g-img { width: 46%; max-width: 200px; height: 112px; flex: 0 0 auto; }
.group .g-img img { max-height: 112px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.14)); }
.group .g-name { font-size: 18px; line-height: 1.2; }
@media (min-width: 960px) { .group { min-height: 136px; } .group .g-img { height: 118px; max-width: 190px; } .group .g-img img { max-height: 118px; } }

/* Slimmer header on phones/tablets; the logo row tucks away once you scroll */
@media (max-width: 959px) {
  .topbar { padding-bottom: 8px; }
  .topbar-row { height: 44px; transition: height .22s ease, opacity .18s ease, margin .22s ease; overflow: hidden; }
  .brand-mark { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
  .brand-name { font-size: 18px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 22px; height: 22px; }
  .topsearch { height: 40px; border-radius: 10px; }
  .topsearch input { font-size: 14.5px; }
  .carbar { margin-top: 8px; border-radius: 8px; }
  .carbar .band { width: 26px; }
  .carbar .plate-txt { padding: 5px 10px; }
  .carbar .plate-car { font-size: 15px; }
  .carbar .plate-sub { display: none; }
  .carbar .plate-go { font-size: 12.5px; padding: 0 10px; }
  body.scrolled .topbar-row { height: 0; opacity: 0; margin: 0; }
  body.scrolled .topbar { padding-top: max(6px, env(safe-area-inset-top)); }
}

/* Back button: always reachable, with a label on computers */
#backBtn[hidden] { display: none !important; }
@media (min-width: 960px) {
  #backBtn { width: auto; padding: 0 12px 0 6px; gap: 4px; display: inline-flex; align-items: center; border-radius: 10px; background: rgba(255,255,255,.08); margin-left: 0; }
  #backBtn::after { content: 'Back · رجوع'; font: 600 13px var(--font); color: #fff; }
}

/* Quick add on product cards */
.qadd { position: absolute; z-index: 2; right: 8px; top: calc(100% - 50px); min-height: 36px; padding: 0 12px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--amber); color: var(--amber-ink); font: 700 13px var(--font); box-shadow: var(--e2); }
.qadd.in { background: var(--teal); color: #fff; }
.qadd.pop { animation: fav-pop .35s cubic-bezier(.2,1.6,.4,1); }
.pcard .product .body { padding-bottom: 52px; }
.toast { display: flex; align-items: center; gap: 12px; }
/* 2026-11-06: one slim horizontal pill (it used to wrap into a square because left:50% halves the
   width it may use), slides up quickly and leaves sooner. */
.toast { width: max-content; max-width: calc(100% - 24px); white-space: nowrap; padding: 9px 16px; border-radius: 999px; font-size: 14px; line-height: 1.2; animation: toastIn .18s cubic-bezier(.2,.8,.2,1); }
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.toast-act { color: var(--amber); font-weight: 700; text-decoration: none; white-space: nowrap; }

/* Search suggestions */
.topsearch { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; background: var(--panel); color: var(--ink); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); max-height: min(70vh, 520px); overflow: auto; padding: 6px; }
.suggest .s-h { font: 700 11.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 4px; }
.suggest a, .suggest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; text-align: left; color: inherit; text-decoration: none; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14.5px; min-height: 44px; }
.suggest a:hover, .suggest a.on, .suggest button:hover { background: var(--panel-2); }
.suggest img { width: 40px; height: 40px; object-fit: contain; flex: none; background: #fff; border-radius: 6px; }
.suggest .s-txt { flex: 1; min-width: 0; }
.suggest .s-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .s-sub { display: block; font-size: 12px; color: var(--ink-soft); }
.suggest .s-price { font-weight: 700; white-space: nowrap; }
.suggest .s-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--teal-soft); color: var(--teal-ink); flex: none; font-weight: 700; }
/* Back arrow on the search row (AUTODOC style) */
.searchrow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.searchrow .topsearch { flex: 1; min-width: 0; }
.searchrow #backBtn { flex: none; margin: 0 0 0 -6px; width: 40px; height: 40px; color: #fff; }
.searchrow #backBtn svg { width: 26px; height: 26px; stroke-width: 2.4; }
.topbar.compact .searchrow:not(:has(#backBtn:not([hidden]))) { display: none; }
@media (min-width: 960px) {
  .searchrow { grid-column: 2; }
  .searchrow #backBtn { width: auto; height: 40px; }
}
@media (min-width: 960px) { .tabbar .badge { top: -2px; left: calc(50% + 2px); } }

/* 2 Nov: the category chip wraps inside the text column (English / Arabic) instead of spilling over the picture */
.group .g-txt { flex: 1 1 0; min-width: 0; position: relative; z-index: 1; }
.group .g-count { white-space: normal; display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 1px 6px; max-width: 100%; line-height: 1.3; text-align: right; }
.group .g-count > span { white-space: nowrap; }
.group .g-count > span + span::before { content: none; }
.group .g-name, .group .g-ar { max-width: 100%; overflow-wrap: anywhere; }
/* 2026-11-14: the garage list's .g-name (one line + "...") was leaking onto category tiles and cutting names ("Drive Shaft and CV..."). */
.group .g-name { white-space: normal; overflow: visible; text-overflow: clip; }
/* 2026-11-14: footer phone / WhatsApp / email / legal links were 17px tall -- too small to tap on a phone. */
.site-foot .f-row { align-items: center; margin-bottom: 0; }
.site-foot .f-row a, .site-foot .f-social a, .site-foot .legal a { display: inline-block; padding: 9px 0; min-height: 36px; }

/* 2026-11-07: loading sign = the Zakka logo (wordmark) with a light sweeping across it. The logo is a
   mask, so it takes the theme colour: light blue on dark, navy on light. */
.fx-loader .fx-logo { display: block; width: 170px; aspect-ratio: 900 / 288; max-width: 60vw;
  -webkit-mask: url('../img/logo-wordmark-white.png') center / contain no-repeat; mask: url('../img/logo-wordmark-white.png') center / contain no-repeat;
  background: linear-gradient(105deg, var(--logo-ink, #7ed3e8) 0%, var(--logo-ink, #7ed3e8) 38%, #ffffff 50%, var(--logo-ink, #7ed3e8) 62%, var(--logo-ink, #7ed3e8) 100%);
  background-size: 260% 100%; animation: fxLogoShine 1.5s ease-in-out infinite, fxLogoPulse 1.5s ease-in-out infinite; }
:root[data-theme="light"] .fx-loader .fx-logo { --logo-ink: #1b2d63; }
@keyframes fxLogoShine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes fxLogoPulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html:not(.fx-force) .fx-loader .fx-logo { animation: none; background: var(--logo-ink, #7ed3e8); } }
