/* Shoppable Before & After — results carousel with a before/after slider and the product behind each result. */

/* Colors (the settings print their own values right after this file). */
:root {
	--sba-accent: #1e5b63;
	--sba-panel: #c4dae0;
	--sba-ink: #14323a;
	--sba-handle: #14323a;
}

.sba {
	container-type: inline-size;
	margin: 1.5em 0;
	color: var(--sba-ink);
	font-size: 15px;
	line-height: 1.55;
	text-align: start;
}

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

.sba [hidden] {
	display: none !important;
}

.sba .sba-icon {
	display: inline-block;
	flex: none;
	width: 20px;
	height: 20px;
	fill: none !important;
	stroke: currentColor;
	vertical-align: middle;
}

.sba .screen-reader-text,
.sba .sba__range {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.sba__panel {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 40px;
	border-radius: 28px;
	background: var(--sba-panel);
}

/* Heading, counter and arrows */

.sba__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.sba__titles {
	min-width: 0;
}

.sba .sba__eyebrow {
	margin: 0 0 4px;
	color: var(--sba-accent);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.sba .sba__title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: 32px;
	line-height: 1.3;
}

.sba__nav {
	display: flex;
	flex: none;
	align-items: center;
	gap: 10px;
}

.sba__count {
	font-size: 15px;
	font-weight: 600;
	opacity: 0.8;
	font-variant-numeric: tabular-nums;
}

.sba .sba__arrow,
.sba .sba__arrow:hover,
.sba .sba__arrow:focus {
	display: grid;
	width: 46px;
	height: 46px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: none;
	color: var(--sba-ink);
	cursor: pointer;
	place-items: center;
	text-transform: none;
	transition: background-color 0.2s, transform 0.1s;
}

.sba .sba__arrow:hover {
	background: #fff;
}

.sba .sba__arrow:active {
	transform: scale(0.96);
}

.sba[dir="rtl"] .sba__arrow .sba-icon {
	transform: scaleX(-1);
}

/* Products (tabs) */

.sba__rail {
	display: grid;
	order: 3;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.sba .sba__pick,
.sba .sba__pick:hover,
.sba .sba__pick:focus {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-width: 0;
	min-height: 76px;
	margin: 0;
	padding: 10px 12px;
	border: 0;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.45);
	box-shadow: none;
	color: var(--sba-ink);
	cursor: pointer;
	font: inherit;
	line-height: 1.35;
	text-align: start;
	text-transform: none;
	letter-spacing: normal;
	transition: background-color 0.2s, box-shadow 0.2s;
}

.sba .sba__pick:hover {
	background: rgba(255, 255, 255, 0.8);
}

.sba .sba__pick.is-active {
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--sba-accent), 0 14px 30px -20px rgba(20, 50, 58, 0.6);
}

.sba__pick-photo {
	display: block;
	flex: none;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border-radius: 14px;
	background: #e6f0f1;
}

