.dsf-root {
	/* Base colors, title size and background image are set from the admin panel (inline style); the rest derive from them. */
	--dsf-bg: #e8ddcb;
	--dsf-ink: #1b0e06;
	--dsf-btn: #1b0e06;
	--dsf-btn-ink: #e8ddcb;
	--dsf-btn-hover: #cdb47e;
	--dsf-btn-hover-ink: #1b0e06;
	--dsf-tile-hover: #1b0e06;
	--dsf-tile-hover-ink: #e8ddcb;
	--dsf-bar: #1b0e06;
	--dsf-accent: #cdb47e;
	--dsf-title-size: 22px;
	--dsf-bg-image: none;
	--dsf-radius: 5px;
	--dsf-tile: color-mix(in srgb, var(--dsf-bg) 30%, #fff);
	--dsf-muted: color-mix(in srgb, var(--dsf-ink) 70%, var(--dsf-bg));
	--dsf-line: color-mix(in srgb, var(--dsf-ink) 22%, transparent);
	--dsf-btn-disabled: color-mix(in srgb, var(--dsf-ink) 50%, var(--dsf-bg));
	--dsf-glass: color-mix(in srgb, #fff 45%, transparent);
	--dsf-error: #a3261b;
	direction: rtl;
	text-align: right;
	color: var(--dsf-ink);
	font-family: inherit;
	line-height: 1.8;
}

@supports not (color: color-mix(in srgb, red, blue)) {
	.dsf-root {
		--dsf-tile: #f8f5ef;
		--dsf-muted: #5a4c40;
		--dsf-line: rgba(27, 14, 6, .22);
		--dsf-btn-disabled: #827568;
		--dsf-glass: rgba(255, 255, 255, .45);
	}
}

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

/* Full-bleed background when used as [darccini_scent_finder fullwidth="1"] */
.dsf-root.dsf-fullwidth {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

/* ...and remove the theme's vertical page padding so it sits flush under the header. */
:is(.wd-content-layout, .main-page-wrapper, .site-main, .site-content, .content-area, .entry-content, .e-con, .e-con-inner, .elementor-widget-container, .elementor-widget-shortcode):has(.dsf-root.dsf-fullwidth) {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.dsf-quiz {
	background-color: var(--dsf-bg);
	background-image: var(--dsf-bg-image);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center top;
	min-height: 80vh;
	min-height: 80svh;
	padding-bottom: 64px;
	animation: dsf-fade .35s ease both;
}

/* ---------- Top bar ---------- */

.dsf-topbar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	background: var(--dsf-bar);
	padding: 0 16px;
}

.dsf-topbar-plain {
	background: transparent;
}

.dsf-root .dsf-back {
	position: absolute;
	inset-inline-start: 24px;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50%;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--dsf-accent) !important;
	cursor: pointer;
	transition: opacity .2s;
}

.dsf-root .dsf-back:hover,
.dsf-root .dsf-back:focus-visible {
	opacity: .7;
	outline: none;
}

.dsf-root .dsf-topbar-plain .dsf-back {
	color: var(--dsf-ink) !important;
}

.dsf-back svg {
	width: 28px;
	height: 28px;
}

.dsf-dots {
	display: flex;
	align-items: center;
}

.dsf-dot {
	position: relative;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid var(--dsf-accent);
	color: var(--dsf-accent);
	font-size: 13px;
	line-height: 1;
	background: transparent;
	opacity: .45;
}

.dsf-dot + .dsf-dot {
	margin-inline-start: 22px;
}

.dsf-dot + .dsf-dot::before {
	content: "";
	position: absolute;
	inset-inline-end: 100%;
	top: 50%;
	width: 22px;
	height: 1px;
	background: var(--dsf-accent);
}

.dsf-dot.is-done,
.dsf-dot.is-active {
	opacity: 1;
	font-weight: 700;
}

.dsf-dot.is-active {
	border-width: 2px;
	background: color-mix(in srgb, var(--dsf-accent) 18%, transparent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--dsf-accent) 15%, transparent);
}

/* ---------- Body ---------- */

.dsf-body,
.dsf-start {
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 24px 0;
	text-align: center;
}

.dsf-eyebrow {
	font-size: 13px;
	color: var(--dsf-muted);
	margin-bottom: 6px;
}

.dsf-title {
	margin: 0 auto 32px;
	max-width: 640px;
	font-size: var(--dsf-title-size);
	font-weight: 700;
	line-height: 1.6;
	color: var(--dsf-ink);
}

.dsf-lead {
	max-width: 560px;
	margin: -16px auto 32px;
	color: var(--dsf-muted);
	font-size: 15px;
}

/* ---------- Tiles ---------- */

.dsf-tiles {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(4, minmax(0, 210px));
	justify-content: center;
}

.dsf-cols-2 { grid-template-columns: repeat(2, minmax(0, 210px)); }
.dsf-cols-3 { grid-template-columns: repeat(3, minmax(0, 210px)); }
.dsf-cols-5 { grid-template-columns: repeat(5, minmax(0, 190px)); }

.dsf-root .dsf-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0 0 12px;
	border: 1px solid transparent !important;
	border-radius: var(--dsf-radius);
	overflow: hidden;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--dsf-ink) !important;
	font: inherit;
	text-transform: none;
	white-space: normal;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s, background-color .2s, color .2s;
}

