/* ChromaLab Results Widget — Redesign v4 */

.chromalab-results {
	width: 100%;
	box-sizing: border-box;
}

.chromalab-results *,
.chromalab-results *::before,
.chromalab-results *::after {
	box-sizing: border-box;
}

/* --- Section --- */

.chromalab-results__section {
	margin-bottom: 48px;
}

/* Off-screen sections skip style/layout/paint. A wheel drag re-renders the
   grid on every frame; laying out all sections cost ~80ms per frame on /shop/
   (desktop), ~15ms with this. Touch screens only: the paint containment it
   implies clips whatever overflows a section, i.e. the card hover shadows,
   which never show without hover. The clip margin keeps a persistent card
   shadow (non-hover option) visible where supported. */
@media (hover: none) {
	.chromalab-results__section {
		content-visibility: auto;
		contain-intrinsic-size: auto 900px;
		overflow-clip-margin: 20px;
	}
}

/* --- Pill (above entire section) --- */

.chromalab-results__pill {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	border-radius: var(--un-radius);
	background: var(--un-white);
	border: 1px solid var(--un-black);
	margin-bottom: 16px;
	font-size: 13px;
}

.chromalab-results__pill-count {
	font-weight: 600;
	color: var(--un-black);
	white-space: nowrap;
}

.chromalab-results__pill-sep {
	width: 1px;
	height: 18px;
	background: var(--un-border-strong);
}

.chromalab-results__pill-btn {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid var(--un-border-strong);
	background: var(--un-white);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 14px;
	color: var(--un-text);
	line-height: 0;
	padding: 0;
	transition: border-color 0.15s, background 0.15s;
}

.chromalab-results__pill-btn:hover {
	border-color: var(--un-text-2);
	background: var(--un-bg-soft);
}

.chromalab-results__pill-swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--un-white);
	box-shadow: 0 0 0 1px var(--un-border-strong);
	flex-shrink: 0;
}

.chromalab-results__pill-pct {
	font-family: monospace;
	font-size: 12px;
	color: var(--un-text);
}

.chromalab-results__pill-reset {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid var(--un-black);
	background: var(--un-black);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	color: var(--un-white);
	line-height: 0;
	padding: 0;
	transition: background 0.15s, border-color 0.15s;
}

.chromalab-results__pill-reset:hover {
	background: #c53030;
	border-color: #c53030;
}

/* Pill: add-all button (right end of pill) */

.chromalab-results__pill-add-all {
	margin-left: auto;
	align-self: stretch;
	padding: 0 16px;
	margin-right: -15px;
	margin-top: -9px;
	margin-bottom: -9px;
	background: var(--un-white);
	color: var(--un-black);
	border: 1px solid var(--un-black);
	border-radius: var(--un-radius);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
	transition: opacity 0.15s;
}

.chromalab-results__pill-add-all:hover:not(:disabled) {
	background: var(--un-black);
	color: var(--un-white);
}

.chromalab-results__pill-add-all:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Short add-all wording, swapped in on mobile (see @media). */
.chromalab-results__pill-label-short {
	display: none;
}

/* Narrow results column (phone, tablet): controls + add-all never fit one row,
   the pill overflowed the screen. The pill spans the column, the add-all drops
   to its own full-width row docked to the pill's bottom edge, and the tolerance
   controls centre in the space right of the count. */
@media (max-width: 900px) {
	.chromalab-results__pill {
		display: flex;
		flex-wrap: wrap;
		row-gap: 8px;
		width: 100%;
	}

	.chromalab-results__pill-sep + .chromalab-results__pill-btn {
		margin-left: auto;
	}

	/* Last control before the add-all (+ or reset), whichever is rendered. */
	.chromalab-results__pill-sep ~ :nth-last-child(2) {
		margin-right: auto;
	}

	.chromalab-results__pill-add-all {
		flex: 1 0 100%;
		margin: 0 -15px -9px;
		padding: 9px 16px;
	}
}

/* --- Section inner (cat-box + grid) --- */

.chromalab-results__section-inner {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}