.sba .sba__pick-photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.sba__pick-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sba__pick-name {
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sba__pick-meta {
	overflow: hidden;
	font-size: 13px;
	opacity: 0.78;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* One result */

.sba__slide {
	--sba-show: grid;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
	gap: 48px;
	align-items: center;
}

.sba__slide.is-entering {
	animation: sba-fade 0.35s ease;
}

/* Product card */

.sba__card {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	grid-template-areas:
		"label label"
		"photo name"
		"photo rating"
		"chips chips"
		"text text"
		"price price"
		"actions actions"
		"note note";
	gap: 16px 18px;
	align-content: start;
	padding: 28px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 28px 56px -36px rgba(20, 50, 58, 0.55);
}

.sba__card--no-rating {
	grid-template-areas:
		"label label"
		"photo name"
		"chips chips"
		"text text"
		"price price"
		"actions actions"
		"note note";
}

.sba .sba__label {
	display: flex;
	grid-area: label;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--sba-accent);
	font-size: 13px;
	font-weight: 600;
}

.sba .sba__label .sba-icon {
	width: 16px;
	height: 16px;
}

.sba .sba__meta {
	display: none;
	grid-area: meta;
	margin: 0;
	color: var(--sba-accent);
	font-size: 12.5px;
	font-weight: 600;
}

.sba .sba__photo {
	display: block;
	grid-area: photo;
	width: 112px;
	height: 112px;
	overflow: hidden;
	border-radius: 18px;
	background: #e6f0f1;
}

.sba .sba__photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.sba .sba__name {
	grid-area: name;
	align-self: end;
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: 24px;
	line-height: 1.3;
}

.sba__card--no-rating .sba__name {
	align-self: center;
}

.sba .sba__name a,
.sba .sba__name a:hover {
	color: inherit;
	text-decoration: none;
}

.sba .sba__name a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.sba .sba__rating {
	display: flex;
	flex-wrap: wrap;
	grid-area: rating;
	align-items: center;
	align-self: start;
	gap: 6px;
	margin: 0;
	font-size: 14px;
}

.sba__reviews {
	opacity: 0.78;
}

.sba__stars {
	position: relative;
	display: inline-block;
	color: #d3dadc;
	font-size: 15px;
	letter-spacing: 1px;
	line-height: 1;
	white-space: nowrap;
}

.sba__stars::before,
.sba__stars-fill::before {
	content: "\2605\2605\2605\2605\2605";
}

.sba__stars-fill {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	overflow: hidden;
	color: #c98b2b;
}

.sba .sba__chips {
	display: flex;
	flex-wrap: wrap;
	grid-area: chips;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sba .sba__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: #eef4f5;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.sba .sba__chip .sba-icon {
	width: 16px;
	height: 16px;
	color: var(--sba-accent);
}

.sba .sba__text {
	grid-area: text;
	margin: 0;
	font-size: 15px;
	line-height: 1.8;
	opacity: 0.85;
}

.sba .sba__price {
	grid-area: price;
	color: inherit;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.sba .sba__price del {
	margin-inline-end: 8px;
	font-size: 16px;
	font-weight: 400;
	opacity: 0.7;
}

.sba .sba__price ins {
	background: none;
	text-decoration: none;
}

.sba .sba__actions {
	display: flex;
	flex-wrap: wrap;
	grid-area: actions;
	gap: 10px;
}

.sba .sba__btn,
.sba .sba__btn:hover,
.sba .sba__btn:focus,
.sba .sba__btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 54px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 14px;
	box-shadow: none;
	cursor: pointer;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	transition: filter 0.2s, background-color 0.2s, transform 0.1s;
}

.sba .sba__btn:active {
	transform: translateY(1px);
}

.sba .sba__btn--order,
.sba .sba__btn--order:hover,
.sba .sba__btn--order:focus,
.sba .sba__btn--order:visited {
	flex-grow: 1;
	background: var(--sba-accent);
	color: #fff;
}

.sba .sba__btn--order:hover {
	filter: brightness(1.12);
}

.sba .sba__btn--cart,
.sba .sba__btn--cart:hover,
.sba .sba__btn--cart:focus,
.sba .sba__btn--cart:visited {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px rgba(20, 50, 58, 0.28);
	color: var(--sba-ink);
}

.sba .sba__btn--cart:hover {
	background: rgba(20, 50, 58, 0.06);
}

.sba .sba__btn.is-disabled {
	flex-grow: 1;
	background: #e3e8e9;
	color: #4a5b60;
	cursor: not-allowed;
}

.sba .sba__btn.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.sba .sba__btn.is-added {
	box-shadow: inset 0 0 0 1.5px var(--sba-accent);
	color: var(--sba-accent);
}

.sba .sba__view-cart {
	display: inline-flex;
	align-items: center;
	min-height: 54px;
	color: var(--sba-accent);
	font-weight: 600;
}

.sba .sba__note {
	display: flex;
	grid-area: note;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	opacity: 0.8;
}

.sba .sba__note .sba-icon {
	width: 18px;
	height: 18px;
}

/* Before / after slider */

.sba__compare {
	min-width: 0;
}

.sba__frame {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: var(--sba-ratio, 1 / 1);
	border-radius: 22px;
	background: #e8e0da;
	box-shadow: 0 30px 60px -40px rgba(20, 50, 58, 0.6);
	cursor: ew-resize;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.sba__layer {
	position: absolute;
	inset: 0;
}

.sba .sba__layer img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
}

.sba--before-left .sba__layer--before {
	clip-path: inset(0 calc(100% - var(--sba-pos, 50%)) 0 0);
}

.sba--before-right .sba__layer--before {
	clip-path: inset(0 0 0 var(--sba-pos, 50%));
}

.sba__tag {
	position: absolute;
	top: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	max-width: 44%;
	min-height: 30px;
	padding: 3px 12px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(20, 50, 58, 0.74);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
	pointer-events: none;
}

.sba--before-left .sba__tag--before,
.sba--before-right .sba__tag--after {
	left: 16px;
}

.sba--before-left .sba__tag--after,
.sba--before-right .sba__tag--before {
	right: 16px;
}

.sba__line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--sba-pos, 50%);
	z-index: 2;
	width: 3px;
	margin-left: -1.5px;
	background: #fff;
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
	pointer-events: none;
}

