/* Furnituur Decor Set — "Complete the set in this decor" block. */

.fds-set {
	--fds-dark: var(--fu-text, #1a1c1c);
	--fds-muted: #5e3f3b;
	--fds-soft: #6b6b6b;
	--fds-field: #e8e8e8;
	--fds-line: #dcdcdc;
	--fds-bg: #f6f6f6;
	--fds-error: #a3281e;
	margin: 8px 0 16px;
	border: 1px solid var(--fds-line);
	border-radius: 2px;
	font-family: Inter, system-ui, sans-serif;
	color: var(--fds-dark);
}

.fds-set__head {
	padding: 14px 16px 10px;
}

.fds-set__title {
	margin: 0 0 2px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.fds-set__hint {
	margin: 0;
	font-size: 13px;
	color: var(--fds-soft);
}

/* ── rows (accordion) ─────────────────────────────────── */
.fds-row {
	border-top: 1px solid var(--fds-line);
}

.fds-row.has-error {
	box-shadow: inset 3px 0 0 var(--fds-error);
}

.fds-row__h {
	margin: 0;
	font-size: inherit;
}

.fds-row__btn {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 8px 16px;
	background: none;
	border: 0;
	text-align: left;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.fds-row__btn:hover {
	background: var(--fds-bg);
}

.fds-row__btn:focus-visible {
	outline: 2px solid var(--fds-dark);
	outline-offset: -2px;
}

.fds-row__icon {
	flex: none;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: var(--fds-muted);
	stroke-width: 1.5;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.fds-row__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.fds-row__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.fds-row__req {
	margin-left: 8px;
	padding: 1px 6px;
	border-radius: 2px;
	background: #f3e3e1;
	color: #7a2018;
	font-size: 11px;
	font-weight: 500;
	vertical-align: 1px;
}

.fds-row__sub {
	font-size: 12px;
	color: var(--fds-soft);
}

.fds-row__pill {
	flex: none;
	max-width: 45%;
	padding: 2px 8px;
	border: 1px solid #b9b9b9;
	border-radius: 11px;
	background: #fff;
	color: var(--fds-dark);
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* The chosen-items pill summarises a COLLAPSED row; when open, the chips and lines already show it. */
.fds-row.is-open .fds-row__pill {
	display: none;
}

.fds-row__chev {
	flex: none;
	width: 10px;
	height: 10px;
	border-right: 1.5px solid var(--fds-dark);
	border-bottom: 1.5px solid var(--fds-dark);
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.fds-row.is-open .fds-row__chev {
	transform: translateY(2px) rotate(-135deg);
}

.fds-row__panel {
	padding: 0 16px 14px 52px;
}

.fds-card {
	/* A plain "this is the product" row — no border, so it doesn't read as another option chip. */
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	margin: 0 0 12px;
	color: var(--fds-dark);
	text-decoration: none;
}

.fds-card:hover .fds-card__name {
	text-decoration: underline;
}

.fds-card:focus-visible {
	outline: 2px solid var(--fds-dark);
	outline-offset: 2px;
}

.fds-card__img {
	flex: none;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 2px;
	background: var(--fds-field);
	/* white decors on white: a hairline keeps the image visible */
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.fds-card__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fds-card__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.fds-card__open {
	margin-top: 2px;
	font-size: 12px;
	color: var(--fds-soft);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fds-row__link {
	display: inline-block;
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--fds-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fds-row__link:hover {
	color: var(--fds-muted);
}

.fds-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.fds-line__name {
	color: inherit;
	text-decoration: none;
}

.fds-line__name:hover {
	text-decoration: underline;
}

.fds-row__error {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--fds-error);
}

/* ── chips (native radio/checkbox) ────────────────────── */
.fds-fieldset {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.fds-legend {
	margin-bottom: 6px;
	padding: 0;
	font-size: 11px;
	line-height: 15px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fds-muted);
}

.fds-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.fds-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	margin: 0;
	padding: 6px 10px 6px 8px;
	border: 1px solid #c9c9c9;
	border-radius: 2px;
	background: #fff;
	font-size: 13px;
	line-height: 1.25;
	cursor: pointer;
}

.fds-chip input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--fds-dark);
	cursor: inherit;
}

.fds-chip__body {
	display: flex;
	flex-direction: column;
}

.fds-chip__label {
	font-weight: 500;
}

.fds-chip__price,
.fds-chip__note {
	font-size: 12px;
	color: var(--fds-soft);
}

.fds-chip__note {
	color: #7a5c3e;
}

.fds-chip:hover {
	border-color: var(--fds-dark);
}

.fds-chip:has(input:checked) {
	border-color: var(--fds-dark);
	box-shadow: inset 0 0 0 1px var(--fds-dark);
	background: var(--fds-bg);
}

.fds-chip:has(input:focus-visible) {
	outline: 2px solid var(--fds-dark);
	outline-offset: 2px;
}

.fds-chip.is-disabled {
	cursor: not-allowed;
	border-style: dashed;
	color: #8a8a8a;
}

.fds-chip.is-disabled .fds-chip__label {
	text-decoration: line-through;
}

.fds-chip__note--oos {
	color: #8a8a8a;
}

/* ── lines (chosen sizes) ─────────────────────────────── */
.fds-lines {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 6px;
}

.fds-line {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "name remove" "ctrl remove";
	align-items: center;
	column-gap: 8px;
	padding: 8px 4px 8px 10px;
	background: var(--fds-bg);
	border-radius: 2px;
}

.fds-line__name {
	grid-area: name;
	font-size: 13px;
	font-weight: 600;
}

.fds-line__ctrl {
	grid-area: ctrl;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.fds-line__unit {
	font-size: 13px;
	color: var(--fds-soft);
}

.fds-line__total {
	margin-left: auto;
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.fds-line__remove {
	grid-area: remove;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 2px;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #555;
	cursor: pointer;
}

.fds-line__remove:hover,
.fds-line__remove:focus-visible {
	background: var(--fds-field);
	color: #000;
}

.fds-step {
	display: inline-flex;
	border: 1px solid #c9c9c9;
	border-radius: 2px;
	background: #fff;
}

.fds-step__btn {
	width: 36px;
	height: 36px;
	border: 0;
	background: none;
	font-size: 18px;
	line-height: 1;
	color: var(--fds-dark);
	cursor: pointer;
}

.fds-step__btn:hover {
	background: var(--fds-bg);
}

.fds-step__input {
	width: 56px;
	height: 36px;
	border: 0;
	border-left: 1px solid #e0e0e0;
	border-right: 1px solid #e0e0e0;
	text-align: center;
	font: 500 14px/1 Inter, system-ui, sans-serif;
	color: var(--fds-dark);
	-moz-appearance: textfield;
}

.fds-step__input::-webkit-outer-spin-button,
.fds-step__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ── footer ───────────────────────────────────────────── */
.fds-set__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 12px;
	padding: 12px 16px;
	border-top: 1px solid var(--fds-line);
	background: var(--fds-bg);
}

.fds-set__foot-break {
	font-size: 13px;
	color: var(--fds-soft);
}

.fds-set__foot-total {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-left: auto;
	font-size: 13px;
}

.fds-set__foot-total strong {
	font-size: 18px;
	font-variant-numeric: tabular-nums;
}

.fds-set__pick {
	padding: 0;
	border: 0;
	background: none;
	font: 600 13px/1.4 Inter, system-ui, sans-serif;
	color: var(--fds-error);
	text-align: left;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.fds-bar__btn:disabled {
	opacity: 0.6;
}

.fds-set__alert {
	margin: 0;
	padding: 10px 16px;
	border-top: 1px solid var(--fds-line);
	font-size: 13px;
	color: var(--fds-error);
}

/* ── mobile bottom bar (added to <body>) ──────────────── */
.fds-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 990; /* below theme drawers/overlays (≥1000) */
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: #fff;
	border-top: 1px solid var(--fds-line, #dcdcdc);
	font-family: Inter, system-ui, sans-serif;
}

.fds-bar[hidden] {
	display: none;
}

.fds-bar__total {
	font-size: 17px;
	font-weight: 700;
	white-space: nowrap;
}

.fds-bar__btn {
	flex: 1;
	min-height: 48px;
	border: 0;
	border-radius: 2px;
	background: var(--fu-text, #1a1c1c);
	color: #fff;
	font: 800 14px/1.2 Inter, system-ui, sans-serif;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* ── bits outside the block ───────────────────────────── */
.fds-main-unit {
	align-self: center;
	margin: 0 auto 0 10px;
	font-size: 14px;
	color: #555;
}

.fds-price-unit {
	white-space: nowrap;
	font-size: 0.4em;
	font-weight: 400;
	letter-spacing: 0;
	color: #666;
	vertical-align: middle;
}

/* Sticky gallery on desktop, only on pages with the block. */
@media (min-width: 992px) {
	.fu-pdp-section .row:has(.fds-set) > .col-lg-6:first-child {
		position: sticky;
		top: 24px;
		align-self: flex-start;
	}
	/* The theme's fullscreen lightbox (.fu-pdp-lightbox, fixed, z-index 1070) lives INSIDE this
	   column; a sticky column is its own stacking context, so the right column would paint above the
	   open lightbox. While it's open, drop sticky. */
	.fu-pdp-section .row:has(.fds-set) > .col-lg-6:first-child:has(.fu-pdp-lightbox.is-open) {
		position: static;
	}
}

/* ── mobile ───────────────────────────────────────────── */
@media (max-width: 575.98px) {
	.fds-row__btn {
		flex-wrap: wrap;
		padding: 10px 12px;
	}
	.fds-row__text {
		flex: 1 1 calc(100% - 60px);
	}
	.fds-row__pill {
		order: 5;
		max-width: 100%;
		margin-left: 36px;
	}
	.fds-row__panel {
		padding: 0 12px 12px;
	}
	.fds-chips {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
	.fds-chip {
		min-height: 48px;
	}
	.fds-step__btn {
		width: 44px;
		height: 44px;
	}
	.fds-step__input {
		height: 44px;
	}
	.fds-line__remove {
		width: 44px;
		height: 44px;
	}
	.fds-set__head {
		padding: 12px;
	}
	.fds-set__foot {
		padding: 12px;
	}
	body:has(.fds-bar:not([hidden])) {
		padding-bottom: 76px;
	}
}

/* Link to the decor page under the block's hint. */
.fds-set__all { display: inline-block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
