/**
 * Elix Black Week. Not layered, so it wins over the themes' @layer components.
 * Colours and type come from the active theme's tokens through the skin
 * blocks; a colour set in the admin overrides them from the inline style.
 */

body {
	--elix-bw-black: #0e0e0e;
	--elix-bw-bar-bg-skin: var(--elix-bw-black);
	--elix-bw-bar-fg-skin: #fff;
	--elix-bw-btn-bg-skin: #fff;
	--elix-bw-btn-fg-skin: var(--elix-bw-black);
	--elix-bw-hero-bg-skin: var(--elix-bw-black);
	--elix-bw-hero-fg-skin: #fff;
	--elix-bw-hero-accent: #fff;
	--elix-bw-hero-rule: rgb(255 255 255 / 0.45);
	--elix-bw-badge-bg-skin: var(--elix-bw-black);
	--elix-bw-badge-fg-skin: #fff;
	--elix-bw-label-bg: var(--elix-bw-black);
	--elix-bw-label-fg: #fff;
	--elix-bw-accent: currentColor;
	--elix-bw-bar-height: 3.5rem;
	--elix-bw-font: inherit;
	--elix-bw-hero-font: inherit;
	--elix-bw-radius: 0;
	--elix-bw-tracking: 0.02em;
	--elix-bw-success: #1e7a4e;
}

body.elix-bw-skin-airfresh24 {
	--elix-bw-btn-bg-skin: var(--color-saffron);
	--elix-bw-hero-accent: var(--color-saffron);
	--elix-bw-badge-fg-skin: var(--color-saffron);
	--elix-bw-label-bg: var(--color-blush);
	--elix-bw-label-fg: var(--color-claret);
	--elix-bw-accent: var(--color-claret);
	--elix-bw-bar-height: 3.75rem;
	--elix-bw-font: var(--font-body);
	--elix-bw-hero-font: var(--font-display);
	--elix-bw-radius: 999px;
	--elix-bw-success: var(--color-success);
}

body.elix-bw-skin-amarella {
	--elix-bw-bar-fg-skin: var(--color-on-dark-gold);
	--elix-bw-btn-bg-skin: var(--color-on-dark-gold);
	--elix-bw-hero-accent: #e8a68f;
	--elix-bw-hero-rule: var(--color-on-dark-gold);
	--elix-bw-badge-fg-skin: var(--color-on-dark-gold);
	--elix-bw-label-fg: var(--color-on-dark-gold);
	--elix-bw-accent: var(--color-ink);
	--elix-bw-bar-height: 4rem;
	--elix-bw-hero-font: var(--font-display);
	--elix-bw-tracking: 0.08em;
	--elix-bw-success: var(--color-success);
}

/* --------------------------------------------------------------- top bar */

.elix-bw-bar {
	position: relative;
	z-index: 41;
	min-height: var(--elix-bw-bar-height);
	background: var(--elix-bw-bar-bg, var(--elix-bw-bar-bg-skin));
	color: var(--elix-bw-bar-fg, var(--elix-bw-bar-fg-skin));
	font-family: var(--elix-bw-font);
}

.elix-bw-bar.is-sticky-desktop {
	position: sticky;
	top: 0;
}

.elix-bw-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	min-height: inherit;
	padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
}

.elix-bw-bar__text {
	display: inline-flex;
	align-items: baseline;
	gap: 0.75rem;
	min-width: 0;
	overflow: hidden;
	color: inherit;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: var(--elix-bw-tracking);
	text-decoration: none;
	white-space: nowrap;
}

.elix-bw-bar__text:hover {
	color: inherit;
	text-decoration: underline;
}

.elix-bw-bar__short {
	display: none;
}

.elix-bw-bar__timer[hidden] {
	display: none;
}

.elix-bw-bar__preview {
	padding: 0.1em 0.5em;
	border: 1px solid currentColor;
	font-size: 0.75em;
	text-transform: uppercase;
}