.sba__knob {
	position: absolute;
	top: 50%;
	left: var(--sba-pos, 50%);
	z-index: 3;
	display: grid;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	border-radius: 50%;
	background: var(--sba-handle);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	color: #fff;
	pointer-events: none;
	place-items: center;
	transition: transform 0.15s;
}

.sba .sba__knob .sba-icon {
	width: 24px;
	height: 24px;
}

.sba__frame.is-dragging .sba__knob {
	transform: scale(1.08);
}

.sba__frame.is-focus .sba__knob {
	box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sba-accent);
}

.sba__frame.is-hint .sba__knob {
	animation: sba-ring 1.6s ease-out;
}

.sba-notice {
	padding: 12px 14px;
	border: 1px dashed #c3c4c7;
	border-radius: 10px;
	background: #fcf9e8;
	color: #614a00;
}

/* Single result: just the spotlight. */

.sba--single .sba__panel {
	gap: 20px;
}

/* Narrow spaces and phones */

@container (max-width: 760px) {
	.sba__panel {
		gap: 14px;
		padding: 18px 16px;
		border-radius: 24px;
	}

	.sba__head {
		align-items: center;
		gap: 12px;
	}

	.sba .sba__eyebrow {
		font-size: 13px;
	}

	.sba .sba__title {
		font-size: 20px;
	}

	/* The product list is the navigation on phones: the arrows are not needed. */
	.sba--has-rail .sba__arrow {
		display: none !important;
	}

	.sba .sba__arrow,
	.sba .sba__arrow:hover,
	.sba .sba__arrow:focus {
		width: 40px;
		height: 40px;
	}

	.sba__count {
		font-size: 14px;
	}

	.sba__rail {
		display: flex;
		order: 0;
		gap: 8px;
		margin: 0 -16px;
		padding: 2px 16px 4px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.sba__rail::-webkit-scrollbar {
		display: none;
	}

	.sba .sba__pick,
	.sba .sba__pick:hover,
	.sba .sba__pick:focus {
		flex: none;
		width: auto;
		max-width: 230px;
		min-height: 50px;
		padding: 5px 14px 5px 5px;
		border-radius: 999px;
		scroll-snap-align: start;
	}

	.sba[dir="rtl"] .sba__pick,
	.sba[dir="rtl"] .sba__pick:hover,
	.sba[dir="rtl"] .sba__pick:focus {
		padding: 5px 5px 5px 14px;
	}

	.sba .sba__pick.is-active {
		box-shadow: inset 0 0 0 2px var(--sba-accent);
	}

	.sba__pick-photo {
		width: 40px;
		height: 40px;
		border-radius: 50%;
	}

	.sba__pick-name {
		font-size: 14px;
	}

	.sba__pick-meta {
		display: none;
	}

	.sba__slide {
		--sba-show: flex;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.sba__compare {
		order: -1;
	}

	.sba__frame {
		border-radius: 18px;
	}

	.sba__knob {
		width: 46px;
		height: 46px;
		margin: -23px 0 0 -23px;
	}

	.sba__tag {
		top: 12px;
		min-height: 28px;
	}

	.sba--before-left .sba__tag--before,
	.sba--before-right .sba__tag--after {
		left: 12px;
	}

	.sba--before-left .sba__tag--after,
	.sba--before-right .sba__tag--before {
		right: 12px;
	}

	.sba__card,
	.sba__card--no-rating {
		grid-template-columns: 68px minmax(0, 1fr);
		grid-template-areas:
			"photo meta"
			"photo name"
			"photo price"
			"actions actions"
			"note note";
		gap: 3px 12px;
		padding: 14px;
		border-radius: 20px;
		box-shadow: 0 20px 40px -30px rgba(20, 50, 58, 0.55);
	}

	.sba .sba__label,
	.sba .sba__rating,
	.sba .sba__chips,
	.sba .sba__text {
		display: none;
	}

	.sba .sba__meta {
		display: block;
		align-self: end;
	}

	.sba .sba__photo {
		width: 68px;
		height: 68px;
		border-radius: 14px;
	}

	.sba .sba__name {
		align-self: center;
		font-size: 17px;
	}

	.sba .sba__price {
		align-self: start;
		font-size: 17px;
	}

	.sba .sba__price del {
		font-size: 13px;
	}

	.sba .sba__actions {
		flex-wrap: nowrap;
		margin-top: 10px;
		gap: 8px;
	}

	/* "Add to cart" becomes a square icon button next to "Order now". */
	.sba .sba__btn--cart:has(.sba-icon),
	.sba .sba__btn--cart:has(.sba-icon):hover,
	.sba .sba__btn--cart:has(.sba-icon):focus {
		flex: none;
		width: 50px;
		padding: 0;
	}

	.sba .sba__btn--cart .sba-icon + span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.sba .sba__view-cart {
		min-height: 50px;
		white-space: nowrap;
	}

	.sba .sba__btn,
	.sba .sba__btn:hover,
	.sba .sba__btn:focus,
	.sba .sba__btn:visited {
		min-height: 50px;
		padding: 0 16px;
	}

	.sba .sba__note {
		justify-content: center;
		margin-top: 8px;
		font-size: 12.5px;
	}
}

@supports not (container-type: inline-size) {
	@media (max-width: 760px) {
		.sba__slide {
			display: flex;
			flex-direction: column;
		}

		.sba__compare {
			order: -1;
		}

		.sba__rail {
			order: 0;
		}
	}
}

/* "Order now" pop-up with the order form */

.sba-modal {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: transparent;
}

.sba-modal[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sba-modal::backdrop {
	background: rgba(10, 24, 28, 0.55);
}

.sba-modal__box {
	display: flex;
	flex-direction: column;
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	overflow: auto;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	color: #1d2327;
	animation: sba-pop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
	overscroll-behavior: contain;
}

.sba-modal__head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px 12px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
}

.sba-modal[dir="rtl"] .sba-modal__head {
	padding: 12px 18px 12px 14px;
}

.sba-modal .sba-modal__title {
	margin: 0;
	overflow: hidden;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sba-modal .sba-modal__close,
.sba-modal .sba-modal__close:hover,
.sba-modal .sba-modal__close:focus {
	display: grid;
	flex: none;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eef2f3;
	box-shadow: none;
	color: #1d2327;
	cursor: pointer;
	place-items: center;
}

.sba-modal .sba-modal__close .sba-icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
}

.sba-modal__body {
	padding: 12px;
}

.sba-modal__body .qodz {
	margin: 0;
}

.sba-modal__loading,
.sba-modal__error {
	margin: 0;
	padding: 48px 20px;
	text-align: center;
}

.sba-modal__loading::before {
	content: "";
	display: block;
	width: 28px;
	height: 28px;
	margin: 0 auto 12px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: var(--sba-accent);
	border-radius: 50%;
	animation: sba-spin 0.8s linear infinite;
}

html.sba-modal-open {
	overflow: hidden;
}

html.sba-modal-open .qodz-sticky,
html.sba-modal-open .qodz-contact-float {
	display: none !important;
}

@media (max-width: 600px) {
	.sba-modal[open] {
		align-items: flex-end;
	}

	.sba-modal__box {
		width: 100%;
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 20px 20px 0 0;
		animation-name: sba-rise;
	}
}

@keyframes sba-fade {
	from {
		opacity: 0.4;
	}
	to {
		opacity: 1;
	}
}

@keyframes sba-ring {
	0% {
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(255, 255, 255, 0.85);
	}
	100% {
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 0 18px rgba(255, 255, 255, 0);
	}
}

@keyframes sba-pop {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes sba-rise {
	from {
		transform: translateY(40px);
	}
	to {
		transform: none;
	}
}

@keyframes sba-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sba *,
	.sba-modal__box {
		animation: none !important;
		transition: none !important;
	}
}
