/**
 * UN Recommendations — carousel mechanics + reason chip.
 *
 * The product cards reuse ChromaLab Results styling (chroma-results.css:
 * .chromalab-results__card*). This file only adds the horizontal carousel,
 * the per-card reason subheader, and a static colour swatch indicator.
 */

.un-reco {
	margin: 2rem 0;
	box-sizing: border-box;
}

/* Not wrapped in .chromalab-results (that container belongs to the Results
   widget and its page-level toggles): restate the two rules the cards need. */
.un-reco *,
.un-reco *::before,
.un-reco *::after {
	box-sizing: border-box;
}

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

.un-reco__title {
	margin: 0 0 1rem;
}

.un-reco__viewport {
	position: relative;
}

.un-reco__track {
	display: flex;
	align-items: stretch;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.un-reco__track::-webkit-scrollbar {
	display: none;
}

/* Cell = reason chip + reused product card, sized for the carousel. */
.un-reco__cell {
	flex: 0 0 auto;
	width: clamp(150px, 42vw, 200px);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.un-reco__cell .chromalab-results__card {
	flex: 1;
}

/* Reason subheader — small, quiet. */
.un-reco__reason {
	font-size: 0.68rem;
	letter-spacing: 0.04em;
	opacity: 0.65;
}

.un-reco__reason--below {
	margin-top: 0.1rem;
}

/* Required complementary product — emphasised cross-sell. */
.un-reco__cell--required .un-reco__reason {
	color: var(--un-rose, #916F73);
	font-weight: 700;
	opacity: 1;
}

.un-reco__cell--required .chromalab-results__card {
	outline: 2px solid var(--un-rose, #916F73);
	outline-offset: 2px;
}

/* Static colour swatch indicator on the image (non-interactive). */
.un-reco__swatch {
	position: absolute;
	bottom: 8px;
	left: 8px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--un-white), 0 1px 3px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

/* Carousel arrows. */
.un-reco__arrow {
	position: absolute;
	top: 38%;
	transform: translateY(-50%);
	z-index: 3;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: var(--un-white);
	box-shadow: var(--un-shadow-1);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.un-reco__arrow--prev {
	left: -6px;
}

.un-reco__arrow--next {
	right: -6px;
}

.un-reco__arrow[hidden] {
	display: none;
}