.dsf-tile-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
}

.dsf-tile-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.dsf-tile:hover .dsf-tile-media img {
	transform: scale(1.04);
}

.dsf-tile-ph {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 44px;
	font-weight: 300;
	color: var(--dsf-line);
	background: var(--dsf-glass);
	border-bottom: 1px solid var(--dsf-line);
}

.dsf-tile-check {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--dsf-accent);
	opacity: 0;
	transform: scale(.6);
	transition: opacity .2s, transform .2s;
}

.dsf-tile-check::after {
	content: "";
	position: absolute;
	left: 9px;
	top: 6px;
	width: 7px;
	height: 12px;
	border: solid var(--dsf-tile-hover);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.dsf-tile-label {
	margin-top: 10px;
	padding: 0 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
}

.dsf-tile-hint {
	padding: 0 10px;
	font-size: 12px;
	color: var(--dsf-muted);
	line-height: 1.7;
	transition: color .2s;
}

.dsf-root .dsf-tile:hover,
.dsf-root .dsf-tile:focus-visible,
.dsf-root .dsf-tile.is-selected {
	outline: none;
	border-color: var(--dsf-tile-hover) !important;
	background: var(--dsf-tile-hover) !important;
	color: var(--dsf-tile-hover-ink) !important;
}

.dsf-tile:hover .dsf-tile-ph,
.dsf-tile:focus-visible .dsf-tile-ph,
.dsf-tile.is-selected .dsf-tile-ph {
	background: color-mix(in srgb, var(--dsf-tile-hover-ink) 8%, transparent);
	border-bottom-color: color-mix(in srgb, var(--dsf-tile-hover-ink) 20%, transparent);
	color: color-mix(in srgb, var(--dsf-tile-hover-ink) 35%, transparent);
}

.dsf-tile:hover .dsf-tile-hint,
.dsf-tile:focus-visible .dsf-tile-hint,
.dsf-tile.is-selected .dsf-tile-hint {
	color: var(--dsf-tile-hover-ink);
	opacity: .8;
}

.dsf-tile.is-selected .dsf-tile-check {
	opacity: 1;
	transform: none;
}

/* ---------- Buttons ---------- */

.dsf-actions {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

.dsf-actions-split {
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.dsf-root .dsf-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 164px;
	height: 46px;
	padding: 0 28px;
	border: 1px solid var(--dsf-btn) !important;
	border-radius: var(--dsf-radius);
	background: var(--dsf-btn) !important;
	box-shadow: none !important;
	color: var(--dsf-btn-ink) !important;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-transform: none;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}

.dsf-root .dsf-next-ghost {
	background: transparent !important;
	color: var(--dsf-btn) !important;
}

.dsf-root .dsf-next:hover:not(:disabled),
.dsf-root .dsf-next:focus-visible:not(:disabled) {
	border-color: var(--dsf-btn-hover) !important;
	background: var(--dsf-btn-hover) !important;
	color: var(--dsf-btn-hover-ink) !important;
	outline: none;
}

.dsf-root .dsf-next:disabled,
.dsf-root .dsf-next:disabled:hover {
	border-color: var(--dsf-btn-disabled) !important;
	background: var(--dsf-btn-disabled) !important;
	color: var(--dsf-btn-ink) !important;
	cursor: not-allowed;
}

.dsf-next-hint {
	margin: 0;
	font-size: 12.5px;
	color: var(--dsf-muted);
}

.dsf-actions-split .dsf-next-hint {
	margin-top: -4px;
}

.dsf-textlink {
	color: var(--dsf-ink) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline !important;
	text-underline-offset: 6px;
}

/* ---------- Info form ---------- */

.dsf-start {
	padding-top: 64px;
}

.dsf-form {
	max-width: 400px;
	margin: 0 auto;
	text-align: right;
}

.dsf-field {
	display: block;
	margin-bottom: 16px;
}

.dsf-field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.dsf-field input {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--dsf-line);
	border-radius: var(--dsf-radius);
	background: color-mix(in srgb, #fff 70%, transparent);
	color: var(--dsf-ink);
	font: inherit;
	font-size: 16px;
	box-shadow: none;
}

.dsf-field input[dir="ltr"] {
	text-align: left;
}

.dsf-field input[dir="ltr"]:placeholder-shown {
	text-align: right;
}

.dsf-field input:focus {
	outline: none;
	border-color: var(--dsf-ink);
}

.dsf-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13.5px;
	line-height: 1.8;
	cursor: pointer;
}

.dsf-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	accent-color: var(--dsf-btn);
}

