/* =========================================================
   Saudi Doors typography system  [2026-11-28]
   One font (Cairo) + one size scale for the whole website.
   Mobile < 768px | Tablet 768-1023px | Desktop >= 1024px
   ========================================================= */
:root {
  --sd-font: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --sd-title: 1.5rem;      /* section title       24 / 28 / 34 */
  --sd-subtitle: 1.0625rem;/* card / item title   17 / 18 / 20 */
  --sd-eyebrow: 0.9375rem; /* small red label     15 / 16 / 18 */
  --sd-lead: 1rem;         /* intro paragraph     16 / 17 / 18 */
  --sd-body: 0.9375rem;    /* body text           15 / 16 / 16 */
  --sd-small: 0.8125rem;   /* meta / captions     13 / 14 / 14 */
}
@media (min-width: 768px) {
  :root { --sd-title: 1.75rem; --sd-subtitle: 1.125rem; --sd-eyebrow: 1rem; --sd-lead: 1.0625rem; --sd-body: 1rem; --sd-small: .875rem; }
}
@media (min-width: 1024px) {
  :root { --sd-title: 2.125rem; --sd-subtitle: 1.25rem; --sd-eyebrow: 1.125rem; --sd-lead: 1.125rem; --sd-body: 1rem; --sd-small: .875rem; }
}

/* One font everywhere, including buttons and form fields */
html, body, html[dir="ltr"], html[dir="rtl"],
button, input, select, textarea, h1, h2, h3, h4, h5, h6, p {
  font-family: var(--sd-font) !important;
}

/* Body text */
html body:not(#sd) p,
html body:not(#sd) li,
html body:not(#sd) h2.font-normal.text-light {
  font-size: var(--sd-body) !important;
  line-height: 1.85 !important;
}
html body:not(#sd) p.font-bold { font-weight: 700 !important; }

/* Intro / lead paragraphs (were text-xl) */
html body:not(#sd) p.text-xl,
html body:not(#sd) p[class*="rtl:text-xl"] {
  font-size: var(--sd-lead) !important;
  line-height: 1.85 !important;
}

/* Card and item titles (feature boxes, product cards, list titles) */
html body:not(#sd) h1.text-dark, html body:not(#sd) h2.text-dark, html body:not(#sd) h3.text-dark,
html body:not(#sd) h4, html body:not(#sd) h5, html body:not(#sd) h6,
html body:not(#sd) h2.text-xl, html body:not(#sd) h2.text-2xl {
  font-size: var(--sd-subtitle) !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
}

/* Section titles (main heading of each block) */
html body:not(#sd) h1.text-dark[class*="lg:text-3xl"], html body:not(#sd) h2.text-dark[class*="lg:text-3xl"],
html body:not(#sd) h1.text-dark[class*="lg:text-4xl"], html body:not(#sd) h2.text-dark[class*="lg:text-4xl"],
html body:not(#sd) .home-panel-title, html body:not(#sd) .certificates-title, html body:not(#sd) .real-map-title {
  font-size: var(--sd-title) !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

/* Small red label above a section title ("من نحن", "منتجات سعودي دورز") */
html body:not(#sd) h1.text-primary, html body:not(#sd) h2.text-primary, html body:not(#sd) h3.text-primary {
  font-size: var(--sd-eyebrow) !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
}

/* Meta text */
html body:not(#sd) small, html body:not(#sd) .text-xs { font-size: var(--sd-small) !important; }

/* Icon with a typo in its height class (h-[60xp]) that caused layout shift */
html body:not(#sd) img.h-\[60xp\] { height: 60px !important; width: 60px; }

/* keep card titles on the scale even if an old cached fonts.css is still in the browser */
html body:not(#sd) h1.text-dark.text-sm, html body:not(#sd) h2.text-dark.text-sm, html body:not(#sd) h3.text-dark.text-sm,
html body:not(#sd) h1.text-dark.lg\:text-base, html body:not(#sd) h2.text-dark.lg\:text-base, html body:not(#sd) h3.text-dark.lg\:text-base {
  font-size: var(--sd-subtitle) !important;
  line-height: 1.5 !important;
}

/* titles that use gray / white colour classes are section titles too */
html body:not(#sd) h1.font-bold.text-gray, html body:not(#sd) h1.font-bold.text-light,
html body:not(#sd) h2.font-bold.text-gray, html body:not(#sd) h2.font-bold.text-light {
  font-size: var(--sd-title) !important; line-height: 1.35 !important; font-weight: 800 !important;
}
/* product card titles without classes */
/* (classless h2 are descriptions: they keep body size) */
html body:not(#sd) h2:not([class]), html body:not(#sd) h2[class=""] { font-size: var(--sd-body) !important; line-height: 1.85 !important; font-weight: 400 !important; }
html body:not(#sd) h1:not([class]), html body:not(#sd) h1[class=""] {
  font-size: var(--sd-subtitle) !important; line-height: 1.5 !important; font-weight: 700 !important;
}

/* [speed 2026-11-28] reserve space so the page does not jump while images/video load */
html body:not(#sd) img.ad-image { display:block; width:100% !important; height:auto !important; aspect-ratio: 1900 / 500; }
@media (max-width: 480px) { html body:not(#sd) img.ad-image { aspect-ratio: 2365 / 2000; } }
html body:not(#sd) video[data-sd-lazy] { width:100% !important; height:auto !important; aspect-ratio: 720 / 1280; object-fit: cover; }