/* --- Category box --- */

.chromalab-results__cat-box {
	width: 240px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: var(--un-bg-soft);
	border: 1px solid var(--un-border);
	border-radius: var(--un-radius);
	padding: 16px;
	position: sticky;
	/* Below whatever is pinned at the top (sticky header, admin bar): measured
	   by chroma-results.js (trackStickyTop). */
	top: calc(var(--un-sticky-top, 0px) + 16px);
	align-self: flex-start;
}

/* Title + description grouped together (keeps them tight as one block,
   independent of the surrounding box gap). */
.chromalab-results__cat-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.chromalab-results__cat-img-link {
	display: block;
	background: var(--un-white);
}

/* White (not bg-soft) so transparent product PNGs sit on white, not grey. */
.chromalab-results .chromalab-results__cat-img {
	/* block avoids the inline baseline gap that showed the link's white bg
	   as a sliver under the image. */
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--un-radius);
	border: 1px solid var(--un-border);
	background: var(--un-white);
}

/* Protocol-phase eyebrow above the category title (Préparation / Construction…).
   On-theme: Public Sans (inherited), brand accent rose, no text-transform. */
.chromalab-results__cat-phase {
	font-size: var(--un-fs-xs);
	font-weight: 400;
	color: var(--un-rose);
	line-height: var(--un-lh-tight);
}

.chromalab-results__cat-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--un-black);
	margin: 0;
	text-decoration: none;
}

.chromalab-results__cat-title:hover {
	text-decoration: underline;
}

.chromalab-results__cat-desc {
	font-size: 12px;
	color: var(--un-text-2);
	line-height: 1.4;
	margin: 0;
	/* Bound the desktop sidebar description; mobile overrides to 3 lines. */
	display: -webkit-box;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.chromalab-results__cat-desc-wrap {
	position: relative;
}

/* "En savoir plus" overlay — shown on mobile only (desktop has the button). */
.chromalab-results__cat-more {
	display: none;
}

.chromalab-results__view-range {
	display: block;
	padding: 10px 14px;
	border: 1px solid var(--un-black);
	border-radius: var(--un-radius);
	background: var(--un-white);
	color: var(--un-black);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s, color 0.15s;
	margin-top: auto;
	width: 100%;
	text-align: center;
	text-decoration: none;
}

.chromalab-results__view-range:hover {
	background: var(--un-black);
	color: var(--un-white);
}

.chromalab-results__cart-icon,
.chromalab-results__eye-icon,
.chromalab-results__check-icon {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -2px;
	margin-right: 6px;
}

/* --- Section empty state (local tolerance dropped match count to zero) ---
   Container = layout only. Message inherits theme typography. Reset button uses
   The7's `.box-button .elementor-button` classes so the theme owns its styling. */

.chromalab-results__section-empty {
	padding: 12px 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.chromalab-results__section-empty-msg {
	margin: 0;
}

/* --- Cat-box with linked product (side by side, CSS grid) --- */

.chromalab-results__cat-box--linked {
	width: 480px;
	display: grid;
	grid-template-columns: 1fr 40px 1fr;
	grid-template-rows: auto auto;
	column-gap: 12px;
	row-gap: 0;
	align-items: start;
}

.chromalab-results__cat-box--two-linked {
	grid-template-columns: 1fr 40px 1fr 1fr;
}

.chromalab-results__cat-box-col-left {
	grid-column: 1;
	grid-row: 1 / 3;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.chromalab-results__cat-box-col-right {
	grid-column: 3;
	grid-row: 1 / 3;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
}

.chromalab-results__cat-box-col-right--second {
	grid-column: 4;
}

.chromalab-results__cat-box-divider {
	grid-column: 2;
	grid-row: 1 / 3;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.chromalab-results__cat-box-divider::before,
.chromalab-results__cat-box-divider::after {
	content: '';
	flex: 1;
	width: 1px;
	background: var(--un-border);
}

.chromalab-results__cat-box-divider-icon {
	padding: 3px;
	border-radius: 50%;
	background: var(--un-white);
	border: 1px solid var(--un-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	color: var(--un-border-strong);
	font-weight: 300;
	flex-shrink: 0;
}

.chromalab-results__linked-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--un-black);
}

.chromalab-results__linked-display-name {
	font-size: 12px;
	color: var(--un-text-2);
	line-height: 1.4;
}

.chromalab-results__linked-price {
	font-size: 13px;
	color: var(--un-text-2);
}

.chromalab-results__linked-btn {
	padding: 10px;
	border: none;
	border-radius: var(--un-radius);
	background: var(--un-black);
	color: var(--un-white);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
	width: 100%;
	transition: opacity 0.15s;
}

.chromalab-results__linked-btn:hover:not(:disabled) {
	opacity: 0.85;
}

.chromalab-results__linked-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* --- Carousel strip (3+ linked products) --- */

.chromalab-results__carousel-strip {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
}

.chromalab-results__carousel-arrow {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid var(--un-border-strong);
	background: var(--un-white);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	color: var(--un-text-2);
	padding: 0;
	transition: border-color 0.15s, background 0.15s;
}

.chromalab-results__carousel-arrow:hover {
	border-color: var(--un-text-2);
	background: var(--un-bg-soft);
}

.chromalab-results__carousel-thumbs {
	display: flex;
	gap: 4px;
	overflow: hidden;
	flex: 1;
}

.chromalab-results__carousel-thumb {
	width: 32px;
	height: 32px;
	border-radius: var(--un-radius);
	flex-shrink: 0;
	border: 2px solid transparent;
	background-size: cover;
	background-position: center;
	background-color: var(--un-border);
	cursor: pointer;
	transition: border-color 0.15s;
}

.chromalab-results__carousel-thumb--active {
	border-color: var(--un-black);
}

.chromalab-results__carousel-thumb:hover {
	border-color: var(--un-text-2);
}

/* --- Results column (pill + grid) --- */

.chromalab-results__results-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* --- Product cards grid ---
   Column count is driven by a single knob: `--chroma-card-min`, the minimum
   card width fed to `auto-fill minmax`. Smaller value = more columns, and it
   adapts to the viewport on its own (truly responsive, no per-breakpoint math).
   Elementor "Densité de grille" sets it per device (desktop/tablet/mobile). */

.chromalab-results__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--chroma-card-min, 160px), 1fr));
	gap: var(--chroma-grid-gap, 14px);
}