.dsf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.dsf-error {
	min-height: 24px;
	margin-top: 12px;
	font-size: 13.5px;
	color: var(--dsf-error);
	text-align: center;
}

.dsf-error:empty {
	min-height: 0;
	margin: 0;
}

.dsf-form .dsf-actions {
	margin-top: 24px;
}

.dsf-form .dsf-next {
	width: 100%;
}

/* ---------- Result ---------- */

.dsf-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 60vh;
	color: var(--dsf-muted);
}

.dsf-spinner {
	width: 40px;
	height: 40px;
	border: 2px solid var(--dsf-line);
	border-top-color: var(--dsf-ink);
	border-radius: 50%;
	animation: dsf-spin .9s linear infinite;
}

.dsf-result .dsf-body {
	padding-top: 8px;
}

.dsf-picks {
	display: grid;
	gap: 48px;
	justify-content: center;
	grid-template-columns: repeat(2, minmax(0, 300px));
}

.dsf-picks-1 {
	grid-template-columns: minmax(0, 300px);
}

.dsf-pick {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: transparent;
	text-align: center;
	animation: dsf-fade .5s ease both;
}

.dsf-pick + .dsf-pick {
	animation-delay: .12s;
}

.dsf-pick-media {
	display: block;
	width: 100%;
	max-width: 240px;
}

/* Product photo keeps its own proportions (no square crop), capped like the shop grid. */
.dsf-pick-media img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 340px;
	margin: 0 auto;
}

.dsf-pick-media .dsf-tile-ph {
	aspect-ratio: 3 / 4;
	font-size: 28px;
	font-weight: 700;
	color: var(--dsf-muted);
	border: 1px solid var(--dsf-line);
	border-radius: var(--dsf-radius);
}

.dsf-pick-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	padding: 14px 8px 0;
}

.dsf-pick-badge {
	font-size: 12px;
	color: var(--dsf-muted);
}

.dsf-pick-name {
	margin: 2px 0 4px;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.5;
	text-transform: uppercase;
}

.dsf-pick-name a {
	color: var(--dsf-ink) !important;
	text-decoration: none !important;
}

.dsf-pick-desc {
	margin: 0 0 10px;
	max-width: 300px;
	font-size: 14px;
	color: var(--dsf-muted);
}

.dsf-pick-price {
	margin-bottom: 14px;
	font-size: 15px;
	font-weight: 900;
}

.dsf-pick-price del {
	opacity: .5;
	font-weight: 400;
	margin-inline-end: 6px;
}

.dsf-pick-price ins {
	text-decoration: none;
}

.dsf-pick-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
}

.dsf-root .dsf-pick-actions .dsf-next {
	min-width: 132px;
	height: 40px;
	padding: 0 18px;
	font-size: 13px;
}

.dsf-oos {
	align-self: center;
	font-size: 13px;
	color: var(--dsf-error);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.dsf-tiles,
	.dsf-cols-3,
	.dsf-cols-4,
	.dsf-cols-5 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.dsf-tile:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		max-width: calc(50% - 6px);
		justify-self: center;
	}

	.dsf-picks {
		grid-template-columns: minmax(0, 300px);
		gap: 40px;
	}
}

@media (max-width: 560px) {
	.dsf-topbar {
		height: 60px;
	}

	.dsf-back {
		inset-inline-start: 8px;
	}

	.dsf-dot {
		width: 24px;
		height: 24px;
		font-size: 12px;
	}

	.dsf-dot + .dsf-dot {
		margin-inline-start: 14px;
	}

	.dsf-dot + .dsf-dot::before {
		width: 14px;
	}

	.dsf-body,
	.dsf-start {
		padding: 28px 16px 0;
	}

	.dsf-start {
		padding-top: 40px;
	}

	.dsf-title {
		margin-bottom: 22px;
	}

	.dsf-tile-label {
		font-size: 14px;
	}

	.dsf-tile-hint {
		font-size: 11.5px;
	}

	.dsf-step .dsf-actions {
		position: sticky;
		bottom: 0;
		margin: 24px -16px 0;
		padding: 16px 16px 12px;
		background: linear-gradient(to bottom, transparent, var(--dsf-bg) 35%);
	}

	.dsf-step .dsf-next {
		width: 100%;
	}
}

@keyframes dsf-fade {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

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

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