/* ==========================================================================
   [stbhh_loop_price]: a product's price in archives, search and loops.

   The old price comes first in the markup; row-reverse flips only the VISUAL
   order (current price left, struck-through price right), so screen readers
   still read "was X, now Y".
   ========================================================================== */

:where(.stbhh-loop-price) {
	--stbhh-lp-font: var(--stbhh-set-font-head, 'Space Grotesk', sans-serif);
	--stbhh-lp-body: var(--stbhh-set-font-body, 'DM Sans', sans-serif);
	--stbhh-lp-ink: var(--stbhh-set-ink, #40415E);
	--stbhh-lp-rose: var(--stbhh-set-bb-sale, var(--stbhh-set-save, #2FA97E));
	--stbhh-lp-faint: var(--stbhh-set-ink45, #9A9BAD);
}

.stbhh-loop-price {
	display: inline-flex;
	flex-direction: row-reverse;
	align-items: baseline;
	gap: 8px;
	font-family: var(--stbhh-set-bb-price-font, var(--stbhh-lp-font));
	font-weight: var(--stbhh-set-bb-price-weight, 700);
	font-size: var(--stbhh-set-bb-lp-price, 18px);
	color: var(--stbhh-set-bb-price-color, var(--stbhh-lp-ink));
}

/* Themes (Hello Elementor's reset, for one) highlight and underline <ins>/<del>: reset both. */
.stbhh-loop-price ins,
.stbhh-loop-price del {
	background: none;
	padding: 0;
}

.stbhh-loop-price ins {
	text-decoration: none;
	color: inherit;
}

.stbhh-loop-price .stbhh-lp-now .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}

/* Discounted: the current price turns rose. */
.stbhh-loop-price .stbhh-lp-now.stbhh-lp-sale {
	color: var(--stbhh-lp-rose);
}

/* Old price: plain WooCommerce markup (no raised decimals), so the line-through reads cleanly. */
.stbhh-loop-price del {
	font-family: var(--stbhh-set-bb-old-font, var(--stbhh-lp-body));
	font-weight: var(--stbhh-set-bb-old-weight, 400);
	font-size: var(--stbhh-set-bb-lp-old, 14px);
	color: var(--stbhh-set-bb-old-color, var(--stbhh-lp-faint));
	text-decoration: line-through;
}

.stbhh-loop-price del .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}