/* --- Product card --- */

.chromalab-results__card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--un-border);
	border-radius: var(--un-radius);
	overflow: hidden;
	background: var(--un-white);
	transition: box-shadow 0.15s;
}

.chromalab-results__card:hover {
	box-shadow: var(--un-shadow-2);
}

.chromalab-results__card--oos .chromalab-results__card-img-link,
.chromalab-results__card--oos .chromalab-results__card-info,
.chromalab-results__card--oos .chromalab-results__card-info-row,
.chromalab-results__card--oos .chromalab-results__add-btn,
.chromalab-results__card--oos .chromalab-results__match-badge,
.chromalab-results__card--oos .chromalab-results__sale-badge,
.chromalab-results__card--oos .chromalab-results__new-badge {
	opacity: 0.6;
}

.chromalab-results__card-img-wrap {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--un-bg-soft);
}

.chromalab-results__card-img-link {
	display: block;
	width: 100%;
	height: 100%;
}

.chromalab-results .chromalab-results__card-img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
}

.chromalab-results__card-img-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--un-border) 0%, var(--un-bg-soft) 50%, var(--un-border) 100%);
}

/* Match % badge */

.chromalab-results__match-badge {
	position: absolute;
	bottom: 6px;
	left: 6px;
	background: rgba(0, 0, 0, 0.75);
	color: var(--un-white);
	padding: 0 7px;
	border-radius: var(--un-radius);
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	height: 18px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	box-sizing: border-box;
}

.chromalab-results__match-badge-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.chromalab-results__match-badge-pct {
	flex: 1;
	text-align: right;
}

