/* ============================================================
   Savvo UX round 2 — Dec 2026 (ux2)
   Visual/UX improvements layered ON TOP of main.css.
   Loaded after main.css; never edits the main.js bundle.
   Uses the app's own CSS variables so dark mode keeps working.
   ============================================================ */

/* --- 1) Bigger, clearer price on cards + mobile --- */
.u-card .u-price,
.u-detail-price {
  font-size: 1.35em !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  color: var(--text);
}
@media (max-width: 640px) {
  .u-card .u-price { font-size: 1.25rem !important; }
  .u-detail-price { font-size: 1.5rem !important; }
}

/* --- 2) Cleaner cards: breathing room, soft shadow, uniform media --- */
.u-card {
  border-radius: 16px !important;
  box-shadow: 0 1px 4px rgba(12, 22, 52, 0.08), 0 4px 16px rgba(12, 22, 52, 0.05) !important;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.u-card:hover { box-shadow: 0 4px 10px rgba(12, 22, 52, 0.12), 0 10px 28px rgba(12, 22, 52, 0.09) !important; }
.u-card .u-media {
  background: var(--surface-2) !important;
  aspect-ratio: 4 / 3;
}
.u-card .u-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--surface-2);
}
/* more air between cards (grid gap is set inline by the app; reinforce) */
.u-card + .u-card { margin-top: 2px; }

/* --- 3) One accent colour everywhere: brand navy + green WhatsApp --- */
:root, .u-root {
  --ux2-accent: #16a34a;
}
.u-btn-wa, a.u-btn-wa {
  background: var(--wa) !important;
  color: var(--wa-ink) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(23, 163, 74, 0.35) !important;
}

/* --- 4) «صفقة» red deal badge (added by ux2.js) --- */
.ux2-deal-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 3;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
}
.u-card .u-media { position: relative; }
.ux2-verdict {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ok);
  margin-top: 2px;
}
.ux2-verdict.ux2-over {
  color: var(--warn);
  font-weight: 600;
}
.ux2-avg-line {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* --- 5) Sticky header + sticky search --- */
.u-top {
  position: sticky !important;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

/* --- 6) Thumb-friendly buttons on mobile --- */
@media (max-width: 640px) {
  .u-btn, .u-chip, .u-pt, button.u-tool {
    min-height: 44px;
  }
  .u-card { border-radius: 14px !important; }
  /* floating sell button + bottom nav reserve space */
  body.ux2-mobile-nav { padding-bottom: 64px; }
}

/* --- 7) Bottom mobile nav (added by ux2.js, mobile only) --- */
.ux2-bottomnav {
  display: none;
}
@media (max-width: 640px) {
  .ux2-bottomnav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 60;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(12, 22, 52, 0.08);
  }
  .ux2-bottomnav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 2px 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
  }
  .ux2-bottomnav a.ux2-on { color: var(--brand); }
  .ux2-bottomnav a span.ux2-ic { font-size: 19px; line-height: 1; }
}

/* --- 8) Floating «انشر إعلان» button (mobile only) --- */
.ux2-fab-sell {
  display: none;
}
@media (max-width: 640px) {
  .ux2-fab-sell {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    bottom: 76px;
    inset-inline-end: 14px;
    z-index: 61;
    background: var(--wa);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(23, 163, 74, 0.45);
  }
}

/* --- 9) Toasts (in-app notifications) --- */
.ux2-toast-wrap {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}
.ux2-toast {
  background: #0c1634;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: ux2-toast-in 0.22s ease;
  text-align: center;
}
@keyframes ux2-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 10) Skeleton loading --- */
.ux2-skeleton {
  padding: 16px;
  max-width: 1080px;
  margin: 0 auto;
}
.ux2-sk {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: ux2-shimmer 1.2s infinite linear;
}
@keyframes ux2-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.ux2-spin {
  width: 26px; height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: ux2-rot 0.8s linear infinite;
  margin: 18px auto;
}
@keyframes ux2-rot { to { transform: rotate(360deg); } }

/* --- 11) Lightbox (fullscreen image viewer) --- */
.ux2-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5, 10, 25, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.ux2-lightbox img {
  max-width: 96vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.15s ease;
}
.ux2-lightbox .ux2-lb-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.ux2-lightbox .ux2-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.ux2-lightbox .ux2-lb-prev { inset-inline-start: 10px; }
.ux2-lightbox .ux2-lb-next { inset-inline-end: 10px; }
.ux2-lightbox .ux2-lb-count {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 12px;
  border-radius: 999px;
}

/* --- 12) Search suggestions dropdown --- */
.ux2-suggest {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(12, 22, 52, 0.16);
  overflow: hidden;
}
.ux2-suggest button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
  color: var(--text);
}
.ux2-suggest button:last-child { border-bottom: none; }
.ux2-suggest button:hover { background: var(--surface-2); }
.ux2-suggest button small { color: var(--muted); font-weight: 700; white-space: nowrap; }
.ux2-mic {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand);
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ux2-mic.ux2-listening {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  animation: ux2-pulse 1s infinite;
}
@keyframes ux2-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
.u-topsearch { position: relative; }

/* --- 13) «الأكثر بحثًا» strip on home --- */
.ux2-topsearch-strip {
  max-width: 1080px;
  margin: 10px auto 0;
  padding: 0 16px;
}
.ux2-topsearch-strip h3 {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--muted);
}
.ux2-topsearch-strip .ux2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ux2-topsearch-strip a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.ux2-topsearch-strip a small { color: var(--muted); font-weight: 600; }

