/* ============================================================
   Savvo design refresh — DEV COPY ONLY (files/savvo-v2-design)
   Ahmed: the live site looks AI-made; the problem is the look,
   formatting, layout, order and cleanliness — NOT the data.
   This file is loaded LAST (after main.css / ux2.css /
   fixes-visual.css) so it overrides the stacked template styles.
   It uses the existing CSS variables, so light + dark themes
   keep working. No data, prices or copy are changed here.
   ============================================================ */

/* ---------- 1. Typography: IBM Plex Sans Arabic ---------- */
html, body, .u-root {
  font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
body { font-size: 15px; line-height: 1.65; }
h1, h2, h3 { letter-spacing: 0; }
h2 { font-size: 19px; font-weight: 700; margin-block-end: 14px; }

/* ---------- 2. Header: quiet, business-like ---------- */
.u-top-in { padding: 8px 20px; gap: 16px; }
.u-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 18px; color: #fff; }
.u-brand-tx b { font-size: 18px; }
.u-pt { border-radius: 8px; font-size: 14px; padding: 7px 12px; }
.u-pt.on { background: transparent; color: var(--brand); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- 3. Hero: flat, start-aligned, search-first ----------
   Was: blue radial gradient + yellow glow, giant 48px yellow logo,
   yellow pill, yellow tagline, giant yellow CTA — the classic
   AI-landing-page look. Now: white, calm, like a real marketplace. */
.u-hero { background: var(--surface) !important; color: var(--text); border-block-end: 1px solid var(--line); }
.u-hero::before, .u-hero-in::before { display: none !important; }
.u-hero-in { max-width: 1240px; padding: 34px 20px 30px; text-align: start; justify-items: start; gap: 10px; }
.u-hero-pill { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; padding: 3px 12px; }
.u-homelogo { font-size: 32px !important; font-weight: 800; color: var(--text); line-height: 1.2; }
.u-homelogo::after { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 2px; margin-inline-start: 8px; }
.u-hero-tag { font-size: 16px; font-weight: 600; color: var(--muted); margin: 0 0 6px; text-align: start; }
.u-hero-two { grid-template-columns: auto auto; justify-content: start; width: auto; max-width: none; margin: 0 0 6px; gap: 10px; }
.u-hero-two a { min-height: 46px; border-radius: 10px; font-size: 15px; font-weight: 700; padding: 0 22px; }
.u-hero-buy { background: var(--brand); color: var(--on-brand); }
.u-hero-sell { background: var(--surface); color: var(--brand); border: 1px solid var(--brand); }
.u-hero-cta { display: inline-flex; width: auto; max-width: none; min-height: 0; background: none; color: var(--brand); font-size: 15px; font-weight: 700; border-radius: 0; padding: 0; box-shadow: none; gap: 6px; }
.u-hero-cta:hover { text-decoration: underline; }
.u-hero .u-search { width: 100%; max-width: 640px; }

/* ---------- 4. Search bar: the visual anchor ---------- */
.u-search { background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; min-height: 52px; padding: 0 16px; }
.u-search input { height: 50px; font-size: 15px; color: var(--text); }
.u-search input::placeholder { color: var(--faint); }

/* ---------- 5. Cards: dense, calm, price-first ----------
   Was: 20px radius, 4/3 media, gradient no-photo placeholder,
   blue 22px price, lift-on-hover — uniform template cards. */
.u-grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.u-card { border-radius: 12px; box-shadow: none; }
.u-card:hover { transform: none; box-shadow: 0 2px 10px rgba(12, 22, 52, .08); border-color: var(--line-2); }
.u-media { aspect-ratio: 16 / 10; }
.u-media-flat { aspect-ratio: 16 / 10; }
.u-nophoto { background: var(--surface-2); }
.u-nophoto svg { width: 28px; height: 28px; }
.u-title { font-weight: 600; line-height: 1.5; }
.u-price { font-size: 19px; color: var(--text); font-variant-numeric: tabular-nums; }
.u-fav { width: 32px; height: 32px; }
.u-badges { inset-block-start: 8px; inset-inline-start: 8px; }
.ux2-deal-badge { border-radius: 6px; box-shadow: none; }

/* ---------- 6. Stat / category tiles: flat, no rainbow gradients ---------- */
.u-hc { background: var(--surface) !important; box-shadow: none !important; border: 1px solid var(--line); border-radius: 12px; }
.u-hc::before, .u-hc::after { display: none !important; }
.u-hc b { font-size: 18px; }
.u-hc-n { font-size: 24px !important; color: var(--text) !important; }
.u-hgrid .u-hc:first-child,
.u-hgrid .u-hc:nth-child(1), .u-hgrid .u-hc:nth-child(2),
.u-hgrid .u-hc:nth-child(3), .u-hgrid .u-hc:nth-child(4) { background: var(--surface) !important; }
.u-dark .u-hc { background: var(--surface) !important; }

/* ---------- 7. Sections: one rhythm, aligned widths ---------- */
.u-sec { padding: 26px 20px 36px; }
.ux2-topsearch-strip, .ux2-saved, .ux2-dealday { max-width: 1240px; padding: 0 20px; }
.ux2-topsearch-strip h3, .ux2-saved h3 { font-size: 15px; font-weight: 700; margin-block-end: 10px; }
.ux2-dd-tag { border-radius: 6px; }

/* ---------- 8. Footer: a real business footer ---------- */
.u-foot { background: #0b1230; border-block-start: 3px solid var(--accent); color: #a3afd0; }
.u-foot-in { padding: 30px 20px; }
.u-foot b { color: #fff; font-size: 16px; }
.u-foot .u-link { color: #c6cee6; font-size: 13.5px; margin-inline-start: 0; margin-inline-end: 18px; }
.u-foot .u-link:hover { color: #fff; }

/* ---------- 9. Hub page heads: solid navy, no gradient ---------- */
html.ux3-hub .u-pagehead,
body[data-ux3route="hub"] .u-pagehead,
.u-sec:has(a[href^="#/hub/gov"]) .u-pagehead { background: #0b1647; }

/* ---------- 10. Emoji leftovers: never show an emoji icon ---------- */
.ux2-ic { display: none !important; }
a[data-nav] { font-size: 13px; font-weight: 700; }

/* ---------- 11. Mobile: denser, like a real marketplace app ---------- */
@media (max-width: 640px) {
  .u-hero-in { padding: 26px 16px 24px; }
  .u-homelogo { font-size: 28px !important; }
  .u-hero-two { grid-template-columns: 1fr 1fr; width: 100%; }
  .u-hero-two a { padding: 0 10px; }
  .u-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .u-price { font-size: 17px; }
  .u-top-in { padding: 8px 14px; gap: 12px; }
  .u-sec { padding: 20px 14px 28px; }
}