/* Sale badge */

.chromalab-results__sale-badge {
	position: absolute;
	top: 6px;
	left: 6px;
	background: var(--un-rose);
	color: var(--un-white);
	padding: 2px 7px;
	border-radius: var(--un-radius);
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
}

/* New badge */

.chromalab-results__new-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	background: var(--un-black);
	color: var(--un-white);
	padding: 2px 7px;
	border-radius: var(--un-radius);
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
}

/* Out of stock badge */

.chromalab-results__oos-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--un-text);
	color: var(--un-white);
	padding: 6px 14px;
	border-radius: var(--un-radius);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	text-align: center;
	line-height: 1.25;
}

/* OOS label two-line break — desktop keeps one line, mobile wraps (see @media). */
.chromalab-results__oos-br {
	display: none;
}

.chromalab-results__oos-label {
	text-align: center;
	line-height: 1.2;
}

/* Card info */

.chromalab-results__card-info {
	padding: 8px 10px 4px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	/* Grow to absorb row-height differences (e.g. a neighbour's title
	   wrapping to 2 lines) so the swatch bar + cart button always dock
	   to the bottom of the card instead of floating up under the info. */
	flex: 1 0 auto;
}

.chromalab-results__card-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--un-black);
	text-decoration: none;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.chromalab-results__card-title:hover {
	text-decoration: underline;
}

.chromalab-results__card-price {
	font-size: 12px;
	color: var(--un-text-2);
}

/* --- Color display: border --- */

.chromalab-results__card--color-border {
	border-color: var(--card-color);
	border-width: 2px;
}

.chromalab-results__card--color-border-hover {
	border-color: var(--un-border);
}
.chromalab-results__card--color-border-hover:hover {
	border-color: var(--card-color);
	border-width: 2px;
}

.chromalab-results__card--border-top {
	border-color: var(--un-border);
	border-top: 3px solid var(--card-color);
}
.chromalab-results__card--border-top.chromalab-results__card--color-border-hover {
	border-top-color: var(--un-border);
}
.chromalab-results__card--border-top.chromalab-results__card--color-border-hover:hover {
	border-top-color: var(--card-color);
}

.chromalab-results__card--border-bottom {
	border-color: var(--un-border);
	border-bottom: 3px solid var(--card-color);
}
.chromalab-results__card--border-bottom.chromalab-results__card--color-border-hover {
	border-bottom-color: var(--un-border);
}
.chromalab-results__card--border-bottom.chromalab-results__card--color-border-hover:hover {
	border-bottom-color: var(--card-color);
}

/* --- Color display: shadow --- */

.chromalab-results__card--color-shadow {
	box-shadow: 0 3px 16px 1px color-mix(in srgb, var(--card-color) 62%, transparent);
}

.chromalab-results__card--color-shadow-hover:hover {
	box-shadow: 0 5px 22px 2px color-mix(in srgb, var(--card-color) 72%, transparent);
}

/* --- Color display: swatch (clickable = search) --- */

.chromalab-results__color-swatch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	flex-shrink: 0;
	cursor: pointer;
	padding: 0;
	font-family: inherit;
	background: none;
}

/* Search pill (white bg, icon + text) */
.chromalab-results__swatch-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(255, 255, 255, 0.92);
	padding: 3px;
	border-radius: 50%;
	position: relative;
	z-index: 2;
	white-space: nowrap;
}

/* When text is present, pill becomes a rectangle */
.chromalab-results__swatch-pill:has(.chromalab-results__swatch-text) {
	padding: 2px 8px 2px 4px;
	border-radius: var(--un-radius);
}

.chromalab-results__swatch-pill--hover {
	opacity: 0;
	transition: opacity 0.15s;
}
.chromalab-results__color-swatch:hover .chromalab-results__swatch-pill--hover {
	opacity: 1;
}
.chromalab-results__swatch-pill--mobile {
	display: none;
}
@media (max-width: 768px) {
	.chromalab-results__swatch-pill--mobile { display: inline-flex; }
}