.elix-bw-bar__timer {
	flex: none;
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.elix-bw-bar__btn {
	flex: none;
	min-height: 2.25rem;
	padding: 0.25rem 1rem;
	border: 1px solid transparent;
	border-radius: var(--elix-bw-radius);
	background: var(--elix-bw-btn-bg, var(--elix-bw-btn-bg-skin));
	color: var(--elix-bw-btn-fg, var(--elix-bw-btn-fg-skin));
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}

.elix-bw-bar__btn:focus-visible,
.elix-bw-hero__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.elix-bw-bar__btn.is-on {
	border-color: currentColor;
	background: transparent;
	color: inherit;
	cursor: default;
}

.elix-bw-bar__btn:disabled {
	opacity: 0.7;
}

[data-af-header] {
	top: var(--elix-bw-offset, 0px);
}

@media (max-width: 47.99rem) {
	.elix-bw-bar {
		min-height: 2.75rem;
		max-height: 2.75rem;
	}

	.elix-bw-bar.is-sticky-desktop {
		position: relative;
	}

	.elix-bw-bar.is-sticky-mobile {
		position: sticky;
		top: 0;
	}

	.elix-bw-bar__inner {
		justify-content: space-between;
		gap: 0.625rem;
	}

	.elix-bw-bar__long,
	.elix-bw-bar__preview {
		display: none;
	}

	.elix-bw-bar__short {
		display: inline;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.elix-bw-bar__text {
		flex: 1 1 auto;
		font-size: 0.8125rem;
	}

	.elix-bw-bar__timer {
		font-size: 0.75rem;
	}

	.elix-bw-bar__btn {
		min-height: 2rem;
		padding: 0.125rem 0.625rem;
		font-size: 0.75rem;
	}
}

/* ---------------------------------------------------------- strip on home */

.elix-bw-hero {
	margin-block: 0;
	background: var(--elix-bw-hero-bg, var(--elix-bw-hero-bg-skin));
	color: var(--elix-bw-hero-fg, var(--elix-bw-hero-fg-skin));
}

.elix-bw-hero__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5rem 2rem;
	min-height: 5rem;
	padding: 1.25rem 1rem;
	text-align: center;
}

/* Hairlines either side, on wide screens only. */
.elix-bw-hero__inner::before,
.elix-bw-hero__inner::after {
	content: "";
	flex: 0 1 5.25rem;
	height: 1px;
	background: var(--elix-bw-hero-rule);
}

.elix-bw-hero__text {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.25rem 1.75rem;
	margin: 0;
	color: inherit;
	font-family: var(--elix-bw-hero-font);
	font-size: clamp(1.125rem, 0.9rem + 0.8vw, 1.5rem);
	line-height: 1.3;
}

.elix-bw-hero__accent {
	color: var(--elix-bw-hero-accent);
}

.elix-bw-hero__ship {
	padding-left: 1.25rem;
	border-left: 1px solid currentColor;
}

.elix-bw-hero__ship[hidden] {
	display: none;
}

.elix-bw-hero__btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.25rem 1.5rem;
	border-radius: var(--elix-bw-radius);
	background: var(--elix-bw-hero-btn-bg, var(--elix-bw-btn-bg-skin));
	color: var(--elix-bw-hero-btn-fg, var(--elix-bw-btn-fg-skin));
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.elix-bw-hero__btn:hover {
	color: var(--elix-bw-hero-btn-fg, var(--elix-bw-btn-fg-skin));
	text-decoration: underline;
}

@media (max-width: 47.99rem) {
	.elix-bw-hero__inner {
		flex-direction: column;
		gap: 0.75rem;
		min-height: 0;
	}

	.elix-bw-hero__inner::before,
	.elix-bw-hero__inner::after {
		display: none;
	}

	.elix-bw-hero__text {
		flex-direction: column;
		align-items: center;
	}

	.elix-bw-hero__ship {
		padding-left: 0;
		border-left: 0;
	}
}

/* -------------------------------------------------------- cards, price */

.elix-bw-badge {
	display: inline-block;
	padding: 0.2em 0.6em;
	border-radius: var(--elix-bw-radius);
	background: var(--elix-bw-badge-bg, var(--elix-bw-badge-bg-skin));
	color: var(--elix-bw-badge-fg, var(--elix-bw-badge-fg-skin));
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
}

.elix-bw-skin-amarella .elix-bw-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
}

.elix-bw-price {
	margin: 0.25rem 0 0;
	color: var(--elix-bw-accent);
	font-family: var(--elix-bw-font);
	font-weight: 600;
}

.elix-bw-price[hidden] {
	display: none;
}

.elix-bw-price--card {
	font-size: 0.8125rem;
}

/* Product page: the price after discount leads, the shelf price stays legible
   above it. Not struck through: see render_pdp_price(). */
.af-buy:has(.elix-bw-price--pdp:not([hidden])) .af-buy__price {
	margin-bottom: 0;
	color: var(--color-stone, var(--color-muted, #666));
	font-size: 1.0625rem;
}

.elix-bw-price--pdp {
	margin-top: 0.125rem;
	font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2rem);
	line-height: 1.2;
}

.elix-bw-pdp-label {
	justify-self: start;
	align-self: flex-start;
	width: fit-content;
	margin: 0.75rem 0 0.625rem;
	padding: 0.2em 0.75em;
	border-radius: var(--elix-bw-radius);
	background: var(--elix-bw-label-bg);
	color: var(--elix-bw-label-fg);
	font-family: var(--elix-bw-font);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: var(--elix-bw-tracking);
}

.elix-bw-pdp-note {
	display: flex;
	align-items: center;
	gap: 0.4em;
	margin: 0.5rem 0 0;
	font-family: var(--elix-bw-font);
	font-size: 0.875rem;
}

.elix-bw-pdp-note::before {
	content: "✓";
	color: var(--elix-bw-success);
	font-weight: 700;
}

/* ------------------------------------------------------------------ cart */

.elix-bw-cart-ship {
	margin-bottom: 1rem;
}

.elix-bw-cart-ship .af-ship {
	margin-top: 0;
}

.elix-bw-free-rate {
	font-weight: 600;
}

.elix-bw-mini-discount {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.5rem;
	color: var(--elix-bw-accent);
	font-size: 0.875rem;
	font-weight: 600;
}

.elix-bw-upsell {
	margin-bottom: 1.25rem;
}

.elix-bw-upsell__title {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.elix-bw-upsell__list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elix-bw-upsell__item {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) 2.75rem;
	align-items: center;
	gap: 0.625rem;
}

.elix-bw-upsell__media img {
	display: block;
	width: 3rem;
	height: 3rem;
	object-fit: cover;
}

.elix-bw-upsell__body {
	display: grid;
	min-width: 0;
	font-size: 0.8125rem;
	line-height: 1.3;
}

.elix-bw-upsell__name {
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.elix-bw-upsell__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid currentColor;
	border-radius: var(--elix-bw-radius);
	color: inherit;
	font-size: 1.25rem;
	line-height: 1;
	text-decoration: none;
}
