/* =========================================================
   Abu Rashid Cars — base.css (Phase 03)
   Tokens, reset, typography, links, focus states.
   ========================================================= */

:root {
  /* Brand colors */
  --color-primary: #FFCC00;
  --color-primary-dark: #FFCC00;
  --color-primary-hover: #FFCC00;
  --color-primary-pressed: #FFCC00; /* FE-049: pressed/active state — darker than hover */
  --color-dark: #0B0F12;
  --color-dark-2: #0B0F12;
  --color-dark-hover: #0B0F12;
  --color-bg: #FFFFFF;
  --color-bg-soft: #FFFFFF;
  --color-white: #FFFFFF;
  --color-text: #0B0F12;
  --color-muted: #0B0F12;
  --color-border: rgba(11, 15, 18, 0.12);
  --color-border-strong: rgba(11, 15, 18, 0.12);
  --color-whatsapp: #FFCC00;
  --color-whatsapp-dark: #FFCC00;
  --color-danger: #0B0F12;
  --color-success: #FFCC00;
  --color-warning: #FFCC00;
  --color-info: #0B0F12;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(11, 15, 18, 0.06);
  --shadow-sm: 0 4px 12px rgba(11, 15, 18, 0.06);
  --shadow-md: 0 10px 25px rgba(11, 15, 18, 0.08);
  --shadow-lg: 0 18px 45px rgba(11, 15, 18, 0.12);
  --shadow-xl: 0 26px 60px rgba(11, 15, 18, 0.16);
  --shadow-yellow: 0 14px 32px rgba(255, 204, 0, 0.30);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --container: 1280px;
  --container-narrow: 1080px;
  --header-height: 80px;

  /* Motion */
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Cairo for both languages */
  --font-base: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"] body { line-height: 1.7; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-dark); }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

input, select, textarea, button { font-family: inherit; font-size: inherit; }

ul, ol { list-style: none; padding: 0; margin: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.2;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
  letter-spacing: 0;
  line-height: 1.35;
}

p { margin: 0; }

:focus-visible {
  outline: 3px solid #FFCC00;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.20);
}

/* FE-007: Ensure focus is visible on dark backgrounds (footer, admin sidebar/topbar) */
.site-footer :focus-visible,
.admin-sidebar :focus-visible,
.admin-topbar :focus-visible {
  outline-color: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.40);
}

/* Numbers stay LTR even in Arabic */
.num, .price, .installment { unicode-bidi: plaintext; }

/* Utilities */
.u-mt-0 { margin-top: 0 !important; }
.u-mt-2 { margin-top: var(--space-2) !important; }
.u-mt-4 { margin-top: var(--space-4) !important; }
.u-mt-6 { margin-top: var(--space-6) !important; }
.u-mt-8 { margin-top: var(--space-8) !important; }
.u-text-muted { color: var(--color-muted); }
.u-hidden { display: none !important; }
.u-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.u-text-center { text-align: center; }

/* حارس عام: أي تجاوز أفقي شارد لا يحرّك الصفحة (كان في public-extra.css ولا يصل لكل الصفحات) */
html, body { overflow-x: clip; }