.chromalab-results__swatch-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.chromalab-results__swatch-icon svg {
	width: 12px;
	height: 12px;
	stroke: var(--un-text);
	fill: none;
	stroke-width: 2.5;
}

.chromalab-results__swatch-text {
	font-size: 10px;
	font-weight: 600;
	color: var(--un-text);
	white-space: nowrap;
}

/* --- Swatch: dot on image (top-left) --- */

.chromalab-results__color-swatch--image {
	position: absolute;
	top: 6px;
	left: 6px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
}
.chromalab-results__color-swatch--image:hover {
	width: auto;
	height: auto;
	padding: 4px 8px;
	border-radius: var(--un-radius);
}

/* --- Swatch: dot before info --- */

.chromalab-results__card-info-row {
	display: flex;
	align-items: flex-start;
	gap: 0;
	/* Same docking logic as card-info: this row is the card's direct
	   child in the description-swatch layout, so it must grow to fill. */
	flex: 1 0 auto;
}

.chromalab-results__color-swatch--desc {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	margin: 12px 0 0 10px;
}
.chromalab-results__color-swatch--desc:hover {
	width: auto;
	height: auto;
	padding: 2px 6px;
	border-radius: var(--un-radius);
	margin-top: 10px;
}

.chromalab-results__card-info-row .chromalab-results__card-info {
	flex: 1;
	min-width: 0;
}

/* --- Swatch: bar above cart button --- */

.chromalab-results__color-swatch--button {
	--bar-h: 5px;
	width: 100%;
	border-radius: var(--un-radius);
	border: none;
	height: var(--bar-h);
	margin-bottom: -1px;
	overflow: hidden;
	transition: height 0.2s ease, margin-top 0.2s ease;
	margin-top: 0;
}

/* Expand triggered by CARD hover */
.chromalab-results__card:hover .chromalab-results__color-swatch--button {
	height: 28px;
	margin-top: calc(var(--bar-h) - 28px);
}

/* Pill hidden, fade in on card hover */
.chromalab-results__color-swatch--button .chromalab-results__swatch-pill {
	opacity: 0;
	transition: opacity 0.12s 0.1s;
}
.chromalab-results__card:hover .chromalab-results__color-swatch--button .chromalab-results__swatch-pill {
	opacity: 1;
}

/* Size variants — just set the CSS var */
.chromalab-results[data-color-swatch-btn-size="big"] .chromalab-results__color-swatch--button { --bar-h: 15px; }
.chromalab-results[data-color-swatch-btn-size="large"] .chromalab-results__color-swatch--button { --bar-h: 10px; }
.chromalab-results[data-color-swatch-btn-size="medium"] .chromalab-results__color-swatch--button { --bar-h: 5px; }
.chromalab-results[data-color-swatch-btn-size="small"] .chromalab-results__color-swatch--button { --bar-h: 3px; }
.chromalab-results[data-color-swatch-btn-size="tiny"] .chromalab-results__color-swatch--button { --bar-h: 1px; }

/* Add to cart button */

