/* =====================================================================
   Shoebox New York — Arabic (RTL) layer. Loaded only on Arabic pages
   (helpers/i18n_helper.php sb_rewrite_html), after every other stylesheet.
   Flex/grid mirror by themselves under dir="rtl"; this file fixes the
   physical left/right rules, the Latin display fonts and arrow glyphs.
   ===================================================================== */

/* ---------- Typography ---------- */
html[dir="rtl"] {
  --primary-font: "Cairo", "Anton", sans-serif;
  --secondary-font: "Tajawal", "Cairo", "Inter", sans-serif;
}
html[dir="rtl"] body,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] button,
html[dir="rtl"] .btn {
  font-family: "Tajawal", "Cairo", "Inter", sans-serif;
}
/* Arabic letters must join: no tracking, no forced capitals, a little more line height */
html[dir="rtl"] body *:not(i):not(.fa):not([class*="fa-"]):not(svg):not(svg *) {
  letter-spacing: 0 !important;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
  font-family: "Cairo", "Tajawal", sans-serif;
  line-height: 1.35;
}
/* Anton-set display headings: Cairo Black reads with the same weight */
html[dir="rtl"] [style*="Anton"],
html[dir="rtl"] .sb-hero-headline,
html[dir="rtl"] .footer-heading {
  font-family: "Cairo", sans-serif !important;
  font-weight: 900;
  line-height: 1.25;
}
/* Brand names, model names, SKUs, prices, emails and phone numbers stay Latin and LTR */
html[dir="rtl"] [lang="en"],
html[dir="rtl"] .ltr,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"] {
  direction: ltr;
  unicode-bidi: isolate;
}
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"] { text-align: right; }

/* ---------- Direction-aware glyphs ---------- */
html[dir="rtl"] .sb-arrow,
html[dir="rtl"] .fa-arrow-right, html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-chevron-right, html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-angle-right, html[dir="rtl"] .fa-angle-left,
html[dir="rtl"] .fa-long-arrow-right, html[dir="rtl"] .fa-arrow-right-long {
  display: inline-block;
  transform: scaleX(-1);
}

/* ---------- Text alignment helpers that ignore dir ---------- */
html[dir="rtl"] .text-left, html[dir="rtl"] .text-md-left { text-align: right !important; }
html[dir="rtl"] .text-right, html[dir="rtl"] .text-md-right { text-align: left !important; }


/* ---------- Listing pages ---------- */
html[dir="rtl"] .product_list_sort { padding-right: .5rem; padding-left: 2.25rem; }
html[dir="rtl"] #sort + *, html[dir="rtl"] .rounded-pill > span { white-space: nowrap; }
/* Floating buttons swap sides: WhatsApp bottom-left, mobile "Show filters" bottom-right */
html[dir="rtl"] .whatsapp.position-fixed { right: auto !important; left: 1.5rem !important; }
html[dir="rtl"] #showResFilterMenu { left: auto !important; right: 1rem !important; }
html[dir="rtl"] .backTop { right: auto; left: 2rem; }
html[dir="rtl"] .sb-lang-switch-mobile { direction: rtl; }
