/* =============================================================================
   ZHAR MAISON — RTL Overrides
   -----------------------------------------------------------------------------
   Loaded in addition to style.css when <html dir="rtl">.
   Mirrors layout-direction properties (logical properties already used
   everywhere in style.css, so this file mainly covers edge cases that need
   physical-property treatment).
   ============================================================================= */

/* Inherit Arabic font globally for RTL mode */
html[dir="rtl"],
html[dir="rtl"] body {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

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: var(--font-arabic);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

html[dir="rtl"] .eyebrow,
html[dir="rtl"] .btn,
html[dir="rtl"] .site-header__brand small,
html[dir="rtl"] .nav-primary,
html[dir="rtl"] .site-header__utils,
html[dir="rtl"] .article__meta,
html[dir="rtl"] .breadcrumb,
html[dir="rtl"] .product-card__role,
html[dir="rtl"] .collection-filters button,
html[dir="rtl"] .lang-toggle,
html[dir="rtl"] .link-arrow,
html[dir="rtl"] .email-form__label,
html[dir="rtl"] .email-form__submit,
html[dir="rtl"] .countdown__label,
html[dir="rtl"] .countdown__num small,
html[dir="rtl"] .frame__caption,
html[dir="rtl"] .hero__scroll-cue,
html[dir="rtl"] .site-footer__col h3,
html[dir="rtl"] .article__related h3,
html[dir="rtl"] .announcement,
html[dir="rtl"] .craft__beat-tag,
html[dir="rtl"] .product-card__price small {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

/* Hero scrolldown cue — keep centred */
html[dir="rtl"] .hero__scroll-cue {
  letter-spacing: 0;
}

/* Buttons — keep arrow direction intuitive (still goes right-to-left visually) */
html[dir="rtl"] .btn--arrow::after {
  content: "←";
}

/* Re-anchor the close mobile-menu button on the leading edge (right in RTL) */
html[dir="rtl"] .mobile-nav__close {
  inset-inline-end: auto;
  inset-inline-start: 1.25rem;
}

/* Skip link sits on the inline-start edge */
html[dir="rtl"] .skip-link { left: auto; right: 1rem; }
html[dir="rtl"] .skip-link:focus { right: 1rem; }

/* Bullet markers re-anchor in lists */
html[dir="rtl"] .article__body ul { padding-inline-start: 1.25rem; }

/* Ensure forms read right-to-left */
html[dir="rtl"] input,
html[dir="rtl"] textarea {
  text-align: right;
  direction: rtl;
}

/* Re-mirror the countdown numbers so they still read left-to-right */
html[dir="rtl"] .countdown {
  direction: ltr;
}

/* Blockquote border on the leading edge */
html[dir="rtl"] .article__body blockquote {
  padding-inline-start: 1.5rem;
  border-inline-start: 2px solid var(--c-zhar-500);
}

/* SVG arrows: flip them for RTL */
html[dir="rtl"] svg[role="presentation"] {
  transform: scaleX(-1);
}

/* Footer bottom legal links re-flow */
html[dir="rtl"] .site-footer__legal {
  justify-content: flex-start;
}

/* =============================================================================
   v3 RTL additions
   ============================================================================= */

/* Cart drawer panel re-anchors to the leading edge (left in RTL) */
html[dir="rtl"] .cart-drawer__panel {
  inset-inline-end: auto;
  inset-inline-start: 0;
}

/* Dropdown menu still centred on the trigger in RTL */
html[dir="rtl"] .nav-dropdown__menu {
  transform: translateX(50%);
}
html[dir="rtl"] .nav-dropdown[aria-expanded="true"] .nav-dropdown__menu {
  transform: translateX(50%);
}

/* Craft and retired details layouts share the alternating pattern in RTL */
/* Product gallery thumbs stay grid-flex in RTL */
html[dir="rtl"] .product-info__meta-item { direction: rtl; }

/* Form fields keep RTL input direction */
html[dir="rtl"] .form-field input,
html[dir="rtl"] .form-field select,
html[dir="rtl"] .form-field textarea {
  text-align: right;
}

/* Our Story: the opening statement is serif in Latin, so it takes the Arabic
   serif here instead of falling back to a system face (and never slants). */
html[dir="rtl"] .story__copy .lead {
  font-family: var(--font-arabic);
  font-style: normal;
}

/* Noto Naskh needs a little more leading than the Latin stack, including where
   the story copy sets its own tighter rhythm. */
html[dir="rtl"] .story__copy p {
  line-height: 1.9;
}
