/* Valabi Smart Offers — isolated Frequently Bought Together styles.
   This file is loaded only on requests where an FBT widget renders. */

.vso-fbt {
	--vso-accent: #d6336c;
	--vso-accent-deep: #a61e4d;
	--vso-accent-soft: #fdeef4;
	--vso-accent-line: #f6d3e1;
	--vso-accent-track: #f6dbe6;
	--vso-accent-mid: #f06595;
	--vso-ink: #211b21;
	--vso-mute: #6c626a;
	--vso-line: #e8dfe4;
	--vso-paper: #fff;
	--vso-soft: #fcfafb;
	--vso-danger: #b42318;
	--vso-danger-soft: #fff1f0;
	--vso-radius: 18px;
	--vso-shadow: 0 2px 4px rgba(35, 22, 31, .05), 0 22px 48px -28px rgba(35, 22, 31, .32);
	--vso-ring: 0 0 0 3px rgba(214, 51, 108, .22);

	position: relative;
	width: 100%;
	margin: 26px 0;
	padding: 20px;
	overflow: hidden;
	border: 1px solid var(--vso-line);
	border-radius: var(--vso-radius);
	background:
		radial-gradient(circle at 100% 0, var(--vso-accent-soft) 0, transparent 190px),
		var(--vso-paper);
	box-shadow: var(--vso-shadow);
	color: var(--vso-ink);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.55;
	text-align: start;
	isolation: isolate;
}

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

.vso-fbt__header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 17px;
}

.vso-fbt__mark {
	display: grid;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	place-items: center;
	border: 1px solid var(--vso-accent-line);
	border-radius: 11px;
	background: var(--vso-accent-soft);
	color: var(--vso-accent-deep);
	font-size: 23px;
	font-weight: 500;
	line-height: 1;
}

.vso-fbt__header > div {
	min-width: 0;
}

.vso-fbt__title {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--vso-ink);
	font: inherit;
	font-size: clamp(17px, 2vw, 20px);
	font-weight: 800;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.vso-fbt__hint {
	margin: 4px 0 0;
	color: var(--vso-mute);
	font-size: 12.5px;
	line-height: 1.55;
}

.vso-fbt__items {
	display: grid;
	gap: 10px;
}

