/**
 * Camélia — the red accents on the shop: product labels, then prices.
 *
 * Asked for on 2026-11-27: every label red across the shop, the home page and
 * the product pages, and later the same day the prices too, on the shop and
 * the product pages.
 *
 * WHY `!important` IS UNAVOIDABLE FOR THE LABELS — AND NOT FOR THE PRICES
 *
 * The two look like the same fight and are not; the price section at the foot
 * of this file explains its own side.
 *
 * Woodmart's `custom_css` theme option — not a stylesheet anyone can edit from
 * the repository — contains:
 *
 *     .product-label.onsale { background-color: #e64914 !important }
 *
 * That option is inlined late in the head, so neither source order nor a
 * heavier selector alone can win against it. The rules below therefore carry
 * `!important` as well, and are qualified with `body` so they also outweigh
 * anything the theme prints at the same strength.
 *
 * The red is #C8102E: dark enough for white text at about 6.4:1, which the
 * previous orange (#e64914, roughly 3.9:1) was not.
 *
 * NOT campaign styling — this file is loaded all year by inc/badges.php, and
 * it replaces the black badge that assets/css/blackfriday.css used to paint.
 */

.woocommerce,
body {
	--cam-badge-red: #c8102e;
	--cam-badge-ink: #fff;
}

/*
 * Every label the theme can print: the sale badge, "Hot" on a featured
 * product, "New", the attribute labels, and sold-out. The owner asked for all
 * of them, so the rule lists them rather than painting `.product-label`
 * wholesale — a future Woodmart label we have not seen should not silently
 * inherit a colour nobody chose for it.
 */
body .product-labels .product-label,
body .product-label.onsale,
body .product-label.featured,
body .product-label.new,
body .product-label.out-of-stock,
body .product-labels .product-label.onsale,
body .product-labels .product-label.featured,
body .product-labels .product-label.new,
body .product-labels .product-label.out-of-stock {
	background-color: var( --cam-badge-red ) !important;
	color: var( --cam-badge-ink ) !important;
}

/*
 * The discount is the reason the badge exists, so it is allowed to be a little
 * louder than the word it replaced. Tabular figures stop "-50%" and "-9%"
 * from sitting at different widths in a grid of cards.
 */
body .product-label.onsale,
body .product-labels .product-label.onsale {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: 0.01em;
}

/*
 * Arabic reads « خصم 50% », which is two words where French has four
 * characters. Without this the badge clips on a product card.
 */
body.rtl .product-label.onsale,
body.rtl .product-labels .product-label.onsale {
	letter-spacing: 0;
	white-space: nowrap;
}


/* =========================================================================
 * The prices
 * ====================================================================== */

/*
 * The price was gold, and gold is this brand's accent colour — so the figure
 * a shopper is looking for read as decoration rather than as the point. Red
 * matches the badge beside it, which is the other half of the same message.
 *
 * NO `!important` HERE, unlike the labels above, and the reason is worth
 * writing down because the two cases look identical from the outside.
 *
 * The gold comes from Woodmart's compiled theme-options CSS, inlined late in
 * the head:
 *
 *     .price { color: var( --wd-primary-color ) }
 *
 * That is specificity (0,1,0) with no `!important`. It was beating the child
 * theme only on source order, so any properly qualified selector takes it
 * cleanly — these are (0,2,1). The label rules needed `!important` because
 * the declaration they fight carries `!important` itself.
 *
 * Only the price actually being charged. `del` keeps its own muted grey from
 * its own rule, and a declared colour always beats an inherited one, so the
 * struck-through price is untouched by the container going red — which is the
 * whole point: two red figures side by side would say nothing.
 */
body .wd-product .price,
body .product .price,
body .summary .price,
body .wd-single-price .price {
	color: var( --cam-badge-red );
}

/*
 * Woodmart prints the sale price inside `ins`, which some browsers underline
 * by default. It is a price, not an edit.
 */
body .wd-product .price ins,
body .product .price ins,
body .summary .price ins {
	text-decoration: none;
}
