/* =============================================================================
 * QUANTITY CONTROL AND ADD-TO-CART ROW — ARABIC (RIGHT-TO-LEFT) ORDER
 * =============================================================================
 * Component: The "- 1 +" quantity pill (.rbt-qty-area) and the row that holds it
 *            next to the Add to cart button (.product-btn-grp).
 * Owner:     Parent theme markup; Rainbow Store cart module scripts.
 * Scope:     Arabic pages (body.rtl): product page, quick view, the cart-edit
 *            popup, the cart page and the cart drawer. English pages are untouched.
 *
 * WHAT THE SHOPPER SEES NOW
 *   Inside the pill:   "+" at the RIGHT, the number in the middle, "-" at the LEFT.
 *   Product page row:  the quantity pill at the LEFT, Add to cart at the RIGHT.
 *   Both match the way Arabic is read: the main action sits where the eye starts
 *   (the right) and "+" is on the same side as "next".
 *
 * WHY THE ORDER WAS WRONG
 *   The markup is written for left-to-right: [ - ] [ number ] [ + ] and
 *   [ quantity ] [ Add to cart ]. A flex row simply mirrors in a right-to-left page,
 *   so "-" landed at the right, "+" at the left, and the quantity beside the
 *   right-hand edge instead of Add to cart. The old attempt to fix the row in
 *   rtl/rtl-core.css targeted ".prodbtn-grp", a class that does not exist
 *   (the real one is ".product-btn-grp"), so it never applied; it has been removed.
 *
 * THIS IS ONLY A VISUAL REORDER
 *   "flex-direction: row-reverse" changes where the pieces are DRAWN. The "+"
 *   button is still the one with the increase handler (.qty-item-btn-incr) and "-"
 *   the one with the decrease handler (.qty-item-btn-decr), in assets/js/
 *   quantity-buttons.js and the plugin scripts, so pressing "+" still adds one.
 *   The document order, and so the keyboard order, is not changed.
 * ========================================================================== */

/* "+" at the right, "-" at the left. */
body.rtl .rbt-qty-area {
    flex-direction: row-reverse;
}

/* Quantity pill at the left, Add to cart at the right (the parent theme already
   makes this group a flex row with a 16px gap). */
body.rtl .product-btn-grp {
    flex-direction: row-reverse;
}

/* The two together were 13px wider than the column (150px pill + 16px gap + a
   197px button in a 350px column), so the row stuck out past the right edge once
   Add to cart moved there. The pill keeps its size and the button takes whatever
   room is left, so the row ends exactly at the column edge, at any width. */
body.rtl .product-btn-grp .rbt-qty-area {
    flex: 0 0 auto;
}

body.rtl .product-btn-grp .single_add_to_cart_button {
    flex: 1 1 0;
    min-width: 0;
}
