/* ===================================================================
   Lunite — RTL refinements (Persian / Arabic)
   =================================================================== */

html[dir='rtl'] body {
	font-feature-settings: 'ss01';
}

/* Numbers stay Latin in Persian contexts by default; allow opt-in font stack */

html[dir='rtl'] .lunite-hero-title,
html[dir='rtl'] .woocommerce-products-header .product_title,
html[dir='rtl'] h1, html[dir='rtl'] h2, html[dir='rtl'] h3,
html[dir='rtl'] h4, html[dir='rtl'] h5, html[dir='rtl'] h6 {
	letter-spacing: 0;
}

/* select arrow flips with direction automatically via logical props,
   but the custom arrow is positioned with physical calc() — mirror it */
html[dir='rtl'] select {
	background-position: calc(0.85em) 50%, calc(1.2em) 50%;
}

/* Payment icons & badges stay physical */
html[dir='rtl'] .woocommerce ul.payment_methods .payment_box p {
	direction: rtl;
	text-align: right;
}

/* Star ratings are LTR glyph sequences */
html[dir='rtl'] .star-rating,
html[dir='rtl'] .lunite-stars .star-rating {
	direction: ltr;
	unicode-bidi: bidi-override;
}

/* Progress-less dots on slider thumbs */
html[dir='rtl'] .flexslider .flex-direction-nav a {
	transform: scaleX(-1);
}

/* Pagination arrows flip */
html[dir='rtl'] .woocommerce nav.woocommerce-pagination .prev,
html[dir='rtl'] .woocommerce nav.woocommerce-pagination .next {
	transform: scaleX(-1);
	display: inline-block;
}

/* Correct em-dash spacing */
html[dir='rtl'] .footer-copyright,
html[dir='rtl'] .entry-meta {
	unicode-bidi: plaintext;
}

/* Ensure form-row floats go the natural RTL way */
html[dir='rtl'] .woocommerce form .form-row-first,
html[dir='rtl'] .woocommerce form .form-row-last {
	float: right;
	margin-inline: 0;
}

html[dir='rtl'] .woocommerce form .form-row-first {
	margin-left: 1.1rem;
	margin-right: 0;
}

html[dir='rtl'] .woocommerce form .form-row-last {
	margin-right: 0;
	margin-left: 0;
}

@media (max-width: 680px) {
	html[dir='rtl'] .woocommerce form .form-row-first,
	html[dir='rtl'] .woocommerce form .form-row-last {
		float: none;
		margin-left: 0;
	}
}

/* Smooth scroll for anchor links in RTL stays fine with scroll-behavior. */

/* Admin bar offset */
html[dir='rtl'] .admin-bar .site-header {
	top: 32px;
}

/* Price del/ins keep natural order */
html[dir='rtl'] .woocommerce ul.products li.product .price del,
html[dir='rtl'] .woocommerce div.product p.price del {
	margin-inline-start: 0.5em;
}

/* Search overlay input padding */
html[dir='rtl'] .lunite-search-form input.search-field {
	padding-inline: 1.4em 3.2em;
}