/*
 * Arkan RTL — auto-loaded by WordPress when is_rtl().
 * Fonts flip at the token level: everything referencing --serif/--sans follows.
 */

html[dir='rtl'] {
  --serif: 'El Messiri', serif;
  --sans: 'Tajawal', sans-serif;
}

/* Arabic reads best without the Latin uppercase tracking. */
html[dir='rtl'] body {
  letter-spacing: 0;
}

html[dir='rtl'] input,
html[dir='rtl'] textarea,
html[dir='rtl'] select {
  text-align: right;
}

/* ---- Mirrored absolute corners (the prototype mirrors these explicitly) ---- */

/* Header cart badge: top -5 / right -6 → left -6 */
html[dir='rtl'] .arkan-cart-badge {
  right: auto;
  left: -6px;
}

/* Product card badge: top 14 / left 14 → right 14 */
html[dir='rtl'] .arkan-card__badge {
  left: auto;
  right: 14px;
}

/* Mobile drawer close: top 22 / right 22 → left 22 */
html[dir='rtl'] .arkan-drawer__close {
  right: auto;
  left: 22px;
}

/* Mini-cart drawer slides from the left in RTL */
html[dir='rtl'] .arkan-minicart {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.25);
}

html[dir='rtl'] .arkan-minicart.is-open {
  transform: translateX(0);
}

/* Footer newsletter: joined input+button seam flips */
html[dir='rtl'] .arkan-footer__input {
  border-right: 1px solid rgba(44, 36, 32, 0.2);
  border-left: none;
}

/* Search overlay price pushes to the row end */
html[dir='rtl'] .arkan-search__price {
  margin-left: 0;
  margin-right: auto;
}

/* Sort select chevron sits on the reading-end */
html[dir='rtl'] .arkan-sort select {
  padding: 10px 18px 10px 40px;
}

html[dir='rtl'] .arkan-sort__chevron {
  right: auto;
  left: 16px;
}

/* Directional arrows point the other way */
html[dir='rtl'] .arkan-btn svg,
html[dir='rtl'] .arkan-minicart__shop svg {
  transform: scaleX(-1);
}
