/*
 Theme Name:   Woodmart Child – Riva Beauty
 Description:  Child theme for Woodmart with corrected Toman price display.
 Author:       Riva Beauty
 Template:     woodmart
 Version:      1.0.2
 Text Domain:  woodmart-child
*/

/*
 * Keep WooCommerce prices in the visual order:
 * number → Toman icon
 *
 * The surrounding page can remain RTL; only each price amount is isolated as LTR.
 */
.woocommerce-Price-amount.amount > bdi {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.woocommerce-Price-currencySymbol {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	line-height: 1;
}

.woocommerce-Price-currencySymbol .rb-toman-icon {
	display: block;
	width: 16px;
	height: 16px;
	margin: 0;
	object-fit: contain;
}

/* Product cards: keep regular and sale prices aligned and readable. */
.wd-product .price,
.products .product .price {
	direction: ltr;
	unicode-bidi: isolate;
}

.wd-product .price del,
.wd-product .price ins,
.products .product .price del,
.products .product .price ins {
	display: inline-flex;
	align-items: center;
}

/* Preserve Woodmart's strike-through on the old price after replacing the
 * textual currency with an SVG. text-decoration does not reliably cross an
 * inline-flex element or an image, so draw one continuous line ourselves. */
.wd-product .price del,
.products .product .price del {
	position: relative;
	text-decoration: none;
}

.wd-product .price del::after,
.products .product .price del::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: currentColor;
	pointer-events: none;
	transform: translateY(-50%);
}
