/* ==========================================================================
   RTL overrides — loaded only for right-to-left locales (Arabic).
   The dir="rtl" attribute on <html> handles inline flow, default text
   alignment, flexbox/grid axis mirroring and list markers automatically.
   Component CSS uses logical `text-align: start`, so it flips on its own.
   This file covers the Arabic webfont and the few physical-direction rules
   that do not auto-mirror.
   ========================================================================== */

/* --- Arabic typography --- */
html[dir="rtl"],
html[dir="rtl"] body {
  font-family: "Cairo", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .btn,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  font-family: "Cairo", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Arabic reads slightly larger/looser for legibility */
html[dir="rtl"] body {
  line-height: 1.85;
}

/* --- Language switcher dropdown: anchor to the left edge in RTL --- */
html[dir="rtl"] .lang-dropdown-menu {
  right: auto;
  left: 0;
}

/* --- Floating action buttons stay bottom-right (house rule), so keep them.
   Only the WhatsApp/back-to-top icons need no change. --- */

/* --- Breadcrumb chevrons / inline separators mirror automatically via dir,
   but Font Awesome chevrons that point right should point left in RTL. --- */
html[dir="rtl"] .breadcrumb i.fa-chevron-right,
html[dir="rtl"] .breadcrumb-separator i {
  transform: scaleX(-1);
}

/* --- "Read more"/CTA arrows that point right should point left in RTL --- */
html[dir="rtl"] .btn i.fa-arrow-right,
html[dir="rtl"] .btn i.fa-chevron-right,
html[dir="rtl"] a i.fa-arrow-right {
  transform: scaleX(-1);
}

/* --- Numeric/price strings and tel/email stay LTR even inside RTL text --- */
html[dir="rtl"] .price,
html[dir="rtl"] [href^="tel:"],
html[dir="rtl"] [href^="mailto:"],
html[dir="rtl"] time {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}