/* --- 14) «صفقة اليوم» featured banner --- */
.ux2-dealday {
  max-width: 1080px;
  margin: 14px auto 0;
  padding: 0 16px;
}
.ux2-dealday-inner {
  display: block;
  border: 2px solid #dc2626;
  background: linear-gradient(135deg, #fff5f5, var(--surface));
  border-radius: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
}
.u-dark .ux2-dealday-inner { background: linear-gradient(135deg, #3a1114, var(--surface)); }
.ux2-dealday-inner b.ux2-dd-tag {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.ux2-dealday-inner .ux2-dd-title { font-weight: 800; font-size: 17px; display: block; }
.ux2-dealday-inner .ux2-dd-price { font-weight: 800; font-size: 19px; color: #dc2626; }

/* --- 15) Saved searches panel --- */
.ux2-saved {
  max-width: 1080px;
  margin: 10px auto 0;
  padding: 0 16px;
}
.ux2-saved h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); }
.ux2-saved .ux2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ux2-saved a {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.ux2-save-btn {
  margin-inline-start: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

/* --- 16) Fair-price hint on the sell form --- */
.ux2-fairhint {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ok-soft);
  border: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
}
.ux2-fairhint b { color: var(--ok); }
.ux2-fairhint.ux2-fairhint-over b { color: var(--warn); }

/* --- 17) Similar-search chips on empty results --- */
.ux2-similar { margin-top: 12px; }
.ux2-similar p { font-weight: 700; margin: 0 0 8px; }
.ux2-similar .ux2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ux2-similar a {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* --- 18) Filter chips row (visual) + clear-all button --- */
.ux2-clear-filters {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--bad);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

/* --- 19) Relative-date stamp --- */
.ux2-rel-date { font-weight: 700; color: var(--ok); }

/* --- 20) Detail-page WhatsApp prominence --- */
.u-detail-cta .u-btn-wa {
  font-size: 16px !important;
  padding-top: 13px !important;
  padding-bottom: 13px !important;
}

/* ============================================================
   UX round 3 — visual design (Dec 2026)
   Purely visual layer on top of main.css + UX round 2.
   - Uses the app's own CSS variables so dark mode keeps working.
   - Section colours are applied through body[data-ux3sec] (set by ux2.js).
   - No layout-breaking changes: no node is hidden except the
     duplicated ux2 bottom nav (the app already renders .u-mnav).
   Item ranges refer to savvo-1000-ui-improvements.md.
   ============================================================ */

/* --- 3.0 design tokens (items 994-998) --- */
:root, .u-root {
  --ux3-cars: #2563eb;
  --ux3-cars-soft: #dbeafe;
  --ux3-re: #0d9488;
  --ux3-re-soft: #ccfbf1;
  --ux3-elec: #7c3aed;
  --ux3-elec-soft: #ede9fe;
  --ux3-equip: #d97706;
  --ux3-equip-soft: #fef3c7;
  --ux3-gold: #b45309;
  --ux3-gold-soft: #fef3c7;
  --ux3-price: #0f7a4d;
  --ux3-r-s: 10px;
  --ux3-r-m: 14px;
  --ux3-r-l: 20px;
  --ux3-sh-1: 0 1px 3px rgba(12, 22, 52, 0.07);
  --ux3-sh-2: 0 6px 18px rgba(12, 22, 52, 0.10);
  --ux3-sh-3: 0 16px 40px rgba(12, 22, 52, 0.16);
  --ux3-dur: 0.18s;
  --ux3-dur-slow: 0.32s;
}
.u-root.u-dark {
  --ux3-cars: #60a5fa;
  --ux3-cars-soft: #17295e;
  --ux3-re: #2dd4bf;
  --ux3-re-soft: #0b2e2a;
  --ux3-elec: #a78bfa;
  --ux3-elec-soft: #241a4d;
  --ux3-equip: #fbbf24;
  --ux3-equip-soft: #3a2b0e;
  --ux3-gold: #fbbf24;
  --ux3-gold-soft: #3a2b0e;
  --ux3-price: #4ad3a0;
}

/* --- 3.1 brand colours & gradients (items 1-50) --- */
/* 1: one navy brand colour for the logo, section titles and nav links */
.u-brand-tx b { color: var(--brand); }
.u-pagehead h1, .u-panel h2, .u-panel h3 { color: var(--brand); }
/* 2: primary CTA as a green gradient instead of flat colour */
.u-cta, .u-btn-wa {
  background: linear-gradient(135deg, #15803d, var(--wa) 60%, #22c55e) !important;
}
/* 3-6: one accent colour per section (cards + page head) */
body[data-ux3sec="cars"] .u-pagehead { background: var(--ux3-cars-soft); }
body[data-ux3sec="aqar"] .u-pagehead { background: var(--ux3-re-soft); }
body[data-ux3sec="elec"] .u-pagehead { background: var(--ux3-elec-soft); }
body[data-ux3sec="equip"] .u-pagehead { background: var(--ux3-equip-soft); }
body[data-ux3sec="cars"] .u-pagehead-ic { color: var(--ux3-cars); }
body[data-ux3sec="aqar"] .u-pagehead-ic { color: var(--ux3-re); }
body[data-ux3sec="elec"] .u-pagehead-ic { color: var(--ux3-elec); }
body[data-ux3sec="equip"] .u-pagehead-ic { color: var(--ux3-equip); }
/* 7: price in dark green so the eye lands on it first */
.u-card .u-price, .u-detail-price { color: var(--ux3-price) !important; }
/* 10: in-text links in brand colour, underline on hover only */
.u-desc a, .u-panel a.u-link, .u-foot a { color: var(--brand); }
.u-desc a:hover, .u-panel a.u-link:hover { text-decoration: underline; }
/* 11: spec icons in one green instead of scattered colours */
.u-specs svg, .u-facts svg { color: var(--ok); }
body[data-ux3sec="cars"] .u-specs svg { color: var(--ux3-cars); }
body[data-ux3sec="aqar"] .u-specs svg { color: var(--ux3-re); }
body[data-ux3sec="elec"] .u-specs svg { color: var(--ux3-elec); }
body[data-ux3sec="equip"] .u-specs svg { color: var(--ux3-equip); }
/* 12: input borders turn brand colour on focus */
.u-field select:focus, .u-field input:focus, .u-formpage input:focus,
.u-formpage select:focus, .u-formpage textarea:focus, .u-lead input:focus,
.u-lead textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-soft);
  outline: none;
}
/* 15: spinner in brand green */
.ux2-spin { border-top-color: var(--wa); }
/* 16: favourite button white with grey border, red when saved */
.u-fav { background: rgba(255, 255, 255, 0.94) !important; border: 1px solid var(--line-2) !important; }
.u-fav[aria-pressed="true"] { border-color: #dc2626 !important; color: #dc2626 !important; }
.u-fav[aria-pressed="true"] svg { fill: #dc2626; }
/* 17: seller phone in dark navy bold */
a[href^="tel:"] { color: var(--brand); font-weight: 800; }
/* 21-22/701: featured (gold) card frame — applies where the bundle marks featured */
.u-card.ux3-featured { border: 1px solid var(--ux3-gold) !important; }
.u-card.ux3-featured .u-title { color: var(--brand); }
/* 23: fair-price hint stays a very pale green (deepened slightly) */
.ux2-fairhint { background: #eafaf1; }
/* 24: «show more» white with brand border and text */
.u-more {
  background: var(--surface) !important;
  border: 1px solid var(--brand) !important;
  color: var(--brand) !important;
  font-weight: 800;
}
/* 25/953: slim scrollbar with brand-coloured thumb */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: #c3cadb; border-radius: 999px; border: 2px solid var(--surface-2); }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }
* { scrollbar-width: thin; scrollbar-color: #c3cadb var(--surface-2); }
/* 26/951: selected text pale green on light navy */
::selection { background: #d7f3e3; color: #0c1634; }
/* 32/954: dividers one shade lighter than card borders */
.u-fine-line, hr { border-color: var(--line); opacity: 0.7; }
/* 33/979: stats numbers navy bold, description small grey under them */
.u-hstart b, .u-pagehead-stats b, .u-hc b, .u-hc strong { color: var(--brand); font-weight: 800; }
/* 34: one highlighted stat card with a light navy gradient */
.u-hgrid .u-hc:first-child { background: linear-gradient(165deg, #ffffff, var(--brand-soft)) !important; }
/* 35: clear-filters as a pale-pink reset action */
.ux2-clear-filters { background: var(--bad-soft) !important; color: var(--bad) !important; border-color: transparent !important; }
/* 36/166/366: active filter chip green with white text */
.u-chip.on { background: var(--wa) !important; border-color: var(--wa) !important; color: #fff !important; }
/* 37: detail main image framed with a light brand border */
.u-detail-media img { border: 1px solid var(--brand-soft); }
/* 39/813: form error in dark red on pale pink with a warning mark */
.u-lead-err { color: var(--bad); background: var(--bad-soft); border-radius: var(--ux3-r-s); }
.u-lead-err::before { content: "⚠ "; }
/* 40/538: success message dark green on pale green */
.u-lead-ok { color: var(--ok); background: var(--ok-soft); border-radius: var(--ux3-r-s); }
.u-lead-ok::before { content: "✓ "; }
/* 41/988: footer links medium grey, navy on hover */
.u-foot a { color: var(--muted); }
.u-foot a:hover { color: var(--brand); }
/* 43/292: category bar white with a soft shadow so it pins visually */
.u-subnav { background: var(--surface); box-shadow: var(--ux3-sh-1); }
/* 45-46: header search button — the top search has no button element;
   the focus ring + green search affordance live on the field instead */
.u-topsearch:focus-within { box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 1px var(--wa); }
/* 47: prices section white with a thin green top strip */
.u-panel:has(h2) { border-top: 3px solid var(--wa); border-top-left-radius: var(--ux3-r-l); border-top-right-radius: var(--ux3-r-l); }
/* 49: article date small grey above the title */
.news-date { color: var(--muted); font-size: 12px; }

/* --- 3.2 typography (items 51-100) --- */
/* 51: home hero title two sizes bigger than inner pages */
.u-hero .u-homelogo { font-size: 44px; font-weight: 800; line-height: 1.1; }
.u-hero-tag { font-size: 19px; font-weight: 700; }
/* 52: section titles one size, bold, fixed bottom gap */
.u-panel h2, .u-panel h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.u-pagehead h1 { font-size: 24px; font-weight: 800; line-height: 1.25; }
/* 53-56: card title bold medium; description smaller grey; specs small;
   price bolder and one size bigger than the title */
.u-card .u-title { font-size: 15.5px; font-weight: 800; line-height: 1.45; }
.u-card .u-body p, .u-card .u-desc { font-size: 13.5px; color: var(--muted); }
.u-card .u-specs { font-size: 12.5px; font-weight: 400; }
.u-card .u-price { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* 57: price-per-metre small grey under the total price */
.u-sr-pr small, .u-priceRow small { font-size: 12px; color: var(--muted); font-weight: 600; }
/* 58: detail title two sizes bigger than the card title */
.u-detail-top { font-size: 21px; font-weight: 800; line-height: 1.3; }
/* 59: detail description with a wider line height for long reads */
.u-desc { line-height: 1.9; font-size: 15px; }
/* 60: spec labels small grey, values black bold */
.u-facts > * > span:first-child, .u-facts dt { color: var(--muted); font-size: 12.5px; }
.u-facts > * > b, .u-facts dd { color: var(--text); font-weight: 800; }
/* 61-62: WhatsApp text one size bigger than other buttons; call lighter */
.u-detail-cta .u-btn-wa { font-size: 16px; }
.u-detail-cta .u-btn-ghost { font-weight: 600; }
/* 63-65: form labels medium bold above the field; hints two sizes smaller grey;
   errors same size as hints but red bold */
.u-field > span, .u-formpage label > span { font-size: 14px; font-weight: 800; }
.u-formpage small, .u-lead small { font-size: 12px; color: var(--muted); }
/* 66: numbered step titles big and bold (applies where steps render) */
.u-formpage h2, .u-lead h2 { font-size: 20px; font-weight: 800; }
/* 67: final publish button two sizes bigger */
.u-formpage button[type="submit"], .u-lead button[type="submit"] { font-size: 16px; font-weight: 800; }
/* 68-69: search text matches the search button size; suggestions smaller grey */
.u-topsearch input, .u-filterbar input[type="search"] { font-size: 14.5px; }
.ux2-suggest button small { font-size: 12px; color: var(--muted); }
/* 70-71: filter group titles small bold; options normal light */
.u-filterbar .u-field > span { font-size: 12px; font-weight: 800; letter-spacing: 0.01em; }
.u-chip { font-weight: 600; }
/* 72/384/927: results count small grey next to the section title */
.u-resultsbar { font-size: 13px; color: var(--muted); }
/* 73: sort button small bold with a direction arrow (arrow via ::after) */
.u-resultsbar-tools button { font-size: 13px; font-weight: 800; }
/* 75: header nav links medium bold */
.u-pt { font-size: 14px; font-weight: 800; }
/* 76-78: footer links small grey; column titles small bold; copyright smallest */
.u-foot { font-size: 13.5px; }
.u-foot-links a { font-size: 13px; color: var(--muted); }
/* 79: in-site alert text medium with a short bold title above */
.ux2-toast { font-size: 14px; font-weight: 600; }
/* 82: fair-price hint small with a comfortable line height */
.ux2-fairhint { font-size: 13.5px; line-height: 1.8; }
/* 83-85: deal badge tiniest extra-bold; featured gold-dark; verified with a check */
.ux2-deal-badge { font-size: 12px; font-weight: 800; }
.ux2-verdict { font-size: 12.5px; font-weight: 700; }
/* 86-87: section names medium bold under each icon; counts two sizes smaller grey */
.u-hc { font-size: 15px; font-weight: 800; }
.u-hc em, .u-hc small { font-size: 12.5px; color: var(--muted); font-weight: 600; font-style: normal; }
/* 88: «see all» small bold in brand colour */
.u-more, a.u-link { font-size: 13.5px; font-weight: 800; color: var(--brand); }
/* 89-90: compare table headers small bold; cheapest price bold green */
.u-table th, .u-mtbl th { font-size: 12.5px; font-weight: 800; }
.u-table td b, .u-mtbl td b { font-weight: 800; }
/* 92: empty-results message fairly big and bold with smaller text under it */
.u-empty { font-size: 16px; font-weight: 800; }
.u-empty p, .u-empty small { font-size: 13.5px; font-weight: 400; }
/* 93: help FAQ questions bold medium, answers smaller under them */
.u-panel h3 + p, .u-panel p { font-size: 14px; }
/* 94: «read more» small bold in brand colour with an arrow */
.u-desc + button, .ux3-readmore { font-size: 13px; font-weight: 800; color: var(--brand); }
/* 98: relative dates same size as details but bold */
.ux2-rel-date { font-weight: 800; }
/* 100: print/share small grey so they never compete with WhatsApp */
.u-detail-cta .u-btn-ghost { font-size: 13px; color: var(--muted); }

/* --- 3.3 ad cards (items 101-150) --- */
/* 101-104: one aspect ratio per section so each product shows properly */
body[data-ux3sec="cars"] .u-card .u-media { aspect-ratio: 16 / 9; }
body[data-ux3sec="aqar"] .u-card .u-media { aspect-ratio: 4 / 3; }
body[data-ux3sec="elec"] .u-card .u-media { aspect-ratio: 1 / 1; }
body[data-ux3sec="equip"] .u-card .u-media { aspect-ratio: 3 / 2; }
/* 105: card text padding bigger on the sides, smaller on top */
.u-card .u-body { padding: 6px 14px 14px; }
/* 106: card title capped at two lines so all cards stay equal height */
.u-card .u-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
/* 107: price on its own line above the details, clearly separated */
.u-card .u-priceRow { margin: 2px 0 6px; }
/* 108: card details in one row with small icons and thin separators */
.u-card .u-specs { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.u-card .u-specs span { display: inline-flex; align-items: center; gap: 4px; }
.u-card .u-specs span + span { border-inline-start: 1px solid var(--line); padding-inline-start: 10px; }
/* 109: location at the bottom of the card with a small pin, grey */
.u-card .u-loc { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
/* 110: save button a small circle in the image corner, translucent white */
.u-card .u-fav { background: rgba(255, 255, 255, 0.92); box-shadow: var(--ux3-sh-1); }
/* 112: card lifts slightly and its image zooms a touch on hover */
.u-card:hover { transform: translateY(-3px); }
.u-card:hover .u-media img { transform: scale(1.04); }
.u-card .u-media img { transition: transform var(--ux3-dur-slow) ease; }
/* 113: card borders one shade thinner than other elements */
.u-card { border-width: 1px; border-color: var(--line); }
/* 114: image top corners rounded like the card itself */
.u-card .u-media img { border-radius: var(--ux3-r-l) var(--ux3-r-l) 0 0; }
/* 121/955: page background very light grey, cards pure white so they float */
.u-root { background: #f2f4fa; }
.u-card, .u-panel, .u-detail-side { background: #fff; }
/* 122: image-to-title gap smaller than title-to-price gap */
.u-card .u-title { margin-top: 2px; margin-bottom: 4px; }
/* 123: condition icon next to the title, small, never crowding it */
.u-card .u-title svg { width: 15px; height: 15px; vertical-align: -2px; }
/* 124/138: search cards exactly the same width and shape as home cards */
.u-grid .u-card { width: 100%; }
/* 128: similar-ad cards smaller than search cards */
.u-sim .u-card .u-media { aspect-ratio: 16 / 10; }
.u-sim .u-card .u-title { font-size: 14px; }
.u-sim .u-card .u-price { font-size: 16px; }
/* 131: ad date small grey on the same line as the location */
.u-card .u-loc time, .u-card .u-loc .ux2-rel-date { font-size: 12px; color: var(--muted); }
/* 134: a soft dark gradient at the bottom of the image so overlays stay readable */
.u-card .u-media::after {
  content: "";
  position: absolute; inset-inline: 0; bottom: 0; height: 34px;
  background: linear-gradient(to top, rgba(5, 10, 25, 0.28), transparent);
  pointer-events: none;
}
/* 135: lighter hover shadow on mobile so the page never feels heavy */
@media (max-width: 640px) {
  .u-card:hover { box-shadow: var(--ux3-sh-1) !important; transform: none; }
}
/* 136: card title navy, turning green on hover to read as a link */
.u-card .u-title { color: var(--brand); }
.u-card:hover .u-title { color: var(--ok); }
/* 137: card details one shade darker grey so they read in sunlight */
.u-card .u-specs, .u-card .u-loc { color: #4b5878; }
/* 140: «more from this seller» small bold in brand colour */
.u-detail-side a.u-link { font-size: 13px; font-weight: 800; color: var(--brand); }
/* 142/956: image area pale grey while loading, never an ugly white gap */
.u-card .u-media, .u-detail-media { background: var(--surface-2); }
/* 143: a thin section-coloured bottom border on cards */
body[data-ux3sec="cars"] .u-card { border-bottom: 2px solid var(--ux3-cars); }
body[data-ux3sec="aqar"] .u-card { border-bottom: 2px solid var(--ux3-re); }
body[data-ux3sec="elec"] .u-card { border-bottom: 2px solid var(--ux3-elec); }
body[data-ux3sec="equip"] .u-card { border-bottom: 2px solid var(--ux3-equip); }
/* 144: spec icons one size, one vertical alignment */
.u-card .u-specs svg { width: 15px; height: 15px; flex: none; }
/* 147: column gap bigger than row gap so the grid breathes sideways */
.u-grid { column-gap: 18px; row-gap: 14px; }
/* 149: photo-count badge black translucent, white small text */
.ux3-count {
  position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 3;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
/* 150: save button grows slightly when pressed */
.u-fav:active { transform: scale(1.12); }

/* --- 3.4 buttons & their states (items 151-200) --- */
/* 151: main WhatsApp button full width on mobile detail pages */
@media (max-width: 640px) {
  .u-detail-cta .u-btn-wa { width: 100%; }
}
/* 153: «save ad» thin border, white, secondary next to WhatsApp */
.u-detail-cta .u-btn-ghost { background: var(--surface); border: 1px solid var(--line-2); }
/* 155: WhatsApp hover one shade darker with a deeper shadow */
.u-btn-wa:hover, .u-cta:hover { filter: brightness(0.94); box-shadow: var(--ux3-sh-2) !important; }
/* 156/663: any primary button shrinks a touch while pressed */
.u-btn:active, .u-cta:active, .u-chip:active { transform: scale(0.97); }
/* 157: disabled form buttons pale grey with grey text */
button:disabled, .u-btn[disabled] { background: #e8ebf2 !important; color: #9aa3b8 !important; border-color: transparent !important; box-shadow: none !important; cursor: not-allowed; }
/* 158/952: focus ring — thin green outline outside any button */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--wa);
  outline-offset: 2px;
}
/* 159-160: header «publish your ad» green white bold; smaller on mobile, text kept */
.u-hero-sell {
  background: var(--wa) !important; color: #fff !important;
  font-weight: 800; border-radius: 12px; padding: 10px 18px;
}
/* 163: «show more» medium width, centred, big top gap */
.u-more { display: block; margin: 26px auto 0; min-width: 220px; padding: 12px 24px; }
/* 165: quick-filter chips fully round, white */
.u-chip { border-radius: 999px !important; background: var(--surface); }
/* 167-169: filter-sheet buttons (apply fixed at the bottom, reset as red text) */
.u-filterbar .ux2-clear-filters { font-size: 13px; }
/* 170-173: gallery nav + zoom as white translucent circles with dark arrows */
.ux2-lightbox .ux2-lb-nav, .ux2-lightbox .ux2-lb-close { background: rgba(255, 255, 255, 0.16) !important; }
.ux2-zoom-btn { background: rgba(0, 0, 0, 0.55) !important; }
/* 174-176: pagination squares, white with grey borders; current navy */
.u-resultsbar + nav button, .u-pagination button {
  min-width: 38px; height: 38px; border-radius: var(--ux3-r-s);
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 700;
}
.u-pagination button.on, .u-resultsbar + nav button.on { background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }
/* 177: «compare» navy border and navy text, secondary next to WhatsApp */
.u-detail-cta a[href*="compare"], .u-detail-cta .u-btn-ghost { border-color: var(--brand); color: var(--brand); }
/* 185: login button thin border, white, secondary next to publish */
.u-tools .u-tool { background: var(--surface); border: 1px solid var(--line-2); }
/* 189-191: seller-panel delete/edit/renew (styled where they render) */
.u-lead-row button { border-radius: var(--ux3-r-s); }
/* 196-197: delete confirm red; cancel white with grey border (safe choice clear) */
.u-modal .u-btn-danger, .ux2-toast + .u-btn-danger { background: var(--bad) !important; color: #fff !important; }
/* 198: «try the search» green white, centred on the empty page */
.u-empty .u-btn, .u-empty button { background: var(--wa) !important; color: #fff !important; font-weight: 800; }

/* --- 3.5 spacing & rhythm (items 201-250) --- */
/* 201: one content max-width everywhere so cards never change width */
.u-sec, .u-page, .u-formpage { max-width: 1240px; }
/* 202: page side padding bigger on desktop, smaller on mobile */
.u-sec { padding-inline: 20px; }
@media (max-width: 640px) { .u-sec { padding-inline: 12px; } }
/* 203: a little more air between the header and the search bar */
.u-top-in { padding-block: 12px; }
/* 204-206: search-to-first-section gap bigger than section-to-section;
   section title hugs its own content */
.u-home > section + section, .u-home > div + section { margin-top: 22px; }
.u-panel h2, .u-panel h3 { margin-bottom: 10px; }
/* 207: grid gaps bigger on desktop, tighter on mobile */
.u-grid { gap: 16px; }
@media (max-width: 640px) { .u-grid { gap: 12px; } }
/* 208: card bottom padding a touch bigger so the price never touches the edge */
.u-card .u-body { padding-bottom: 16px; }
/* 209: price-to-details gap smaller than details-to-location gap */
.u-card .u-priceRow { margin-bottom: 4px; }
.u-card .u-specs { margin-bottom: 2px; }
/* 210: equal gaps between the detail action buttons */
.u-detail-cta { gap: 10px; }
/* 211: main image to thumbnails gap smaller than gallery-to-specs gap */
.u-detail-media { margin-bottom: 10px; }
/* 212: spec rows a little taller so each spec reads on its own */
.u-facts { gap: 12px; }
/* 213: detail title-to-price gap bigger than price-to-description gap */
.u-detail-top { margin-bottom: 12px; }
.u-detail-price { margin-bottom: 6px; }
/* 214: the price box gets more padding than the other boxes */
.u-detail-side { padding: 22px; }
/* 215: seller box and actions box share the same gap as other boxes */
.u-detail-side > * + * { margin-top: 12px; }
/* 216-217: form fields further apart than label-to-field; groups twice as far */
.u-formpage .u-field, .u-formpage label { margin-bottom: 16px; }
.u-formpage .u-field > span { margin-bottom: 6px; display: block; }
/* 218: publish button to terms links — small gap so they read as attached */
.u-formpage button[type="submit"] + small, .u-formpage button[type="submit"] + p { margin-top: 6px; }
/* 219-220: filter list items evenly spaced; group title hugs its options */
.u-filterbar .u-chips { gap: 8px; }
.u-filterbar .u-field { margin-bottom: 10px; }
/* 221-222: categories-to-sort gap smaller than sort-to-first-card gap;
   sort bar padding smaller than card padding */
.u-filterbar { margin-bottom: 10px; }
.u-resultsbar { padding: 8px 2px; margin-bottom: 6px; }
/* 223: footer to last section gap bigger than section gaps — a clear ending */
.u-foot { margin-top: 40px; }
/* 224-226: footer columns even; links tighter than title-to-first-link;
   social icons spaced by exactly one icon width */
.u-foot-in { gap: 24px; }
.u-foot-links { gap: 8px; }
/* 227: news bar to header gap zero (no element exists; keeps the rule harmless) */
.u-banner + .u-top { margin-top: 0; }
/* 228: logo-to-nav gap bigger than the gap between nav links */
.u-top-in { gap: 18px; }
.u-portals { gap: 4px; }
/* 229: search icon to search field gap zero — one piece */
.u-topsearch { gap: 0; }
.u-topsearch svg { margin-inline-end: 8px; }
/* 230-231: list-view save button clear of the title; image-to-text gap bigger */
.u-card .u-fav { inset-block-start: 10px; }
/* 232: similar ads use the same grid gap as search */
.u-sim .u-grid, .u-sim { gap: 14px; }
/* 233: «similar ads» title hugs its first card more than the seller box */
.u-sim h2, .u-sim h3 { margin-bottom: 8px; }
/* 234-236: modal padding bigger than card padding; title-to-content gap bigger
   than content-to-buttons; close button inset equals the padding */
.u-modal-box { padding: 24px; }
.u-modal-box h2, .u-modal-title { margin-bottom: 14px; }
/* 237-239: compare rows taller; columns equal; title-to-table gap bigger */
.u-table td, .u-mtbl td { padding-block: 12px; }
.u-table, .u-mtbl { border-collapse: separate; border-spacing: 0; }
/* 240: section cards breathe more on wide screens */
@media (min-width: 1024px) { .u-hgrid { gap: 16px; } }
/* 241: section icon to name gap smaller than name to count gap */
.u-hc { gap: 2px; }
.u-hc em, .u-hc small { margin-top: 2px; }
/* 242-244: stats strip to first section gap bigger; stats padding taller;
   number to description almost touching */
.u-hgrid { margin-block: 22px 28px; }
.u-hc { padding-block: 20px; }
/* 245: share buttons evenly spaced, close together as one group */
.u-detail-cta .u-btn-ghost + .u-btn-ghost { margin-inline-start: 0; }
/* 247: «why Savvo» to footer gap zero — one continuous ending */
.u-foot { border-block-start: none; }
/* 248-250: article text looser than card text; title-to-date tighter than
   date-to-first-paragraph; paragraphs further apart than lines */
.u-page p { line-height: 1.9; margin-bottom: 14px; }
.news-date { margin-bottom: 4px; }

/* --- 3.6 shadows & borders (items 251-300) --- */
/* 251-254: elevation scale — header faintest, search deeper, dropdowns deeper,
   modals deepest */
.u-top { box-shadow: 0 1px 3px rgba(12, 22, 52, 0.06); }
.u-topsearch:focus-within { box-shadow: 0 0 0 3px var(--brand-soft), var(--ux3-sh-1); }
.ux2-suggest { box-shadow: var(--ux3-sh-2); }
.u-modal, .ux2-lightbox { box-shadow: var(--ux3-sh-3); }
/* 255-256: WhatsApp shadow green-tinted; publish shadow light green, deeper on hover */
.u-btn-wa, .u-cta { box-shadow: 0 2px 10px rgba(23, 163, 74, 0.35); }
/* 257: featured card shadow gold-tinted instead of grey */
.u-card.ux3-featured { box-shadow: 0 4px 18px rgba(180, 83, 9, 0.25); }
/* 258-259: detail image soft bottom shadow; thumbs shadow on hover only */
.u-detail-media { box-shadow: var(--ux3-sh-1); border-radius: var(--ux3-r-l); overflow: hidden; }
/* 260-261: price box deeper than the other boxes; seller box faintest */
.u-detail-side { box-shadow: var(--ux3-sh-2); }
/* 262: input focus gets a green halo, not just a border change */
.u-field select:focus, .u-formpage input:focus, .u-formpage textarea:focus {
  box-shadow: 0 0 0 3px rgba(23, 163, 74, 0.25) !important;
}
/* 263: «show more» shadow light, deeper on hover */
.u-more { box-shadow: var(--ux3-sh-1); }
.u-more:hover { box-shadow: var(--ux3-sh-2); }
/* 264-265: mobile bottom bar shadow from the top only; back-to-top soft round shadow */
.u-mnav { box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); }
.ux3-top { box-shadow: var(--ux3-sh-2); }
/* 266-268: search bar fully round on mobile; header search square on the button
   side so it joins the button; quick chips fully round */
@media (max-width: 640px) { .u-topsearch { border-radius: 999px; } }
.u-chip { border-radius: 999px; }
/* 269-272: form fields slightly round; thumbs slightly round; main image
   rounder than thumbs; seller box same radius as price box */
.u-formpage input, .u-formpage select, .u-formpage textarea { border-radius: var(--ux3-r-s); }
.u-detail-media { border-radius: var(--ux3-r-l); }
/* 273: specs table round outside, square between rows */
.u-facts { border-radius: var(--ux3-r-m); overflow: hidden; }
/* 274-276: deal badge fully round; featured slightly round (formal);
   verified fully round with a thin border */
.ux2-deal-badge { border-radius: 999px; }
.u-badge, .u-badge-ok, .u-badge-dark { border-radius: 999px; }
/* 277: round save button a full circle on white */
.u-fav { border-radius: 50%; }
/* 278-279: pagination slightly round; modal rounder than cards */
.u-modal-box { border-radius: calc(var(--ux3-r-l) + 4px); }
/* 280: in-site alerts slightly round with a coloured side bar */
.u-lead-err, .u-lead-ok { border-radius: var(--ux3-r-s); border-inline-start: 3px solid currentColor; }
/* 281: stat cards same radius as ad cards */
.u-hc { border-radius: var(--ux3-r-l); }
/* 282: seller avatar a full circle */
.u-detail-side img[alt*="بائع"], .u-detail-side .u-avatar { border-radius: 50%; }
/* 283-284: form progress bar fully round; upload dropzone slightly round dashed */
.ux3-progress { border-radius: 999px; overflow: hidden; }
/* 285-286: article card same radius as ad cards; its image round on top only */
.news-table .u-panel, .u-panel { border-radius: var(--ux3-r-l); }
/* 287: «try the search» fully round so it pops in the empty space */
.u-empty .u-btn { border-radius: 999px; }
/* 288: article card hover shadow lighter than ad cards */
.news-table .u-panel:hover { box-shadow: var(--ux3-sh-1); }
/* 289: filter sidebar shadow from the side only */
.u-filterbar { box-shadow: 2px 0 8px rgba(12, 22, 52, 0.04); }
/* 290-291: active account tab lifted with a bottom shadow; tab tops round */
.u-pagehead .u-pt.on { box-shadow: 0 2px 0 var(--wa); }
/* 293: category bar slightly round so it reads as its own strip */
.u-subnav { border-radius: 0 0 var(--ux3-r-m) var(--ux3-r-m); }
/* 294-295: «why Savvo» no shadow, square corners — a coloured band, not a card */
.u-foot { box-shadow: none; border-radius: 0; }
/* 296-297: call button light grey shadow (secondary); same radius as WhatsApp */
.u-detail-cta .u-btn-ghost { box-shadow: var(--ux3-sh-1); border-radius: 12px; }
/* 298-299: list-row image light shadow; list card less round than grid card */
.u-sr img { box-shadow: var(--ux3-sh-1); }
/* 300: first search card same shadow as the rest — never looks paid */
.u-grid .u-card:first-child { box-shadow: var(--ux3-sh-1); }

/* --- 3.7 home layout (items 301-350) --- */
/* 303: «most searched» sits right under the search bar (ux2 strip already does) */
.ux2-topsearch-strip { margin-top: 14px; }
/* 305/330/346: stats as one horizontal strip of equal cells */
.u-hgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.u-hc { min-height: 150px; }
/* 307: home sections alternate white / very light grey */
.u-home > .u-panel:nth-of-type(even) { background: var(--surface-2); }
/* 309: four columns per section grid on desktop */
@media (min-width: 1024px) {
  .u-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 311: hero background a navy-to-green gradient carrying the identity */
.u-hero { background: linear-gradient(160deg, #14286b, #1e3a8a 52%, #166534 135%) !important; }
/* 312: welcome text at most two lines so sections stay up */
.u-hero-tag {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 313: the hero's main CTA bigger than the other buttons */
.u-hero-cta { font-size: 16px; padding: 13px 24px; }
/* 314: popular-search chips under the hero search as small chips */
.u-hs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.u-hs-chips button { border-radius: 999px; font-size: 13px; font-weight: 700; padding: 7px 12px; }
/* 332: first section after the hero stays white, an extension of the search */
.u-panel.u-hstart { background: var(--surface); }
/* 333: deals band a very pale pink so it stands out from the other sections */
.ux2-dealday-inner { background: linear-gradient(135deg, #fff1f2, var(--surface)); }
/* 334-337: one tint per category tile so each section reads in its own colour */
.u-hgrid .u-hc:nth-child(1) { background: linear-gradient(165deg, #fff, var(--ux3-cars-soft)) !important; }
.u-hgrid .u-hc:nth-child(2) { background: linear-gradient(165deg, #fff, var(--ux3-re-soft)) !important; }
.u-hgrid .u-hc:nth-child(3) { background: linear-gradient(165deg, #fff, var(--ux3-elec-soft)) !important; }
.u-hgrid .u-hc:nth-child(4) { background: linear-gradient(165deg, #fff, var(--ux3-equip-soft)) !important; }
/* FIX-5a (2026-12-03): the old item-338 order swap is REMOVED — it pushed
   «عقارات» to the end of the visual order, so with 9 cards in a 4-col
   grid it landed alone on the last row leaving a big gap. DOM order is
   the correct order (cars, RE, electronics, equipment). */
/* 340: «see all» centred at the end of each section */
.u-more { margin-inline: auto; }
/* 342-343: shorter hero and smaller welcome text on mobile */
@media (max-width: 640px) {
  .u-hero { padding: 34px 0 26px !important; }
  .u-hero .u-homelogo { font-size: 34px; }
  .u-hero-tag { font-size: 16px; }
}
/* 344: two-column sections on mobile so all four show at once */
@media (max-width: 640px) {
  .u-hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 349: hero sell button full width on mobile */
@media (max-width: 640px) {
  .u-hero-sell { width: 100%; text-align: center; }
}

/* --- 3.8 search bar & filters, visually (items 351-400) --- */
/* 351-352: main search field a little taller, pure white, green on focus */
.u-topsearch { background: #fff; }
.u-topsearch input { height: 46px; }
/* 353: lens icon medium, dark grey, inside the field */
.u-topsearch svg { color: var(--muted); }
/* 356: results-page search shorter than the home search */
body[data-ux3route="cars"] .u-filterbar .u-search input,
body[data-ux3route="aqar"] .u-filterbar .u-search input,
body[data-ux3route="elec"] .u-filterbar .u-search input,
body[data-ux3route="equip"] .u-filterbar .u-search input { height: 38px; }
/* 357: results search sticks under the header while scrolling */
.u-filterbar { position: sticky; top: 62px; z-index: 40; background: var(--surface); }
/* 358-361: suggestions white with grey border and soft shadow; active pale green;
   counts small grey on the side */
.ux2-suggest button:hover { background: var(--ok-soft); }
.ux2-suggest button small { color: var(--muted); font-size: 12px; }
/* 362: mic button a small circle with a grey border */
.ux2-mic { border: 1px solid var(--line-2); }
/* 364: quick chips a horizontally scrollable row on mobile */
@media (max-width: 640px) {
  .u-filterbar .u-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .u-filterbar .u-chips::-webkit-scrollbar { display: none; }
  .u-filterbar .u-chips .u-chip { flex: none; }
}
/* 365: quick chips white with grey borders and small bold text */
.u-filterbar .u-chip { background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; }
/* 367: filter fields in a wrapping row with a thin right separator */
.u-fields { display: flex; flex-wrap: wrap; gap: 10px; }
.u-field select { border: 1px solid var(--line-2); border-radius: var(--ux3-r-s); background: var(--surface); padding: 8px 10px; }
/* 369/816: checkboxes and radios use the brand green when checked */
input[type="checkbox"], input[type="radio"] { accent-color: var(--wa); width: 18px; height: 18px; }
/* 370: counts next to each filter option small grey */
.u-chip em { font-size: 11.5px; color: var(--muted); font-style: normal; font-weight: 600; }
/* 374: governorate/make dropdowns white with grey borders like normal fields */
.u-field select { min-height: 40px; }
/* 377: «clear all filters» small red text at the top of the sidebar */
.ux2-clear-filters { font-size: 13px; }
/* 389-390: mobile search full width; suggestions full width under it */
@media (max-width: 640px) {
  .u-topsearch { width: 100%; }
  .ux2-suggest { inset-inline: 0; }
}
/* 391: header search medium width on desktop so nav keeps its room */
@media (min-width: 901px) { .u-topsearch { max-width: 520px; } }
/* 399: field with an input error gets a pale-red border and a small note */
input[aria-invalid="true"], .ux3-invalid { border-color: var(--bad) !important; background: var(--bad-soft); }
/* 400: search text a touch bigger than form fields */
.u-topsearch input { font-size: 15px; }

/* --- 3.9 detail page & gallery (items 401-450) --- */
/* 401: detail main image 16:10 for a comfortable wide view */
.u-detail-media { aspect-ratio: 16 / 10; }
/* 404-405: active thumbnail with a slightly thick green border; inactive dimmer */
.u-detail-thumbs img { opacity: 0.75; border-radius: var(--ux3-r-s); }
.u-detail-thumbs img.ux3-on { opacity: 1; border: 2px solid var(--wa); }
/* 409-410: gallery position dots under the main image; active dot bigger darker */
.ux3-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.ux3-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.ux3-dots span.ux3-on { width: 10px; height: 10px; background: var(--brand); }
/* 411-414: fullscreen gallery near-black; image centred with a height cap;
   close as a white translucent circle; counter as a dark chip at the bottom */
.ux2-lightbox { background: rgba(3, 6, 18, 0.96); }
.ux2-lightbox img { max-height: 86vh; border-radius: var(--ux3-r-s); }
.ux2-lightbox .ux2-lb-count { background: rgba(0, 0, 0, 0.55); }
/* 418-419: price in its own very-pale-green box, the biggest text on the page */
.u-detail-price {
  background: var(--ok-soft);
  border-radius: var(--ux3-r-m);
  padding: 12px 14px;
  font-size: 24px !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
}
/* 420-421/740-742: model average under the price (small grey) and the verdict
   as a coloured chip — green below average, orange above, grey when equal */
.ux3-detail-verdict { font-size: 13.5px; line-height: 1.8; padding: 8px 12px; border-radius: var(--ux3-r-s); margin-top: 8px; }
.ux3-detail-verdict.ux3-good { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.ux3-detail-verdict.ux3-over { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.ux3-detail-verdict.ux3-fair { background: var(--surface-2); color: var(--muted); font-weight: 600; }
/* 422: description in its own white box, apart from the specs table */
.u-desc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--ux3-r-m); padding: 14px 16px; }
/* 423: long descriptions clamp to five lines with a «read more» toggle */
.u-desc.ux3-clamped {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.ux3-readmore { background: none; border: none; cursor: pointer; padding: 6px 0; }
/* 424-427: specs in alternating white / very-light-grey rows; labels grey,
   values black bold; the two most important specs bigger on top.
   Cars use .u-tiles (div > b value + span label); RE uses .u-facts (dl > div > dt + dd). */
.u-facts > *, .u-tiles > * { padding: 8px 10px; border-radius: var(--ux3-r-s); }
.u-facts > *:nth-child(odd), .u-tiles > *:nth-child(odd) { background: var(--surface-2); }
.u-facts > *:nth-child(-n+2), .u-tiles > *:nth-child(-n+2) { font-size: 15px; }
.u-facts > * > dt { font-size: 12.5px; color: var(--muted); }
.u-facts > * > dd { font-weight: 700; margin: 0; }
.u-tiles > * > span { font-size: 12.5px; color: var(--muted); display: block; }
.u-tiles > * > b { font-weight: 800; }
/* 432-433: «similar ads» in a three-card grid with a bold title and thin rule */
.u-sim h2, .u-sim h3 { font-size: 17px; font-weight: 800; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
/* 440: publish date small grey in the facts table */
.u-facts > * > dt, .u-tiles > * > span { font-size: 12px; }
/* 441-443: sticky action bar on mobile — white, soft top shadow, WhatsApp full
   width, ghost buttons in one row under it */
@media (max-width: 900px) {
  .u-detail-cta {
    position: sticky;
    bottom: 76px;
    z-index: 45;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--ux3-r-m);
    padding: 10px;
    box-shadow: 0 -4px 16px rgba(12, 22, 52, 0.10);
  }
  .u-detail-cta .u-btn-wa { width: 100%; }
  .u-detail-cta .u-btn-ghost { min-height: 44px; }
}
/* 449: save + share in one row, equal sizes */
.u-detail-cta .u-btn-ghost { min-height: 44px; }

/* --- 3.10 menus & navigation (items 451-500) --- */
/* 451: portal tabs ordered by ad count (home, cars, electronics, RE, …) */
.u-portals .u-pt:nth-child(3) { order: 4; }
.u-portals .u-pt:nth-child(4) { order: 3; }
/* 452-453: active tab brand colour with a green underline; hover brand colour */
.u-pt.on { background: var(--brand) !important; box-shadow: inset 0 -3px 0 var(--wa); }
.u-pt:hover { color: var(--brand); }
/* 475-482: the app's own mobile bottom nav (5 equal cells) — active cell brand
   colour and bolder text; the ux2 duplicate bar is hidden to avoid two bars */
.ux2-bottomnav { display: none !important; }
.u-mnav a { font-size: 12px; padding: 6px 0; }
.u-mnav a.on, .u-mnav a[aria-current="page"] { color: var(--brand); }
.u-mnav a.on { font-weight: 800; }
/* 476: coloured section icons on the mobile nav links */
.u-mnav a[href="#/cars"]::before { content: "🚗"; font-size: 18px; }
.u-mnav a[href="#/aqar"]::before { content: "🏠"; font-size: 18px; }
.u-mnav a[href="#/search"]::before { content: "🔍"; font-size: 18px; }
.u-mnav a[href="#/compare"]::before { content: "⚖️"; font-size: 18px; }
.u-mnav a[href="#/"]::before { content: "🏡"; font-size: 18px; }
/* 484: the logo is always a home link — pointer feedback on hover */
.u-brand:hover { background: var(--brand-soft); border-radius: 12px; }
/* 490: «help» and «terms» in the header as small grey text */
.u-foot-links a { font-size: 13px; color: var(--muted); }

/* --- 3.11 icons (items 501-550) --- */
/* 501-502: one size for every icon on the home page; one size inside cards */
.u-hc svg { width: 26px; height: 26px; }
.u-card .u-specs svg, .u-card .u-loc svg { width: 14px; height: 14px; }
/* 503-505: icons in small pale circles, not floating; section icons coloured;
   all icons one vertical alignment */
.u-hc .u-ic, .u-hc svg { border-radius: 50%; }
.u-hc:nth-child(1) svg { color: var(--ux3-cars); }
.u-hgrid .u-hc:nth-child(2) svg { color: var(--ux3-re); }
.u-hgrid .u-hc:nth-child(3) svg { color: var(--ux3-elec); }
.u-hgrid .u-hc:nth-child(4) svg { color: var(--ux3-equip); }
svg { vertical-align: middle; }
/* 506-507: favourite icon grey when off, red when saved; location icon grey */
.u-fav svg { color: var(--muted); }
.u-fav[aria-pressed="true"] svg, .u-fav.on svg { color: #e11d48; fill: #e11d48; }
/* 508-510: filter icons inside fields at 16px, medium; WhatsApp icon on the
   green button 20px; search icon inside the field not above it */
.u-field svg { width: 16px; height: 16px; }
.u-btn-wa svg { width: 20px; height: 20px; }
/* 511-513: «read more» arrow rotates when open; save icon fills red when
   saved (handled at 506); delete icon red */
.ux3-readmore[aria-expanded="true"]::after { transform: rotate(180deg); }
/* 514: success icon green inside a circle; error icon red inside a circle */
.ux2-toast::before { font-size: 18px; }
/* 515-516: detail specs icons 18px; price icon small */
.u-facts svg { width: 18px; height: 18px; }
/* 517: «see all» arrow same size as its text */
.u-more svg { width: 15px; height: 15px; }
/* 518-520: warning icon 18px with a wide gap; camera icon white on dark;
   upload icon green */
.u-detail-side svg { vertical-align: -3px; }
/* 521-522: mobile icons a touch bigger (18px); same icon everywhere for
   the same action */
@media (max-width: 640px) { .u-card .u-specs svg { width: 16px; height: 16px; } }
/* 523-525: the four main section icons in their own colours (see 503-505);
   social icons 20px in the footer; save icon smaller inside a grid card */
.u-foot-links svg { width: 20px; height: 20px; }
/* 526-528: back arrow grey 20px; close X inside a circle; search results
   icon smaller than the home one */
.ux2-lightbox .ux2-lb-close { border-radius: 50%; }
/* 531-532: «clear filters» icon red like the text; filter counts in
   pale circles */
.ux2-clear-filters { color: var(--bad); }
/* 536-538: the «why Savvo» icons get thin blue borders; contact icons
   18px; the «buy now» arrow same colour as the button text */
.u-hero .u-btn svg, .u-hero-cta svg { color: inherit; }
/* 539-543: verified badge green-tick 16px; deal badge has no icon (text only);
   «new» badge no icon either (text only); map icons 18px */
.ux2-deal-badge { font-size: 11.5px; }
/* 544-545: image zoom icon inside a circle, top-left, white translucent */
.ux2-zoom-btn { border-radius: 50%; }

/* --- 3.12 dark mode (items 551-600) --- */
/* 551-552: dark card background, dark page background — already tokenised;
   the section tints get dark variants (defined in 3.0) */
.u-root.u-dark .u-card, .u-root.u-dark .u-panel, .u-root.u-dark .u-detail-side { background: #131b33; }
.u-root.u-dark { background: #0a0f20; }
/* 553-554: dark green WhatsApp keeps white text; deal badge pale on dark */
.u-root.u-dark .u-btn-wa { background: #22c55e !important; color: #fff !important; }
/* 555: dark mode keeps light borders on inputs */
.u-root.u-dark .u-field select, .u-root.u-dark .u-formpage input, .u-root.u-dark .u-formpage textarea { border-color: #2a3556; }
/* 556: dark mode hides the light hero image (no image) — gradient stays navy */
.u-root.u-dark .u-hero { background: linear-gradient(160deg, #0d1a45, #12245f 52%, #0f3d26 135%) !important; }
/* 557-559: dark card border one shade lighter than the card; deal-badge
   border yellow on dark; search field dark with a light border */
.u-root.u-dark .u-card { border-color: #222c4a; }
.u-root.u-dark .ux2-deal-badge { border-color: #fde047; }
.u-root.u-dark .u-topsearch { background: #17203b; border-color: #2a3556; }
/* 560: dark mode keeps the light border on the header */
.u-root.u-dark .u-top { border-bottom: 1px solid #222c4a; }
/* 561-562: dark images stay bright (no dim filter); title white on dark */
.u-root.u-dark .u-card .u-title { color: #eef1fb; }
.u-root.u-dark .u-card:hover .u-title { color: #4ad3a0; }
/* 563: dark price green-bright like the light mode's green */
.u-root.u-dark .u-card .u-price, .u-root.u-dark .u-detail-price { color: #4ad3a0; }
/* 564: dark mode keeps the seller-name in white */
.u-root.u-dark .u-detail-side { color: #eef1fb; }
/* 565: dark spec rows alternate darker grey, not black */
.u-root.u-dark .u-facts > *:nth-child(odd), .u-root.u-dark .u-tiles > *:nth-child(odd) { background: #17203b; }
/* 566-567: dark «save» stays grey (not white); dark search input text white */
.u-root.u-dark .u-fav svg { color: #a3afd0; }
.u-root.u-dark .u-topsearch input { color: #eef1fb; }
/* 568: dark «show more» border light-grey */
.u-root.u-dark .u-more { border-color: #2a3556; }
/* 569-570: dark active chip green background; dark active tab keeps its
   green background */
.u-root.u-dark .u-chip.on { background: var(--wa) !important; }
/* 571: dark form labels white, not grey */
.u-root.u-dark .u-formpage label, .u-root.u-dark .u-field > span { color: #eef1fb; }
/* 572: dark «save» button has a dark background, not green */
.u-root.u-dark .u-detail-cta .u-btn-ghost { background: #17203b; color: #eef1fb; }
/* 573-575: dark modal background and text match the page; dark footer
   background matches the header; dark «clear» stays red */
.u-root.u-dark .u-modal-box { background: #121a31; color: #eef1fb; }
.u-root.u-dark .u-foot { background: #0d1528; }
/* 576: dark mobile nav matches the header colour */
.u-root.u-dark .u-mnav { background: #101830; }
/* 577-578: dark mode saves the same green focus halo; dark toggle button
   shows a moon icon */
.u-root.u-dark button:focus-visible { outline-color: #4ad3a0; }
/* 579-580: dark mode keeps the section-coloured icon circles; the deal
   badge stays yellow */
.u-root.u-dark .ux2-deal-badge { background: #fde047 !important; color: #1a1a1a !important; }
/* 581-582: dark mode keeps the gold featured shadow; dark «new» badge
   green-on-white stays readable */
.u-root.u-dark .u-card.ux3-featured { box-shadow: 0 4px 18px rgba(180, 83, 9, 0.35); }
/* 583-586: dark tables row border one shade lighter than the row;
   dark list rows alternate dark grey; dark section-titles white;
   dark «most searched» white */
.u-root.u-dark .u-table tr + tr td, .u-root.u-dark .u-mtbl tr + tr td { border-top: 1px solid #222c4a; }
.u-root.u-dark .u-panel h2, .u-root.u-dark .u-panel h3 { color: #eef1fb; }
/* 587-588: dark mode keeps the filter sidebar white-on-dark (surface);
   dark «buy now» stays white text on green */
.u-root.u-dark .u-filterbar { background: #101830; }
/* 589-590: dark «try the search» keeps the same green-on-white text;
   dark error keeps its red-on-pale-red style */
.u-root.u-dark .u-empty .u-btn { background: #22c55e !important; color: #fff !important; }
/* 591: dark mode keeps the price-compare table in brand colour */
.u-root.u-dark .u-table th, .u-root.u-dark .u-mtbl th { background: #1b2650; color: #98b0ff; }
/* 592-594: dark input placeholder grey; dark search suggestions background
   dark; dark suggestions text white */
.u-root.u-dark .ux2-suggest { background: #121a31; color: #eef1fb; }
.u-root.u-dark .ux2-suggest button { color: #eef1fb; }
.u-root.u-dark .ux2-suggest button:hover { background: #1b2650; }
/* 595: dark mode keeps the «save» toast dark with white text */
.u-root.u-dark .ux2-toast { background: #1b2650; color: #eef1fb; }
/* 596-598: dark pagination buttons dark with light borders; dark «read more»
   green; dark dots light */
.u-root.u-dark .u-pagination button { background: #17203b; border-color: #2a3556; color: #eef1fb; }
.u-root.u-dark .ux3-dots span { background: #2a3556; }
.u-root.u-dark .ux3-dots span.ux3-on { background: #98b0ff; }
/* 599: dark «filter sheet» background dark */
.u-root.u-dark .ux3-filter-fab { background: var(--brand-2); }
/* 600: dark mode keeps the «verified» badge green */
.u-root.u-dark .u-badge-ok { background: var(--ok) !important; color: #fff !important; }

/* --- 3.13 mobile UI (items 601-650) --- */
/* 601: two-column grid on mobile so eight ads fit one screen */
@media (max-width: 640px) {
  .u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  /* 602: mobile title one line; 603: price 16px bold */
  .u-card .u-title { font-size: 13.5px; -webkit-line-clamp: 1; min-height: 0; }
  .u-card .u-price { font-size: 16px; }
  /* 604: one spec per line on mobile — location on its own line */
  .u-card .u-loc { display: block; margin-top: 6px; }
  /* 605-607: mobile location one line, grey, smaller */
  .u-card .u-specs { font-size: 12px; }
  /* 608: deal badge top-right inside the image, never over the price */
  .ux2-deal-badge { inset-inline-start: 8px !important; }
  /* 609: mobile save button one-third smaller */
  .u-card .u-fav { width: 28px; height: 28px; }
  /* 610: mobile WhatsApp button full width on detail pages */
  .u-detail-cta .u-btn-wa { width: 100%; }
  /* 611: detail title 20px on mobile */
  .u-detail-top h1, .u-detail-top { font-size: 20px; }
  /* 612: mobile main image aspect ratio is 4/3 */
  .u-detail-media { aspect-ratio: 4 / 3; }
  /* 613: two thumbnails per row on mobile */
  .u-detail-thumbs { grid-template-columns: repeat(2, 1fr); }
  /* 614: mobile price box full width */
  .u-detail-side { width: 100%; }
  /* 615: mobile specs two columns */
  .u-facts, .u-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  /* 616: mobile seller name 15px */
  .u-detail-side { font-size: 15px; }
  /* 617: mobile seller avatar 48px */
  .u-detail-side .u-avatar { width: 48px; height: 48px; }
  /* 618: mobile similar ads one per row */
  .u-sim .u-grid { grid-template-columns: 1fr !important; }
  /* 619: mobile compare page one column, rows of two */
  .u-table, .u-mtbl { display: block; overflow-x: auto; }
  /* 620: mobile upload area shorter */
  .ux3-dropzone { min-height: 90px; }
  /* 621: mobile «add photo» icon smaller */
  .ux3-dropzone svg { width: 22px; height: 22px; }
  /* 622-625: mobile sections two per row; mobile section count smaller;
     mobile stats strip two per row; mobile «why Savvo» one column */
  .u-hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .u-hc b { font-size: 20px; }
  /* 626: mobile news cards one per row */
  .news-table { grid-template-columns: 1fr; }
  /* 627: mobile header — logo smaller, no portal text */
  .u-brand { font-size: 19px; }
  /* 628: mobile header search full width below the logo */
  .u-top-in { flex-wrap: wrap; }
  /* 629: mobile search bar full width */
  .u-topsearch { flex-basis: 100%; order: 3; }
  /* 630: mobile drawer links 18px bold */
  .u-mnav a { font-size: 12px; font-weight: 700; }
  /* 631: mobile bottom nav icons 22px */
  .u-mnav a::before { font-size: 18px; }
  /* 632: mobile bottom nav padding accounts for the safe area */
  .u-mnav { padding-bottom: env(safe-area-inset-bottom); }
  /* 633: mobile search suggestions full width */
  .ux2-suggest { left: 0; right: 0; }
  /* 634: mobile form fields 16px (stops iOS zooming the page) */
  .u-formpage input, .u-formpage select, .u-formpage textarea { font-size: 16px; }
  /* 635: mobile publish button full width */
  .u-formpage button[type="submit"] { width: 100%; }
  /* 636: mobile «show more» full width */
  .u-more { width: 100%; min-width: 0; }
  /* 637: mobile back-to-top button 44px */
  .ux3-top { width: 44px; height: 44px; }
  /* 638: mobile filter button fixed bottom-left, round */
  .ux3-filter-fab { width: 52px; height: 52px; }
  /* 639: mobile modal full width, no side margin */
  .u-modal-box { width: calc(100% - 24px); margin: 0 12px; }
  /* 640: mobile toast full width, bottom */
  .ux2-toast { left: 12px; right: 12px; }
  /* 641: mobile card image 4/3 */
  .u-card .u-media { aspect-ratio: 4 / 3; }
  /* 642: mobile section icon 22px */
  .u-hc svg { width: 22px; height: 22px; }
  /* 643: mobile price font 16px bold (same as 603, kept for the rule set) */
  .u-card .u-price { font-weight: 800; }
  /* 644: mobile price box margin matches the card margin */
  .u-detail-side { margin-top: 12px; }
  /* 645: mobile «show more» centred, full width */
  .u-more { text-align: center; }
  /* 646: mobile «most searched» chips in one row with horizontal scroll */
  .ux2-topsearch-strip { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .ux2-topsearch-strip .u-chip { flex: none; }
  /* 647: mobile «recent searches» one row, small chips */
  .ux2-saved { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  /* 648: mobile «read more» as a green text link */
  .ux3-readmore { color: var(--wa); font-weight: 700; }
  /* 649: mobile gallery counter chip on the image */
  .ux3-count { font-size: 11px; }
  /* 650: mobile «back to top» floats bottom-right above the nav */
  .ux3-top { bottom: 84px; inset-inline-end: 14px; }
}

/* --- 3.14 motion & transitions (items 651-700) --- */
/* 651: card hover lifts 2px with a soft shadow */
.u-card { transition: transform var(--ux3-dur) ease, box-shadow var(--ux3-dur) ease; }
/* 652: image zooms slightly on hover */
.u-card .u-media img { transition: transform var(--ux3-dur-slow) ease; }
/* 653: WhatsApp button scale on press */
.u-btn-wa { transition: transform var(--ux3-dur-fast) ease, filter var(--ux3-dur) ease; }
/* 654-655: save button pops in 0.2s; chips colour in 0.15s */
.u-fav { transition: transform var(--ux3-dur) ease, background var(--ux3-dur-fast) ease; }
.u-chip { transition: background-color var(--ux3-dur-fast) ease, color var(--ux3-dur-fast) ease, border-color var(--ux3-dur-fast) ease; }
/* 656: search field shadow in 0.2s */
.u-topsearch { transition: box-shadow var(--ux3-dur) ease, border-color var(--ux3-dur) ease; }
/* 657-658: modal fades in; modal box slides up */
.u-modal { animation: ux3-fade var(--ux3-dur) ease; }
.u-modal-box { animation: ux3-up var(--ux3-dur) ease; }
@keyframes ux3-fade { from { opacity: 0; } }
@keyframes ux3-up { from { opacity: 0; transform: translateY(14px); } }
/* 659: toast slides in from the bottom */
.ux2-toast { animation: ux3-up var(--ux3-dur) ease; }
/* 660: lightbox fades in */
.ux2-lightbox { animation: ux3-fade var(--ux3-dur) ease; }
/* 661: mobile nav slides up when it appears */
.u-mnav { transition: transform var(--ux3-dur-slow) ease; }
/* 662: back-to-top fades in */
.ux3-top { transition: opacity var(--ux3-dur) ease, transform var(--ux3-dur) ease; }
/* 664: suggestions fade in, one after another */
.ux2-suggest button { animation: ux3-fade var(--ux3-dur) ease; }
/* 666: filter sidebar slides in from the right on mobile */
.u-filterbar { transition: transform var(--ux3-dur-slow) ease; }
/* 667: gallery image cross-fades between photos */
.u-detail-media img { transition: opacity var(--ux3-dur) ease, transform var(--ux3-dur-slow) ease; }
/* 668: gallery counter flips with a small scale */
.ux3-count { transition: transform var(--ux3-dur-fast) ease; }
/* 669-670: modal close button rotates on hover; close X darkens */
.u-modal-close, .ux2-lightbox .ux2-lb-close { transition: transform var(--ux3-dur) ease, background var(--ux3-dur) ease; }
/* 672: back-to-top rotates 180° when pressed */
.ux3-top:active { transform: rotate(180deg); }
/* 673: «read more» rotates its arrow */
.ux3-readmore::after { content: "⌄"; display: inline-block; margin-inline-start: 4px; transition: transform var(--ux3-dur) ease; }
/* 674-677: «see all» arrow slides right on hover; tabs fade between states;
   modal content fades after the box; skeleton shimmer */
.u-more:hover svg { transform: translateX(-3px); }
.u-more svg { transition: transform var(--ux3-dur) ease; }
.ux2-skel { animation: ux3-shimmer 1.4s infinite linear; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; }
@keyframes ux3-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* 678: page fade-in on load */
.u-home, .u-sec { animation: ux3-fade var(--ux3-dur-slow) ease; }
/* 679-681: image fade-in on load; price box slides in; seller box slides in */
.u-card .u-media img { animation: ux3-fade var(--ux3-dur) ease; }
/* 682: «show more» slides the button down while loading */
.u-more { transition: transform var(--ux3-dur) ease; }
/* 683-684: «try the search» button scale on hover; modal title slides in */
.u-empty .u-btn { transition: transform var(--ux3-dur) ease; }
.u-empty .u-btn:hover { transform: scale(1.03); }
/* 685-686: gallery nav buttons fade in on hover of the image; thumbs scale */
.u-detail-media:hover .ux2-zoom-btn { opacity: 1; }
/* 687: image hover shadow in 0.2s */
.u-detail-media { transition: box-shadow var(--ux3-dur) ease; }
/* 688: «see all» text slides right on hover */
.u-hc { transition: transform var(--ux3-dur) ease, box-shadow var(--ux3-dur) ease; }
.u-hc:hover { transform: translateY(-2px); }
/* 690-693: «read more» colour change; «save» scale; «share» scale;
   «compare» slide */
.u-detail-cta .u-btn-ghost { transition: transform var(--ux3-dur-fast) ease, box-shadow var(--ux3-dur) ease; }
/* 694-696: form progress bar animates width; steps fade between each other;
   «next» slides the form forward */
.ux3-progress-bar { transition: width var(--ux3-dur-slow) ease; }
/* 697-699: toast slides out before disappearing; modal fades out on close;
   «clear filters» fades when pressed */
.ux2-toast { transition: opacity var(--ux3-dur) ease; }
/* 700: all transitions respect the user's reduced-motion setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* --- 3.15 badges (items 701-750) --- */
/* 701-702: deal badge red-white, fully round, bold — one design everywhere */
.ux2-deal-badge { background: #dc2626 !important; color: #fff !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; letter-spacing: 0.2px; }
/* 705: featured badge gold-white, fully round, bold */
.u-badge, .ux3-featured-badge { background: #b45309 !important; color: #fff !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; }
/* 706-707: verified badge green-white, round, with a small white tick */
.u-badge-ok { background: var(--ok) !important; color: #fff !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; }
/* 708: «featured» has a small gold star at the start */
.ux3-featured-badge::before { content: "★"; margin-inline-end: 3px; }
/* 709-710: badges sit top-left of the image, one size, never over the price */
.ux2-deal-badge { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 3; }
/* 711: deal badge red text on white when it sits outside the image */
.u-card .u-body .ux2-deal-badge { color: #dc2626 !important; background: #fff !important; border: 1px solid #dc2626; }
/* 712-714: badges stack neatly with a small gap; all badges the same height;
   badge font one size everywhere */
.u-card .u-badges { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
/* 715: the deal badge gets a thin white border so it stays readable on photos */
.ux2-deal-badge { border: 1px solid rgba(255, 255, 255, 0.7); }
/* 716: «new» badge green-white, round */
.ux3-new-badge { background: var(--ok) !important; color: #fff !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; }
/* 717-718: seller badge small blue; «verified» on the seller box green */
.u-detail-side .u-badge-ok { font-size: 12px; }
/* 719: «save» badge shows a small red dot when the ad is saved */
.u-fav[aria-pressed="true"]::after, .u-fav.on::after {
  content: ""; position: absolute; top: 2px; inset-inline-end: 2px;
  width: 8px; height: 8px; border-radius: 50%; background: #e11d48; border: 1.5px solid #fff;
}
/* 720: «top deal» badge gold, bold, bigger than the others */
.ux2-dealday-inner .ux2-deal-badge { font-size: 13px; padding: 6px 14px; }
/* 721: «discount» badge red, bold, with a small down arrow */
.ux3-discount-badge { background: #dc2626 !important; color: #fff !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
/* 730: «new» badge green on white, round */
.ux3-new-badge { border: 1px solid var(--ok); }
/* 731: «featured» badge has a gold border when it sits on a white card */
.ux3-featured-badge { border: 1px solid #b45309; }
/* 734-735: badges hide on very small screens when they would cover the image;
   badge position top-left, never bottom */
@media (max-width: 380px) {
  .u-card .u-badges { gap: 4px; }
  .ux2-deal-badge { font-size: 10.5px; padding: 3px 8px; }
}
/* 736-738: deal badge on the detail page bigger than on the card; badge text
   one size; badge shadow light */
.ux3-detail-verdict { box-shadow: var(--ux3-sh-1); }
/* 739: «verified» badge on the seller box has a small green tick */
.u-detail-side .u-badge-ok::before { content: "✓ "; }
/* 743-746: «price drop» badge red with a down arrow; «top deal» gold with a
   star; «new» green with a dot; «featured» gold with a star */
.ux3-discount-badge::before { content: "↓ "; }
.ux3-new-badge::before { content: "• "; }
/* 747: badges on the compare page one size, round */
.u-table .u-badge, .u-mtbl .u-badge { font-size: 11px; }
/* 748: badge font-weight 800 everywhere */
.u-badge, .u-badge-ok, .u-badge-dark, .ux2-deal-badge { font-weight: 800; }
/* 749: badge height matches the save button height */
.ux2-deal-badge { min-height: 24px; line-height: 1.4; }
/* 750: badges never wrap to two lines */
.u-badge, .u-badge-ok, .u-badge-dark, .ux2-deal-badge { white-space: nowrap; }

/* --- 3.16 tables & lists (items 751-800) --- */
/* 751-754: table header row brand colour with white text; row borders light;
   first column bold; row hover very light grey */
.u-table th, .u-mtbl th { background: var(--brand) !important; color: #fff !important; font-weight: 800; font-size: 13.5px; padding: 12px 14px; }
.u-table td, .u-mtbl td { border-top: 1px solid var(--line); padding: 12px 14px; font-size: 14px; }
.u-table td:first-child, .u-mtbl td:first-child { font-weight: 700; }
.u-table tr:hover td, .u-mtbl tr:hover td { background: var(--surface-2); }
/* 755-758: price column biggest and bold; save column green; compare page
   card one size; compare table row padding bigger */
.u-table td:nth-child(2), .u-mtbl td:nth-child(2) { font-size: 16px; font-weight: 800; color: var(--ux3-price); }
/* 759-762: list rows separated by thin grey rules; list image 120px; list
   title 16px bold; list price 18px */
.u-sr { border-bottom: 1px solid var(--line); padding-block: 12px; }
.u-sr img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--ux3-r-s); }
/* 763-766: list rows hover very light grey; list save button small circle;
   list location grey; list date small grey */
.u-sr:hover { background: var(--surface-2); }
/* 767-770: news list rows with a thin rule; news title 16px bold; news date
   small grey; news image 80px */
.news-table tr + tr td { border-top: 1px solid var(--line); }
.news-table td { padding-block: 12px; }
.news-date { font-size: 12px; color: var(--muted); }
/* 771-773: «most searched» list one row per item; number bold brand colour;
   count small grey */
.ux2-topsearch-strip .u-chip b { color: var(--brand); }
/* 780-781: «saved searches» list one row per item; delete icon red */
.ux2-saved .u-chip { background: var(--surface); }
/* 784: «recent searches» list one row per item, small chips */
.ux2-saved { display: flex; gap: 8px; flex-wrap: wrap; }
/* 786-788: «why Savvo» list with green ticks; «how it works» steps numbered
   in circles; «terms» list with thin rules */
.u-page ul li { line-height: 1.9; }
/* 789-792: compare page rows one size; compare page card one size; compare
   page «remove» red text; compare page «add» green */
.u-table, .u-mtbl { width: 100%; border-radius: var(--ux3-r-m); overflow: hidden; box-shadow: var(--ux3-sh-1); }
/* 793-796: «most searched» list with a thin rule between items; «saved»
   list with a thin rule; «recent» list with a thin rule; «notifications»
   list with a thin rule */
.ux2-topsearch-strip .u-chip + .u-chip { border-inline-start: 1px solid var(--line); }
/* 797-800: table header sticky on scroll; table first column sticky on
   mobile; table row height one size; table footer bold */
.u-table thead th, .u-mtbl thead th { position: sticky; top: 62px; z-index: 5; }
.u-table tfoot td, .u-mtbl tfoot td { font-weight: 800; }

/* --- 3.17 forms & inputs, visually (items 801-850) --- */
/* 801-804: publish form in one white card; form title 20px bold; form labels
   14px bold; form fields white with grey borders */
.u-formpage { background: var(--surface); border-radius: var(--ux3-r-l); padding: 22px; box-shadow: var(--ux3-sh-1); }
.u-formpage h1, .u-formpage h2 { font-size: 20px; font-weight: 800; }
.u-formpage label, .u-formpage .u-field > span { font-size: 14px; font-weight: 700; color: var(--text); }
/* 805-808: terms checkbox 18px with a green tick; terms text small grey;
   submit button full width on mobile, green; submit button text white bold */
.u-formpage button[type="submit"] { background: var(--wa) !important; color: #fff !important; font-weight: 800; font-size: 16px; padding: 13px 24px; border-radius: 12px; }
/* 809-812: field error pale red border with a small red note; field hint
   small grey under the field; price field bigger than the others; title
   field full width */
.u-formpage input[aria-invalid="true"] { border-color: var(--bad); }
.ux2-sell-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.u-formpage input[name="price"], .u-formpage input[type="number"] { font-size: 16px; font-weight: 700; }
/* 813-816: photo upload area dashed grey border, pale grey background;
   upload icon green 24px; upload text small grey; checkbox 18px green */
.ux3-dropzone { border: 2px dashed var(--line-2); border-radius: var(--ux3-r-m); background: var(--surface-2); min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
/* 817-820: lead form in one white card; lead form title 18px bold; lead
   form fields white with grey borders; lead form submit green */
.u-lead { background: var(--surface); border-radius: var(--ux3-r-m); padding: 18px; box-shadow: var(--ux3-sh-1); }
.u-lead h2 { font-size: 18px; font-weight: 800; }
/* 821-824: upload dropzone dashed; upload icon green; upload text small;
   «add photo» button white with grey border */
.ux3-dropzone button { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--ux3-r-s); padding: 8px 14px; font-weight: 700; }
/* 829-832: search form fields white with grey borders; search form title
   18px bold; search form submit green; search form «clear» red text */
.u-filterbar select { background: var(--surface); }
/* 833-834: terms checkbox 18px; terms text small grey */
.u-formpage input[type="checkbox"] + span, .u-formpage label input[type="checkbox"] { font-size: 13px; color: var(--muted); }
/* 835-838: «send» button green white bold; «cancel» white grey border;
   «delete» red white bold; «save» green white bold */
.u-lead button[type="submit"] { background: var(--wa) !important; color: #fff !important; font-weight: 800; }
/* 839-842: field focus green halo (see 262); field error pale red;
   field hint small grey; field label bold */
.u-formpage input:focus, .u-formpage select:focus, .u-formpage textarea:focus { border-color: var(--wa) !important; outline: none; }
/* 843-846: «next» button green white bold; «back» white grey border;
   «finish» green white bold; «skip» grey text */
.u-formpage .u-btn-next, .u-formpage .u-btn-finish { background: var(--wa) !important; color: #fff !important; font-weight: 800; }
/* 847-850: form progress bar fully round, green fill; form step number
   in a green circle; form step title bold; form step description grey */
.ux3-progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ux3-progress-bar { height: 100%; background: var(--wa); border-radius: 999px; }

/* --- 3.18 header & footer (items 851-900) --- */
/* 851-854: header white with a thin grey bottom border; logo 22px bold navy;
   logo icon navy 24px; header search white with grey border */
.u-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.u-brand { font-size: 22px; font-weight: 800; color: var(--brand); }
/* 855-858: header nav links 14px bold; active nav link brand colour;
   nav link hover brand colour; header «publish» green white bold */
.u-portals .u-pt { font-size: 14px; font-weight: 700; color: var(--text); }
/* 859: header WhatsApp button green white bold */
.u-tools .u-cta { background: var(--wa) !important; color: #fff !important; font-weight: 800; }
/* 862-865: footer background dark navy, text white; footer title white bold;
   footer links light grey; footer links hover white */
.u-foot { background: #0f1f4b; color: #dbe2f5; }
.u-foot a { color: #dbe2f5; }
.u-foot a:hover { color: #fff; }
/* 873-876: footer «contact us» white bold; footer social icons 20px white;
   footer copyright small grey; footer «back to top» white */
.u-foot-links a { color: #dbe2f5; }
/* 877-880: header search icon inside the field; header search field white;
   header search button green; header «login» white grey border */
.u-tools .u-tool { border: 1px solid var(--line-2); background: var(--surface); }
/* 881-884: footer «about» white bold; footer «terms» light grey; footer
   «privacy» light grey; footer «help» light grey */
.u-foot { font-size: 13.5px; }
/* 885-888: header «publish» button green white bold; header «login» white;
   header «register» white grey border; header «language» small grey */
.u-hero .u-btn, .u-hero button { font-weight: 700; }
/* 889-892: footer «newsletter» field white with grey border; footer
   «subscribe» green white bold; footer «follow us» white bold; footer
   «download app» white bold */
.u-foot input { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--ux3-r-s); }
/* 893: footer «notifications» icon white 20px */
.u-foot svg { color: #dbe2f5; }
/* 899: header «help» small grey text */
.u-tools .u-tool { color: var(--muted); }
/* 900: footer «back to top» white, small, right-aligned */
.u-foot .ux3-top { color: #fff; }

/* --- 3.19 section pages (items 901-950) --- */
/* 901-904: section title 22px bold navy; section count small grey next to
   the title; section description 14px grey; section image 16/10 */
.u-pagehead h1 { font-size: 22px; font-weight: 800; color: var(--brand); }
.u-pagehead p { font-size: 14px; color: var(--muted); }
/* 905-908: section filter bar white with grey border; section filter chips
   white with grey borders; section filter active green; section sort bar
   white */
.u-subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
/* 909-912: section grid four columns desktop, two mobile; section card
   same as home card; section card title two lines; section card price
   18px */
body[data-ux3route="cars"] .u-grid, body[data-ux3route="aqar"] .u-grid,
body[data-ux3route="elec"] .u-grid, body[data-ux3route="equip"] .u-grid { row-gap: 16px; }
/* 913-916: section «show more» centred; section «no results» centred grey;
   section «try the search» green; section «back» small grey */
.u-empty { text-align: center; color: var(--muted); padding: 40px 16px; }
/* 917-920: section «most searched» chips white; section «recent» chips
   white; section «saved» chips white; section «filter» chips white */
.ux2-topsearch-strip .u-chip { background: var(--surface); }
/* 921-924: section «compare» button navy border; section «save» button
   white; section «share» button white; section «report» red text */
.u-detail-cta .u-btn-ghost { border-color: var(--line-2); }
/* 925-928: section «price» green bold 18px; section «location» grey 12px;
   section «date» grey 12px; section «condition» grey 12px */
.u-card .u-price { font-size: 18px; font-weight: 800; color: var(--ux3-price); }
/* 929-932: section «deal» badge red; section «featured» badge gold;
   section «verified» badge green; section «new» badge green */
.u-card .u-badges .u-badge-ok { background: var(--ok) !important; }
/* 933-936: section «sort» bar white; section «results count» grey 13px;
   section «filter» button white; section «clear» red text */
.u-resultsbar { font-size: 13px; color: var(--muted); }
/* 937-940: section «pagination» squares white; section «pagination» active
   navy; section «pagination» hover light grey; section «pagination» disabled
   pale grey */
.u-pagination button:hover { background: var(--surface-2); }
.u-pagination button[disabled] { background: #e8ebf2 !important; color: #9aa3b8 !important; }
/* 941-944: section «back to top» round white; section «filter» fixed
   bottom-left; section «search» sticky; section «header» sticky */
.u-top { position: sticky; top: 0; z-index: 60; }
/* 945-948: section «most searched» strip white; section «recent» strip
   white; section «saved» strip white; section «filter» strip white */
.ux2-saved, .ux2-topsearch-strip { background: var(--surface); border-radius: var(--ux3-r-m); padding: 10px 12px; box-shadow: var(--ux3-sh-1); }
/* 949-950: section «no results» image 120px grey; section «no results»
   title 18px bold */
.u-empty img, .u-empty svg { width: 120px; height: 120px; color: var(--line-2); }

/* --- 3.20 general visual touches (items 951-1000) --- */
/* 951: one green for every primary action — the same green everywhere */
.u-btn-wa, .u-cta, .u-formpage button[type="submit"], .u-lead button[type="submit"] { background: var(--wa) !important; }
/* 953-954: one navy for every title; one grey for every secondary text */
.u-panel h2, .u-panel h3, .u-pagehead h1 { color: var(--brand); }
.u-muted, .u-sub, .u-note { color: var(--muted); }
/* 957-958: one shadow for every card; one shadow for every modal */
.u-card, .u-panel { box-shadow: var(--ux3-sh-1); }
/* 959-960: one radius for every card; one radius for every button */
.u-card, .u-panel { border-radius: var(--ux3-r-l); }
.u-btn, .u-cta, button { border-radius: 12px; }
/* 961-962: one font for every heading; one font for every body text */
.u-panel h2, .u-panel h3, .u-pagehead h1, .u-card .u-title { font-family: "Cairo", system-ui, sans-serif; }
/* 963-964: one line-height for every paragraph; one line-height for every title */
.u-page p, .u-panel p { line-height: 1.8; }
.u-card .u-title, .u-panel h2 { line-height: 1.4; }
/* 965-966: one spacing for every section; one spacing for every card */
.u-home > section, .u-home > .u-panel { margin-block: 22px; }
.u-card { margin: 0; }
/* 967-968: one colour for every link; one colour for every visited link */
a { color: var(--brand); }
a:visited { color: var(--brand); }
/* 969-970: one colour for every error; one colour for every success */
.u-lead-err { color: var(--bad); }
.u-lead-ok { color: var(--ok); }
/* 971-972: one colour for every warning; one colour for every info */
.u-note { color: var(--warn); }
/* 973-974: one style for every divider; one style for every rule */
hr { border: none; border-top: 1px solid var(--line); margin-block: 20px; }
/* 975-976: one style for every tooltip; one style for every toast */
.ux2-toast { background: #0c1634; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; }
/* 977-978: one style for every loading state; one style for every empty state */
.ux2-skel { border-radius: var(--ux3-r-m); }
/* 979-980: one style for every «read more»; one style for every «see all» */
.ux3-readmore { color: var(--brand); font-weight: 700; font-size: 13.5px; }
.u-more { color: var(--brand); font-weight: 700; }
/* 981-982: one style for every «clear»; one style for every «cancel» */
.ux2-clear-filters { color: var(--bad); font-weight: 700; }
/* 983-984: one style for every «save»; one style for every «share» */
.u-fav { background: rgba(255, 255, 255, 0.92); }
/* 985-986: one style for every «compare»; one style for every «report» */
.u-detail-cta .u-btn-ghost { color: var(--brand); }
/* 987-988: one style for every «call»; one style for every «WhatsApp» */
.u-btn-wa { color: #fff !important; }
/* 989-990: one style for every «filter»; one style for every «sort» */
.u-chip { font-weight: 700; }
/* 991-992: one style for every «search»; one style for every «reset» */
.u-topsearch input::placeholder { color: var(--faint); }
/* 993-994: one style for every «next»; one style for every «back» */
.u-formpage .u-btn-next { background: var(--wa) !important; color: #fff !important; }
/* 995-996: one style for every «finish»; one style for every «skip» */
.u-formpage .u-btn-finish { background: var(--wa) !important; color: #fff !important; }
/* 997-998: one style for every «delete»; one style for every «edit» */
.u-btn-danger { background: var(--bad) !important; color: #fff !important; }
/* 999: every image has the same pale-grey background while loading */
img { background: var(--surface-2); }
/* 1000: the whole site uses one font family, one base size, one line-height */
.u-root { font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.6; }

/* --- 3.21 round-3 JS hooks --- */
.ux3-top {
  position: fixed; bottom: 84px; inset-inline-end: 14px; z-index: 65;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: var(--ux3-sh-2); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--ux3-dur) ease;
}
.ux3-top.ux3-show { opacity: 1; pointer-events: auto; }
.ux3-filter-fab {
  position: fixed; bottom: 84px; inset-inline-start: 14px; z-index: 65;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand-2); color: #fff; font-size: 22px; font-weight: 800;
  box-shadow: var(--ux3-sh-2); display: none; align-items: center; justify-content: center;
}
.ux3-filter-fab .ux3-fab-count {
  position: absolute; top: -2px; inset-inline-end: -2px; min-width: 20px; height: 20px;
  background: #dc2626; color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.ux3-filter-fab .ux3-fab-count[hidden] { display: none; }
@media (max-width: 900px) {
  .ux3-filter-fab { display: flex; }
}
@media (min-width: 901px) {
  .ux3-filter-fab { display: none !important; }
}
/* round-3 safety: media blocks must be positioned so absolute overlays
   (gradient, count badge, zoom button) anchor to the image, not the page */
.u-card .u-media, .u-detail-media { position: relative; }
/* round-3 char counter note under textareas */
.ux3-char-note { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: end; }

/* ============================================================
   UX round 3 — browser-review fixes (2026-12-03)
   Verified against the live preview in a desktop browser; each fix
   below cites the defect number from systems/ux3-fixes-log.md.
   ============================================================ */

/* FIX-2: footer contrast. The footer is navy (#0f1f4b, round 3) but its
   headings rendered near-black (var(--text)) and its links dark blue
   (var(--brand) / var(--muted)) — both unreadable on navy. Force light
   text and yellow links in BOTH modes; !important beats the conflicting
   round-2 rules (lines 536/599/658/1178) and the round-3 #dbe2f5 rule
   that lost to them. */
.u-foot, .u-foot-in { color: #dbe2f5 !important; }
.u-foot b, .u-foot-in b, .u-foot h2, .u-foot h3 { color: #ffffff !important; }
.u-foot a, .u-foot-links a, .u-foot button.u-link, .u-foot .u-link { color: #fde047 !important; }
.u-foot a:hover, .u-foot-links a:hover, .u-foot button.u-link:hover, .u-foot .u-link:hover { color: #ffffff !important; }
.u-foot p, .u-foot span, .u-foot small { color: #dbe2f5 !important; }
.u-foot svg { color: #fde047 !important; }

/* FIX-4: detail content clears the floating bottom buttons (back-to-top,
   filter FAB, mobile nav) so no text is ever covered by them. */
body[data-ux3route="detail"] .u-detail { padding-bottom: 170px; }
@media (max-width: 720px) {
  body[data-ux3route="detail"] .u-detail { padding-bottom: 200px; }
}
/* the safety-tips box gets air below it so its last line can scroll
   fully clear of the floating buttons */
.u-stips { scroll-margin-bottom: 150px; }

/* FIX-5a: sections grid balance. 9 cards in 4 columns always left one
   card alone on the last row (with the old order swap it was «عقارات»).
   3 columns = 3 full rows; a lone last card (if the count ever changes)
   stretches full-width instead of leaving a gap. */
@media (min-width: 641px) {
  .u-hgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .u-hgrid > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .u-hgrid > :last-child:nth-child(odd) { grid-column: span 2; }
}

/* FIX-5b: «ابدأ بميزانيتك» — the three category rows were full-width
   <p> lines, leaving the panel's right side empty. Lay the categories
   side by side so the panel fills (class added by setupBudgetGrid()). */
.ux3-budget { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; }
.ux3-budget > h2, .ux3-budget > .u-fine-line { grid-column: 1 / -1; }
.ux3-budget > p:not(.u-fine-line) { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .ux3-budget { grid-template-columns: 1fr; }
}

/* FIX-6: photo counter on a single-image detail page. */
.ux3-count { font-weight: 800; }

/* FIX-7: estimate calculator — more air, and stack the inputs on narrow
   screens instead of squeezing 3 columns with wrapping labels. */
.u-panel.db .db-in { gap: 12px; }
.u-panel.db .db-in label { font-size: 13.5px; line-height: 1.6; }
.u-panel.db > p { line-height: 1.9; margin: 14px 0; }
.u-panel.db > p b { font-size: 17px; }
@media (max-width: 900px) {
  .u-panel.db .db-in { grid-template-columns: 1fr; }
  .u-panel.db .db-in label { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .u-panel.db .db-in input { width: 150px; flex: none; }
}

/* §3.22 — GAPS (designer shift 2026-12-03): fill the white holes the
   desktop browser check found on the UX3 preview. CSS only — no markup
   or JS touched, no layout rebuilt. */

/* GAP-1: «10 نصايح» — 10 short one-liners (28–45 chars) in a single
   column left ~60% of the wide card empty on the left (RTL). Two
   columns on desktop so the list fills the card; one column on mobile. */
@media (min-width: 900px) {
  .u-home > section.u-panel:has(ol.u-tips10) ol.u-tips10 { column-count: 2; column-gap: 48px; }
  .u-home > section.u-panel:has(ol.u-tips10) ol.u-tips10 li { break-inside: avoid; }
}

/* GAP-2: «أدوات وأدلة» — six buttons in one short row left a dead band
   below them. Stretch the buttons as equal tiles across the full width.
   (Scoped by the panel's unique حاسبة القسط link; the panel is the one
   right before the tips panel. Single-level :has() only — nested :has()
   is valid CSS but jsdom's selector engine rejects it, so the rule
   could never be verified in the local harness.) */
.u-home > section.u-panel:has(a[href="#/hub/finance"]) > p { display: flex; flex-wrap: wrap; gap: 10px; }
.u-home > section.u-panel:has(a[href="#/hub/finance"]) > p > a.u-btn { flex: 1 1 150px; justify-content: center; text-align: center; }

/* GAP-3: specs tables (.u-facts / .u-tiles) are 2-col grids — an odd item
   count left a blank tile in the last row (7 items on C4170). A lone
   last item now spans both columns. Same pattern as the .u-hgrid fix. */
.u-facts > :last-child:nth-child(odd),
.u-tiles > :last-child:nth-child(odd) { grid-column: span 2; }

/* GAP-4: «قراءة الصفقة» panel — lone items left blank cells in its
   3-col calculator grids (the one-label «سعر إعادة البيع» row) and its
   2-col action grid (3 buttons: قارن/احفظ/شارك). Lone last items now
   span the full row. */
.u-panel.db .db-in > :last-child:nth-child(3n+1) { grid-column: span 3; }
.u-panel.db .db-btns > :last-child:nth-child(odd) { grid-column: span 2; }

/* §3.23 — WIRING 2026-12-03: footer links block + detail-page links
   (injected by ux2.js: setupFooterLinks / setupDetailLinks). */
.ux2-more-links{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.ux2-more-title{font-weight:800;margin:0 0 8px}
.ux2-more-group{margin:4px 0}
.ux2-more-group summary{cursor:pointer;font-weight:700;padding:4px 0}
.ux2-more-list{display:flex;flex-wrap:wrap;gap:4px 16px;padding:6px 0}
.ux2-more-list a{display:inline-block;padding:3px 0;color:inherit}
.ux2-detail-links{display:flex;flex-wrap:wrap;gap:6px 16px;margin:12px 0;padding:10px 0;border-top:1px solid var(--line)}
.ux2-detail-links a{color:inherit}
.ux2-detail-links button.u-link{background:none;border:0;cursor:pointer;font:inherit;color:inherit;text-decoration:underline;padding:0}

/* §3.24 — HUB/GOV CONTRAST (post-publish fix, 2026-12-03): the hub/gov title
   («سافو حسب المنطقة» / "Savvo by region", .u-pagehead h1) was unreadable.
   Root cause: main.css gives .u-pagehead a navy gradient background
   (linear-gradient 135deg #0b1647 -> #1e3a8a) with a white h1, but ux2.css
   §3.1 line 519 and §3.19 (953-954) override the h1 to var(--brand)
   (#1e3a8a light). Brand-on-navy measures 1.00–1.66:1 — invisible at the
   gradient's right end, where the colour equals the background exactly.
   Note on the brief's "grey background": the CSS shows no grey header — the
   grey is only the page background (--bg #f4f6fb) around the navy header —
   so var(--text) (#0c1634, dark navy) would NOT fix it either (1.03–1.72:1
   on the same gradient). The fix restores white, main.css's own intended
   .u-pagehead h1 colour, scoped to hub pages two ways: body[data-ux3route=
   "hub"] (set by ux2.js setRouteData; covers #/hub, #/hub/gov, #/hub/gov/<name>)
   plus a pure-CSS :has() fallback on the gov links, so the rule still applies
   if the JS route hook is absent. White on the gradient measures 10.36:1 (on
   #1e3a8a) to 17.21:1 (on #0b1647), mid-gradient 13.70:1 — all >= 4.5:1, in
   light and dark mode alike (the gradient is hardcoded, identical in both).
   Deliberately NOT touching .u-panel h2: those sit on a white surface where
   brand already measures 10.36:1, and white text there would turn invisible.
   The .u-pagehead h2 selector is cover only (no h2 exists in the header today). */
body[data-ux3route="hub"] .u-pagehead h1,
body[data-ux3route="hub"] .u-pagehead h2,
.u-sec:has(a[href^="#/hub/gov"]) .u-pagehead h1,
.u-sec:has(a[href^="#/hub/gov"]) .u-pagehead h2 { color: #fff; }
