/**
 * AES Design Kit v6 — componente WooCommerce: prezzo
 *
 * Il prezzo è un dato, non un'azione: usa la scala neutra (`text`, `text-muted`),
 * non il verde delle CTA. La gerarchia è affidata a taglia e peso.
 *
 * Selettore WooCommerce-native (`.product` + `p/span.price`), non Elementor:
 * vale per loop, archivio, correlati e singolo prodotto. La specificità
 * (0,3,2) pareggia il default WooCommerce `div.product p.price`; il foglio
 * del tema è caricato dopo, quindi vince. I figli `.from`/`.amount` salgono a
 * (0,4,2), sopra il custom CSS per-elemento del Loop Item (0,4,0).
 */

body.aes .product :is(p, span).price {
	margin: 0;
	color: var(--aes-sys-color-text-muted);
	font-family: var(--aes-ref-font-body);
	/* Relative scale: the price follows the surrounding type so utilities
	   such as `aes-fs-*` on an ancestor can size the whole component. */
	font-size: 1em;
	font-weight: var(--aes-ref-weight-regular);
	line-height: var(--aes-ref-leading-ui);
	font-variant-numeric: tabular-nums;
}

/* Elementor's `wc-archive-products` widget emits a per-element
   `.price { font-size: 1rem }` with higher specificity than the component.
   Force the base to inherit so `aes-fs-*` on an ancestor scales the whole
   price instead of being pinned to 1rem. */
body.aes.woocommerce-js
	.elementor-wc-products
	ul.products
	li.product
	.woocommerce-loop-product__link
	.price,
body.aes.woocommerce-js
	.elementor-widget-woocommerce-product-price
	.price {
	font-size: 1em;
}

/* Etichetta "A partire da": piccola, attenuata, sulla stessa baseline. */
body.aes .product :is(p, span).price .from {
	margin-inline-end: var(--aes-ref-space-1);
	color: var(--aes-sys-color-text-muted);
	font-size: .87em;
	font-weight: var(--aes-ref-weight-regular);
	line-height: inherit;
	white-space: nowrap;
}

/* Importo: il valore commerciale, semibold e in `text`. */
body.aes .product :is(p, span).price .amount {
	color: var(--aes-sys-color-text);
	font-size: 1.03em;
	font-weight: var(--aes-ref-weight-semibold);
	line-height: 1.1;
	white-space: nowrap;
}

/* Valuta ridotta: evita il blocco "1,53€" tutto della stessa dimensione. */
body.aes .product :is(p, span).price .woocommerce-Price-currencySymbol {
	margin-inline-start: .06em;
	font-size: .8em;
	font-weight: var(--aes-ref-weight-regular);
}

/* Prezzo di listino barrato; la linea eredita la decorazione apricot del tema. */
body.aes .product :is(p, span).price del {
	margin-inline-end: var(--aes-ref-space-1);
	color: var(--aes-sys-color-text-muted);
	font-size: .93em;
	font-weight: var(--aes-ref-weight-regular);
}

body.aes .product :is(p, span).price ins {
	color: var(--aes-sys-color-text);
	font-weight: var(--aes-ref-weight-semibold);
	text-decoration: none;
}

/* Suffisso IVA / unità di misura. */
body.aes .product :is(p, span).price .woocommerce-price-suffix {
	color: var(--aes-sys-color-text-muted);
	font-size: .87em;
	font-weight: var(--aes-ref-weight-regular);
}