.vso-fbt__row {
	position: relative;
	display: grid;
	grid-template-columns: 22px 58px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 12px;
	overflow: hidden;
	border: 1px solid var(--vso-line);
	border-radius: 13px;
	background: rgba(255, 255, 255, .86);
	color: inherit;
	cursor: default;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.vso-fbt__row:not(.vso-fbt__row--main):not(.is-unavailable):hover {
	border-color: var(--vso-accent-line);
	box-shadow: 0 8px 22px -18px rgba(35, 22, 31, .5);
	transform: translateY(-1px);
}

.vso-fbt__row:not(.vso-fbt__row--main):has(.vso-fbt__check:checked) {
	border-color: var(--vso-accent-line);
	background: linear-gradient(135deg, rgba(255, 255, 255, .96), var(--vso-accent-soft));
	box-shadow: inset 0 0 0 1px var(--vso-accent-line);
}

.vso-fbt__row--main {
	border-style: dashed;
	background: var(--vso-soft);
	cursor: default;
	box-shadow: none;
}

.vso-fbt__selector {
	position: relative;
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	cursor: pointer;
}

.vso-fbt__check {
	position: absolute;
	inset: 0;
	width: 20px;
	height: 20px;
	margin: 0 !important;
	opacity: 0;
	cursor: inherit;
}

.vso-fbt__selector > span {
	display: block;
	width: 20px;
	height: 20px;
	border: 1.5px solid #a79ca4;
	border-radius: 6px;
	background: #fff;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.vso-fbt__check:focus-visible + span {
	box-shadow: var(--vso-ring);
}

.vso-fbt__check:checked + span {
	border-color: var(--vso-accent);
	background: var(--vso-accent);
}

.vso-fbt__check:checked + span::after {
	content: "";
	position: absolute;
	top: 4px;
	inset-inline-start: 7px;
	width: 6px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.vso-fbt__check:disabled + span {
	border-color: #d7cfd4;
	background: #f2eef0;
}

.vso-fbt__included {
	display: grid;
	width: 20px;
	height: 20px;
	place-items: center;
	cursor: default;
}

.vso-fbt__check--main {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.vso-fbt__included-icon {
	display: grid;
	width: 20px;
	height: 20px;
	place-items: center;
	border: 1px solid #d8d0d5;
	border-radius: 50%;
	background: #f0ecef;
	color: #71666d;
	font-size: 12px;
	font-weight: 850;
	line-height: 1;
}

.vso-fbt__thumb {
	position: relative;
	display: block;
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	overflow: hidden;
	border: 1px solid var(--vso-line);
	border-radius: 12px;
	background: #fff;
}

.vso-fbt__thumb img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	border: 0 !important;
	border-radius: 0 !important;
}

.vso-fbt__info {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.vso-fbt__name-line {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	min-width: 0;
}

.vso-fbt__name {
	display: -webkit-box;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	color: var(--vso-ink);
	font-weight: 650;
	line-height: 1.5;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.vso-fbt__name.is-expanded {
	display: block;
	overflow: visible;
	-webkit-line-clamp: unset;
}

.vso-fbt__name em {
	display: inline-block;
	margin-inline-start: 4px;
	color: var(--vso-mute);
	font-size: 11.5px;
	font-style: normal;
	font-weight: 500;
	white-space: nowrap;
}

.vso-fbt__name-actions {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px;
	padding-top: 1px;
}

.vso-fbt .vso-fbt__icon-button {
	display: inline-grid;
	width: 25px;
	height: 25px;
	min-width: 25px;
	min-height: 25px;
	margin: 0 !important;
	padding: 0 !important;
	place-items: center;
	border: 1px solid var(--vso-line) !important;
	border-radius: 8px !important;
	background: rgba(255, 255, 255, .86) !important;
	box-shadow: none !important;
	color: var(--vso-mute) !important;
	font: inherit;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.vso-fbt .vso-fbt__icon-button:hover {
	border-color: var(--vso-accent-line) !important;
	background: var(--vso-accent-soft) !important;
	color: var(--vso-accent-deep) !important;
}

.vso-fbt .vso-fbt__icon-button:focus-visible {
	outline: none;
	box-shadow: var(--vso-ring) !important;
}

.vso-fbt__icon-button svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.vso-fbt__name-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.vso-fbt__price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 4px 7px;
	width: 100%;
	color: var(--vso-ink);
	font-weight: 750;
	white-space: nowrap;
}

.vso-fbt__price del {
	margin: 0;
	color: var(--vso-mute);
	font-size: 11.5px;
	font-weight: 500;
	opacity: .8;
}

.vso-fbt__price ins {
	color: var(--vso-accent-deep);
	font-weight: 850;
	text-decoration: none;
}

.vso-fbt__badge {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 2px 8px;
	border: 1px solid var(--vso-accent-line);
	border-radius: 999px;
	background: var(--vso-accent-soft);
	color: var(--vso-accent-deep);
	font-size: 10.5px;
	font-weight: 850;
	line-height: 1;
	direction: ltr;
}

.vso-fbt__stock {
	grid-column: 1 / -1;
	justify-self: start;
	padding: 3px 9px;
	border: 1px solid #ffd2ce;
	border-radius: 999px;
	background: var(--vso-danger-soft);
	color: var(--vso-danger);
	font-size: 11.5px;
	font-weight: 750;
	line-height: 1.3;
}

.vso-fbt__stock[hidden] {
	display: none;
}

.vso-fbt__row.is-unavailable {
	border-color: #eadbdc;
	background: #fffafa;
	cursor: not-allowed;
	box-shadow: none;
}

.vso-fbt__row.is-unavailable .vso-fbt__thumb img {
	filter: grayscale(.7);
	opacity: .58;
}

.vso-fbt__row.is-unavailable .vso-fbt__name,
.vso-fbt__row.is-unavailable .vso-fbt__price {
	color: #776b70;
}

.vso-fbt__footer {
	display: grid;
	grid-template-columns: minmax(150px, .9fr) minmax(220px, 1.1fr);
	align-items: center;
	gap: 13px 18px;
	margin-top: 17px;
	padding-top: 17px;
	border-top: 1px solid var(--vso-line);
}

.vso-fbt__total {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
	color: var(--vso-mute);
	font-size: 12px;
}

.vso-fbt__total strong {
	color: var(--vso-accent-deep);
	font-size: clamp(17px, 2vw, 20px);
	font-weight: 850;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.vso-fbt__add.button,
.vso-fbt button.vso-fbt__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 45px;
	margin: 0 !important;
	padding: 11px 18px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: linear-gradient(135deg, var(--vso-accent), var(--vso-accent-deep)) !important;
	box-shadow: 0 10px 24px -14px var(--vso-accent-deep) !important;
	color: #fff !important;
	font: inherit;
	font-weight: 800;
	line-height: 1.2 !important;
	text-decoration: none !important;
	width: 100%;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.vso-fbt__add.button:hover,
.vso-fbt button.vso-fbt__add:hover {
	box-shadow: 0 13px 28px -14px var(--vso-accent-deep) !important;
	transform: translateY(-1px);
}

.vso-fbt__add:focus-visible {
	outline: none;
	box-shadow: var(--vso-ring), 0 10px 24px -14px var(--vso-accent-deep) !important;
}

.vso-fbt__add[disabled],
.vso-fbt__add.loading {
	opacity: .52;
	pointer-events: none;
	transform: none;
}

[dir="rtl"] .vso-fbt__add > span:last-child,
.rtl .vso-fbt__add > span:last-child {
	transform: rotate(180deg);
}

.vso-fbt__notice {
	grid-column: 1 / -1;
	min-height: 0;
	margin: 0;
	color: var(--vso-mute);
	font-size: 12px;
	font-weight: 600;
}

.vso-fbt__notice:empty {
	display: none;
}

.vso-fbt__notice.is-error {
	padding: 9px 11px;
	border: 1px solid #ffd2ce;
	border-radius: 9px;
	background: var(--vso-danger-soft);
	color: var(--vso-danger);
}

.vso-fbt__notice.is-success {
	padding: 9px 11px;
	border: 1px solid #bde5cd;
	border-radius: 9px;
	background: #effbf3;
	color: #176b3a;
}

/* Product cards --------------------------------------------------------- */
.vso-fbt--template-cards .vso-fbt__items {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	align-items: stretch;
}

.vso-fbt--template-cards .vso-fbt__row {
	grid-template-columns: 22px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	align-content: start;
}

.vso-fbt--template-cards .vso-fbt__thumb {
	grid-column: 1 / -1;
	grid-row: 1;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
}

.vso-fbt--template-cards .vso-fbt__selector {
	grid-column: 1;
	grid-row: 2;
	align-self: start;
	margin-top: 3px;
}

.vso-fbt--template-cards .vso-fbt__info {
	grid-column: 2;
	grid-row: 2;
	grid-template-columns: 1fr;
	align-content: start;
}

.vso-fbt--template-cards .vso-fbt__price {
	justify-content: flex-start;
}

/* Bundle equation ------------------------------------------------------- */
.vso-fbt--template-bundle .vso-fbt__items {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.vso-fbt--template-bundle .vso-fbt__row {
	grid-template-columns: 22px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	align-content: start;
	padding: 11px;
	overflow: visible;
}

.vso-fbt--template-bundle .vso-fbt__row + .vso-fbt__row::before {
	content: "+";
	position: absolute;
	top: 50%;
	inset-inline-start: -18px;
	width: 12px;
	color: var(--vso-accent-deep);
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	transform: translateY(-50%);
}

.vso-fbt--template-bundle .vso-fbt__thumb {
	grid-column: 1 / -1;
	grid-row: 1;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
}

.vso-fbt--template-bundle .vso-fbt__selector {
	grid-column: 1;
	grid-row: 2;
	align-self: start;
	margin-top: 3px;
}

.vso-fbt--template-bundle .vso-fbt__info {
	grid-column: 2;
	grid-row: 2;
	grid-template-columns: 1fr;
	align-content: start;
}

.vso-fbt--template-bundle .vso-fbt__price {
	justify-content: flex-start;
	white-space: normal;
}

/* Cart always uses the low-height list presentation. */
.vso-fbt--cart {
	max-width: none;
}

@media (max-width: 860px) {
	.vso-fbt--template-bundle .vso-fbt__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vso-fbt--template-bundle .vso-fbt__row:nth-child(odd)::before {
		display: none;
	}
}

@media (max-width: 560px) {
	.vso-fbt {
		margin: 20px 0;
		padding: 15px;
		border-radius: 15px;
	}

	.vso-fbt__header {
		margin-bottom: 14px;
	}

	.vso-fbt__row {
		grid-template-columns: 20px 52px minmax(0, 1fr);
		gap: 9px;
		padding: 10px;
	}

	.vso-fbt__thumb {
		width: 52px;
		height: 52px;
	}

	.vso-fbt__info {
		grid-template-columns: minmax(0, 1fr);
		gap: 5px;
	}

	.vso-fbt__price {
		justify-content: flex-start;
		white-space: normal;
	}

	.vso-fbt__footer {
		grid-template-columns: 1fr;
	}

	.vso-fbt__add.button,
	.vso-fbt button.vso-fbt__add {
		width: 100%;
	}

	.vso-fbt--template-cards .vso-fbt__items,
	.vso-fbt--template-bundle .vso-fbt__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
	}

	.vso-fbt--template-cards .vso-fbt__row,
	.vso-fbt--template-bundle .vso-fbt__row {
		grid-template-columns: 20px minmax(0, 1fr);
	}

	.vso-fbt--template-bundle .vso-fbt__row + .vso-fbt__row::before {
		display: none;
	}
}

@media (max-width: 390px) {
	.vso-fbt--template-cards .vso-fbt__items,
	.vso-fbt--template-bundle .vso-fbt__items {
		grid-template-columns: 1fr;
	}

	.vso-fbt--template-cards .vso-fbt__thumb,
	.vso-fbt--template-bundle .vso-fbt__thumb {
		aspect-ratio: 16 / 9;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vso-fbt__row,
	.vso-fbt__selector > span,
	.vso-fbt__add {
		transition: none !important;
	}
}
