/* Arabic typography + RTL touch-ups.
   Loaded last so it wins over both style.css and style.rtl.css. */

html[dir="rtl"] {
  /* Fredoka/Jost have no Arabic coverage. Tajawal carries the whole Arabic
     side — headings and body — so the page reads as one voice. */
  --title-font: "Tajawal", sans-serif;
  --body-font: "Tajawal", sans-serif;
}

html[dir="rtl"] body {
  font-family: var(--body-font);
}

/* Arabic sits lower on the line and needs a little more room than Latin */
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"] .section-title__title {
  font-family: var(--title-font);
  line-height: 1.5;
}

html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] a {
  line-height: 1.9;
}

/* Latin-only strings that stay LTR inside Arabic copy (prices, phone numbers,
   the wordmark itself) must not get reordered by the bidi algorithm. */
html[dir="rtl"] .cart-page__item-price,
html[dir="rtl"] .cart-page__item-subtotal,
html[dir="rtl"] .cart-page__totals-value,
html[dir="rtl"] .checkout-page__order-summary-item-price,
html[dir="rtl"] .checkout-page__order-summary-totals-value,
html[dir="rtl"] [class*="__content1-dollar"],
html[dir="rtl"] [class*="__content2-dollar"],
html[dir="rtl"] [class*="price"] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* the price sidebar keeps its from/to inputs in reading order */
html[dir="rtl"] .shop-sidebar__price-input {
  direction: ltr;
  text-align: right;
}

/* the language toggle keeps its own labels in their native faces */
html[dir="rtl"] .lang-toggle__opt[data-lang-set="en"] {
  font-family: "Jost", sans-serif;
}
