/* =========================================================================
   StarFroid — RTL overrides (brief §5, §7)
   Loaded only when is_rtl(). Layouts already use CSS logical properties
   (margin-inline, inset-inline, padding-inline) so they mirror automatically;
   this file handles ONLY what logical properties can't: physical transforms,
   directional shadows/gradients, icon mirroring, and a few third-party
   (Woo/Astra) selectors that ship physical left/right values.
   ========================================================================= */

/* Body font already switched to Cairo in base.css via [dir="rtl"]/.starfroid-rtl. */

/* ---- Directional icons (chevrons, arrows, cart-trail) ---- */
.sf-icon--dir { transform: scaleX(-1); }

/* Mini-cart drawer: base CSS already pins it to the inline-end side, which is
   the LEFT under RTL. Only the hide transform needs flipping — it's physical and
   not mirrored by `dir`, so push the closed drawer off the LEFT edge. (Do NOT
   re-anchor here: re-anchoring to the right while translating -100% left leaves
   the closed drawer sitting on screen with no way to dismiss it.) */
.sf-drawer { transform: translateX(-100%); }
.sf-drawer.is-open { transform: translateX(0); }

/* Mobile category drawer slides from the right (start side) in RTL. */
.sf-nav-drawer { transform: translateX(100%); }
.sf-nav-drawer.is-open { transform: translateX(0); }

/* Menu-row chevrons point left under RTL (base rule points right). */
.sf-nav-drawer__menu a::after { transform: rotate(-135deg); }

/* ---- FiboSearch (header search): mirror physical directional bits ---- */
/* The navy submit button moves to the inline-end (LEFT under RTL) via flex order,
   but its corner rounding and the preloader/voice icon offset are physical and
   don't flip. Round the button's LEFT corners so it fits the pill, and mirror the
   icon offset from right to left. */
.sf-search .dgwt-wcas-search-submit { border-radius: 999px 0 0 999px !important; }
.sf-search .dgwt-wcas-voice-search,
.sf-search .dgwt-wcas-preloader { right: auto !important; left: 78px !important; }

/* Hero: flip any subtle directional gradient/overlay. */
.sf-hero__media { transform: scaleX(1); } /* keep imagery un-mirrored */

/* Product card "sale" / badge corner — handled via inset-inline already.
   Quantity stepper minus/plus order is visual-only and fine under RTL. */

/* ---- WooCommerce bits that hardcode left/right ---- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product { text-align: start; }

.woocommerce .star-rating { float: right; }
.woocommerce .star-rating::before,
.woocommerce .star-rating span::before { right: 0; left: auto; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	padding-inline-start: 3.5rem;
	padding-inline-end: 1.5rem;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	inset-inline-start: 1.25rem;
	inset-inline-end: auto;
}

/* Checkout summary stays on the end side via grid; nothing to flip here. */

/* Astra default menu sometimes left-aligns submenu carets — normalise. */
.starfroid-rtl .main-header-menu .sub-menu { text-align: start; }

/* Sticky single-product CTA bar: keep price at start, button at end (flex
   already mirrors). Ensure box-shadow direction stays neutral (vertical). */
.sf-sticky-cta { box-shadow: 0 -4px 16px rgba(14, 44, 73, .10); }
