/**
 * RTL adjustments.
 *
 * Most of the theme uses logical properties (inset-inline, margin-inline,
 * text-align: start), so this file only fixes what cannot be expressed
 * logically — transforms, arrow glyphs, and the places where WooCommerce core
 * hard-codes left and right.
 */

/* Disclosure chevron and carousel arrows point the other way. */

.fa-chevron {
	border-inline-end: 0;
	border-inline-start: 2px solid var(--fa-ink-3);
	border-bottom: 2px solid var(--fa-ink-3);
	transform: rotate(-45deg);
}

.fa-breakdown-toggle[aria-expanded="true"] .fa-chevron {
	transform: rotate(-225deg);
}

.fa-rail-prev { inset-inline-start: -14px; }
.fa-rail-next { inset-inline-end: -14px; }

.fa-burger-bars::before,
.fa-burger-bars::after {
	inset-inline-start: 0;
	left: auto;
}

/* WooCommerce core floats and margins. */

.rtl.woocommerce div.product .woocommerce-product-gallery,
.rtl.woocommerce div.product .summary,
.rtl.woocommerce ul.products li.product {
	float: none;
	margin-right: 0;
	margin-left: 0;
}

.rtl.woocommerce span.onsale {
	right: 10px;
	left: auto;
}

.rtl.woocommerce ul.products li.product .price del {
	margin-right: 0;
	margin-left: 6px;
}

.rtl.woocommerce .woocommerce-ordering,
.rtl.woocommerce-page .woocommerce-ordering {
	float: left;
}

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

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

.rtl .woocommerce-breadcrumb { direction: rtl; }

/* Machine-readable strings stay left-to-right inside an Arabic page. */

.fa-search input[type="search"],
.fa-field input[type="url"],
.fa-legal span,
.fa-topbar-phone {
	direction: ltr;
	text-align: right;
}

.rtl .fa-bar-value,
.rtl .fa-compare-value,
.rtl .fa-breakdown-body dd,
.rtl .fa-why-row strong,
.rtl .fa-why-figure,
.rtl .fa-promo-figure,
.rtl .fa-tile-figure,
.rtl .woocommerce ul.products li.product .price,
.rtl .woocommerce div.product p.price {
	direction: ltr;
	unicode-bidi: isolate;
}

/* Product prices sit at the start of the line in both directions. */

.rtl .woocommerce ul.products li.product .price,
.rtl .woocommerce div.product p.price {
	text-align: right;
}