.chromalab-results__add-btn {
	margin: auto 0 0;
	/* Tight horizontal padding so the label stays on one line in narrow
	   (compact) cards; min-height keeps a 44px touch target, text centred. */
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 4px 6px;
	white-space: nowrap;
	border: 1px solid transparent;
	border-radius: var(--un-radius);
	background: var(--un-black);
	color: var(--un-white);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Primary-button hover (charte) : fond blanc, texte + bordure noirs.
   L'icône suit via stroke:currentColor. `:not(:disabled)` évite tout
   conflit avec l'état "Ajouté" (bouton désactivé) piloté en JS. */
.chromalab-results__add-btn:hover:not(:disabled) {
	background: var(--un-white);
	color: var(--un-text);
	border-color: var(--un-text);
}

.chromalab-results__add-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Load more (secondary / outline button — theme design-system, size S) */

.chromalab-results__load-more {
	grid-column: 1 / -1;
	justify-self: start;
	box-sizing: border-box;
	width: 250px;
	min-height: 38px;
	margin-top: 12px;
	padding: 8px 16px;
	background: transparent;
	border: 1px solid var(--un-black);
	border-radius: var(--un-radius);
	color: var(--un-black);
	font-family: inherit; /* Public Sans (theme body font) */
	font-size: 14px;
	line-height: 1.2;
	font-weight: 400;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.chromalab-results__load-more:hover {
	background: var(--un-black);
	color: var(--un-white);
}

/* Empty state */

.chromalab-results__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	text-align: center;
	padding: 56px 20px;
	color: var(--un-text-2);
}

.chromalab-results__empty-icon {
	display: block;
	color: rgba(0, 0, 0, 0.22);
}

.chromalab-results__empty-icon svg {
	display: block;
}

.chromalab-results__empty-msg {
	margin: 0;
	max-width: 30em;
	font-size: 16px;
	font-style: italic;
}

.chromalab-results__empty-reset {
	font-style: normal;
}

/* --- Subcategory grid (parent category pages) --- */

.chromalab-results__subcat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.chromalab-results__subcat-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--un-border);
	border-radius: var(--un-radius);
	overflow: hidden;
	background: var(--un-white);
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s, transform 0.15s;
}

.chromalab-results__subcat-card:hover {
	box-shadow: var(--un-shadow-2);
	transform: translateY(-2px);
}

.chromalab-results .chromalab-results__subcat-img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	background: var(--un-bg-soft);
}

.chromalab-results__subcat-info {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.chromalab-results__subcat-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--un-black);
	margin: 0;
}

.chromalab-results__subcat-desc {
	font-size: 12px;
	color: var(--un-text-2);
	line-height: 1.4;
	margin: 0;
}

.chromalab-results__subcat-count {
	font-size: 12px;
	color: var(--un-text-3);
}

/* --- Mobile --- */

