/* ---------- RTL / Arabic overrides ---------- */

/* Redefine the theme font tokens so every var(--font)/var(--font-display) rule uses Cairo */
html[dir="rtl"] {
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cairo', system-ui, sans-serif;
}

body {
  direction: rtl;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

[dir="rtl"] body,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea,
[dir="rtl"] .header-tool,
[dir="rtl"] .nav-inner {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] body:not(.admin-body) .desktop-nav .nav-inner,
html[dir="rtl"] body:not(.admin-body) .desktop-nav a {
  letter-spacing: 0;
}

/* Force Cairo on headings that hardcode Georgia/serif in the base stylesheet */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .logo span,
[dir="rtl"] .brand-title,
[dir="rtl"] .section h2,
[dir="rtl"] .section-head h2,
[dir="rtl"] .shop-hero h1,
[dir="rtl"] .page-title,
[dir="rtl"] .account-hello,
[dir="rtl"] .product-info h1,
[dir="rtl"] .cart-item h3,
[dir="rtl"] .summary-card h3,
[dir="rtl"] .auth-box h1,
[dir="rtl"] .newsletter-section h2,
[dir="rtl"] .quick-grid h2,
[dir="rtl"] .empty-state h2,
[dir="rtl"] .mega-menu h4,
[dir="rtl"] .drawer-head h3,
[dir="rtl"] .mobile-menu h3 {
  font-family: 'Cairo', system-ui, sans-serif;
}

/* Text alignment */
[dir="rtl"] .breadcrumbs,
[dir="rtl"] .product-info,
[dir="rtl"] .filter-group,
[dir="rtl"] .field label,
[dir="rtl"] .summary-card,
[dir="rtl"] .account-panel,
[dir="rtl"] .order-info-block {
  text-align: right;
}

/* Inputs / selects text direction */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
  text-align: right;
}
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="number"] {
  text-align: right;
  direction: ltr;
}

/* Number/price rows keep LTR feel */
[dir="rtl"] .price-row,
[dir="rtl"] .product-price,
[dir="rtl"] .hero-dots {
  direction: ltr;
}

/* Marquee should stay LTR (already dir=ltr in markup) */

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 5px 12px;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}
.lang-switch:hover { opacity: .75; }

/* Toast stack flips side in RTL */
[dir="rtl"] .toast-stack { right: auto; left: 20px; }

/* Free shipping bar direction */
[dir="rtl"] .free-shipping-bar span { float: right; }
