/*
 * RTL overrides.
 * NOTE: This file lives in assets/css/ (not the theme root) and is intentionally
 * NOT named exactly "rtl.css" at the root — WordPress core auto-enqueues a second,
 * unversioned copy of any file literally at "{theme-root}/rtl.css" on RTL sites
 * (see wp-includes/theme.php locale_stylesheet()). Keeping it here avoids that
 * silent duplicate-loading collision. See inc/enqueue.php for the real enqueue call.
 *
 * Bootstrap 5.3 ships with a native RTL build (bootstrap.rtl.min.css) which we enqueue directly
 * (see inc/enqueue.php). This file only patches the small number of things Bootstrap's RTL build
 * and third-party libraries (Swiper, Select2-like widgets, WooCommerce) don't flip automatically.
 */

/*
 * NOTE ON ARROW DIRECTION: Swiper detects RTL itself (see `dir: 'rtl'` passed to every
 * Swiper() instance in assets/js/slider.js) and already mirrors its "next"/"prev" arrow
 * icons correctly for a right-to-left layout. We intentionally do NOT add a manual
 * scaleX(-1) flip here — combining that with Swiper's own RTL-aware icons double-flips
 * them, which is what previously made the arrows point the wrong way.
 */

/* WooCommerce star rating (LTR by default in core) */
.woocommerce .star-rating {
    direction: ltr;
    text-align: right;
    float: none;
    display: inline-block;
}

/* Quantity input +/- steppers */
.ds-qty-stepper {
    direction: ltr;
    display: inline-flex;
}

.ds-qty-stepper input.qty {
    text-align: center;
}

/* Offcanvas positioning/animation is handled natively and correctly by Bootstrap's own
   RTL build (bootstrap.rtl.min.css) via CSS logical properties. IMPORTANT: under RTL,
   ".offcanvas-start" resolves to the RIGHT edge (inline-start = right in RTL) and
   ".offcanvas-end" resolves to the LEFT edge — the OPPOSITE of what the class names
   suggest at first glance. Every offcanvas in this theme that should open from the
   right (cart drawer, mobile menu, filters) therefore uses ".offcanvas-start", not
   ".offcanvas-end". We intentionally do NOT re-declare transform/position here: an
   earlier duplicate rule here fought with Bootstrap's own transition classes and
   caused a visible jump/flash when opening or closing. Only non-conflicting cosmetic
   tweaks belong in this file. */

/* Breadcrumb separator direction */
.ds-breadcrumb .separator::before {
    content: "\\2039";
}