@media (max-width: 600px) {
	.chromalab-results__section-inner {
		flex-direction: column;
		gap: 14px;
		/* The base rule aligns to flex-start, which in a ROW only sets vertical
		   alignment — but once stacked it becomes the cross axis, and the cards
		   column then shrinks to its content instead of filling the section.
		   That squeezed the grid to ~half the screen: a single card per row on
		   mobile whatever the density setting. */
		align-items: stretch;
	}

	/* OOS label wraps to two lines on narrow cards. */
	.chromalab-results__oos-br {
		display: inline;
	}

	/* --- Category box becomes a compact horizontal header strip ---
	   On desktop the cat-box is a sticky 240px sidebar. On mobile that sticky
	   full-width block stayed pinned while cards scrolled over it, and the
	   full-width square image ate ~80% of the viewport. Here we drop sticky and
	   lay it out as a single aligned row — thumbnail · text · range link — so it
	   reads as a section header, not a giant card. */
	/* Image fills the full height on the left; the text (eyebrow + title + desc)
	   sits beside it, vertically centred. The "Voir toute la gamme" button is
	   dropped on mobile — the image and title already link to the gamme. */
	.chromalab-results .chromalab-results__cat-box {
		position: static;
		top: auto;
		width: 100%;
		display: grid;
		grid-template-columns: 96px 1fr;
		grid-template-areas: "img text";
		align-items: stretch;
		gap: 0;
		padding: 0;
		overflow: hidden;
	}

	/* Image bleeds to fill the left of the box: full height, flush to the
	   edges, no padding/border/radius of its own (the box clips it). */
	.chromalab-results .chromalab-results__cat-box > .chromalab-results__cat-img-link {
		grid-area: img;
		width: 96px;
		height: 100%;
		align-self: stretch;
	}

	.chromalab-results .chromalab-results__cat-box > .chromalab-results__cat-img-link > .chromalab-results__cat-img {
		width: 100%;
		height: 100%;
		aspect-ratio: auto;
		object-fit: cover;
		border: none;
		border-radius: 0;
	}

	/* Title + phase share the top line (title left, phase flush right of the
	   box); the description sits on its own row below. */
	.chromalab-results__cat-box > .chromalab-results__cat-text {
		grid-area: text;
		min-width: 0;
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"title phase"
			"desc  desc";
		/* center, not baseline: the title has overflow:hidden (ellipsis), which
		   synthesises its baseline from the bottom edge — baseline alignment
		   would visibly offset the phase. Centring the two reads clean. */
		align-items: center;
		align-content: center;
		column-gap: 8px;
		row-gap: 2px;
		padding: 8px 14px;
	}

	.chromalab-results__cat-box > .chromalab-results__cat-text > .chromalab-results__cat-phase {
		grid-area: phase;
		justify-self: end;
		text-align: right;
		white-space: nowrap;
	}

	.chromalab-results__cat-box > .chromalab-results__cat-text > .chromalab-results__cat-title {
		grid-area: title;
		font-size: var(--un-fs-m);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.chromalab-results__cat-box > .chromalab-results__cat-text > .chromalab-results__cat-desc-wrap {
		grid-area: desc;
	}

	.chromalab-results__cat-box > .chromalab-results__cat-text .chromalab-results__cat-desc {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	/* Link overlays the end of the last line, with a fade over the text behind.
	   font-size matches the legacy .cat-desc (12px) so it sits on the line. */
	.chromalab-results__cat-box > .chromalab-results__cat-text .chromalab-results__cat-more {
		display: inline;
		position: absolute;
		right: 0;
		bottom: 0;
		padding-left: 2.4em;
		background: linear-gradient(to right, transparent, var(--un-bg-soft) 1.6em);
		color: var(--un-rose-link);
		text-decoration: underline;
		font-size: 12px;
		line-height: 1.4;
		white-space: nowrap;
	}

	.chromalab-results__cat-box > .chromalab-results__cat-text .chromalab-results__cat-more:hover {
		color: var(--un-rose);
	}

	.chromalab-results__cat-box > .chromalab-results__view-range {
		display: none;
	}

	/* --- Linked cat-box: stack the side-by-side comparison vertically --- */
	.chromalab-results .chromalab-results__cat-box--linked {
		width: 100%;
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
		row-gap: 12px;
	}

	.chromalab-results__cat-box--linked .chromalab-results__cat-box-col-left {
		grid-column: 1;
		grid-row: 1;
	}

	.chromalab-results__cat-box--linked .chromalab-results__cat-box-divider {
		grid-column: 1;
		grid-row: 2;
		flex-direction: row;
	}

	.chromalab-results__cat-box--linked .chromalab-results__cat-box-divider::before,
	.chromalab-results__cat-box--linked .chromalab-results__cat-box-divider::after {
		width: auto;
		height: 1px;
	}

	.chromalab-results__cat-box--linked .chromalab-results__cat-box-col-right {
		grid-column: 1;
		grid-row: 3;
	}

	.chromalab-results .chromalab-results__cat-box--two-linked {
		grid-template-rows: auto auto auto auto;
	}

	.chromalab-results__cat-box--linked .chromalab-results__cat-box-col-right--second {
		grid-row: 4;
	}

	.chromalab-results__pill {
		position: sticky;
		top: var(--un-sticky-top, 0px);
		z-index: 10;
		background: var(--un-white);
		border-color: var(--un-border-strong);
	}

	/* Short add-all wording on phones. */
	.chromalab-results__pill-label-long {
		display: none;
	}

	.chromalab-results__pill-label-short {
		display: inline;
	}

	.chromalab-results__subcat-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}

/* --- Touch: larger hit areas, same look ---
   The pill +/-, reset and carousel arrows are drawn at 22-26px; on a touch
   screen an invisible ring extends what a finger can hit to ~40px. */
@media (pointer: coarse) {
	.chromalab-results__pill-btn,
	.chromalab-results__pill-reset,
	.chromalab-results__carousel-arrow {
		position: relative;
	}

	.chromalab-results__pill-btn::after,
	.chromalab-results__pill-reset::after,
	.chromalab-results__carousel-arrow::after {
		content: '';
		position: absolute;
		inset: -8px;
	}
}
