/**
 * HQPrinter – WooCommerce RTL hardening
 * Product / Cart / Checkout / Account / Mini-cart
 */

body.rtl.woocommerce,
body.rtl.woocommerce-page,
body.rtl.woocommerce-cart,
body.rtl.woocommerce-checkout,
body.rtl.woocommerce-account,
body.rtl.single-product {
	direction: rtl;
}

/* ---------- Product page ---------- */
body.rtl.single-product .product .summary,
body.rtl.single-product .product .entry-summary,
body.rtl .product .product-detail,
body.rtl .product .product-content {
	text-align: right;
	direction: rtl;
}

body.rtl.single-product .woocommerce-product-gallery {
	direction: rtl;
}

body.rtl .quantity,
body.rtl .cart .quantity,
body.rtl.single-product form.cart .quantity {
	/* Keep stepper LTR so minus stays left and plus stays right (arrows point outward). */
	direction: ltr;
	unicode-bidi: isolate;
}

body.rtl.single-product form.cart {
	direction: rtl;
}

body.rtl .quantity .qty {
	text-align: center;
	direction: ltr;
}

/* If any global RTL icon mirror flips chevrons, restore them. */
body.rtl .quantity .quantity-button i,
body.rtl .quantity .quantity-button [class*="klb-icon-chevron"] {
	transform: none;
}

body.rtl.single-product .product_meta,
body.rtl.single-product .woocommerce-tabs,
body.rtl.single-product .related.products,
body.rtl.single-product .upsells.products {
	direction: rtl;
	text-align: right;
}

body.rtl.single-product .woocommerce-tabs ul.tabs {
	direction: rtl;
	text-align: right;
}

body.rtl.single-product .woocommerce-tabs ul.tabs li {
	float: right;
	margin: 0 0 0 0.5em;
}

body.rtl .star-rating {
	float: right;
	letter-spacing: 0;
}

body.rtl .woocommerce-product-rating .star-rating {
	margin-left: 0.5em;
	margin-right: 0;
}

/* ---------- Shop / loops ---------- */
body.rtl ul.products,
body.rtl .products {
	direction: rtl;
}

body.rtl .products .product,
body.rtl .product-wrapper {
	text-align: right;
}

body.rtl .woocommerce-ordering,
body.rtl .woocommerce-result-count {
	direction: rtl;
}

body.rtl .woocommerce-ordering {
	float: left;
}

body.rtl .woocommerce-result-count {
	float: right;
}

/* ---------- Cart ---------- */
body.rtl.woocommerce-cart .woocommerce,
body.rtl .woocommerce-cart-form,
body.rtl .cart-collaterals,
body.rtl .cart_totals {
	direction: rtl;
	text-align: right;
}

body.rtl table.shop_table th,
body.rtl table.shop_table td {
	text-align: right;
}

body.rtl table.shop_table .product-remove {
	text-align: left;
}

body.rtl .cart-collaterals .wc-proceed-to-checkout {
	text-align: right;
}

body.rtl .coupon .input-text {
	float: right;
	margin-left: 0.5em;
	margin-right: 0;
}

body.rtl .coupon button {
	float: right;
}

/* ---------- Mini cart ---------- */
body.rtl .woocommerce-mini-cart,
body.rtl .widget_shopping_cart,
body.rtl .site-mini-cart,
body.rtl .cart-dropdown {
	direction: rtl;
	text-align: right;
}

body.rtl .woocommerce-mini-cart-item img {
	float: right;
	margin-left: 1em;
	margin-right: 0;
}

body.rtl p.woocommerce-mini-cart__buttons {
	direction: rtl;
}

/* ---------- Checkout ---------- */
body.rtl.woocommerce-checkout .woocommerce,
body.rtl.woocommerce-checkout .col2-set,
body.rtl.woocommerce-checkout #customer_details,
body.rtl.woocommerce-checkout #order_review,
body.rtl.woocommerce-checkout .woocommerce-billing-fields,
body.rtl.woocommerce-checkout .woocommerce-shipping-fields,
body.rtl.woocommerce-checkout .woocommerce-additional-fields {
	direction: rtl;
	text-align: right;
}

body.rtl.woocommerce-checkout .form-row,
body.rtl.woocommerce-checkout .woocommerce-input-wrapper {
	direction: rtl;
	text-align: right;
}

body.rtl.woocommerce-checkout #payment,
body.rtl.woocommerce-checkout .payment_methods,
body.rtl.woocommerce-checkout .place-order {
	direction: rtl;
	text-align: right;
}

body.rtl.woocommerce-checkout .payment_methods li {
	text-align: right;
}

body.rtl.woocommerce-checkout #place_order {
	float: none;
	width: 100%;
}

body.rtl .woocommerce-checkout-review-order-table th,
body.rtl .woocommerce-checkout-review-order-table td {
	text-align: right;
}

body.rtl.woocommerce-checkout .select2-container {
	direction: rtl;
	text-align: right;
}

/* Keep card numbers / emails readable LTR when typed */
body.rtl.woocommerce-checkout input[type="email"],
body.rtl.woocommerce-checkout input[type="tel"],
body.rtl.woocommerce-checkout input[autocomplete="cc-number"],
body.rtl.woocommerce-checkout input[name*="card"] {
	direction: ltr;
	text-align: left;
}

/* ---------- Account / login ---------- */
body.rtl.woocommerce-account .woocommerce,
body.rtl.woocommerce-account .woocommerce-MyAccount-navigation,
body.rtl.woocommerce-account .woocommerce-MyAccount-content,
body.rtl .woocommerce-form-login,
body.rtl .woocommerce-form-register {
	direction: rtl;
	text-align: right;
}

body.rtl.woocommerce-account .woocommerce-MyAccount-navigation {
	float: right;
}

body.rtl.woocommerce-account .woocommerce-MyAccount-content {
	float: left;
}

@media (max-width: 768px) {
	body.rtl.woocommerce-account .woocommerce-MyAccount-navigation,
	body.rtl.woocommerce-account .woocommerce-MyAccount-content {
		float: none;
		width: 100%;
	}
}

/* ---------- Notices ---------- */
body.rtl .woocommerce-message,
body.rtl .woocommerce-info,
body.rtl .woocommerce-error,
body.rtl ul.woocommerce-error {
	direction: rtl;
	text-align: right;
}

/* ---------- Prices stay LTR digits ---------- */
body.rtl .price,
body.rtl .amount,
body.rtl .woocommerce-Price-amount {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}
