:root {
	--sdn-spo-accent: var(--wd-primary-color, #0f766e);
	--sdn-spo-accent-dark: #0b5f59;
	--sdn-spo-ink: #172033;
	--sdn-spo-muted: #667085;
	--sdn-spo-border: #e0e6ed;
}

html.sdn-spo-scroll-locked,
body.sdn-spo-scroll-locked {
	overflow: hidden !important;
	overscroll-behavior: none;
}

.sdn-spo-overlay,
.sdn-spo-overlay *,
.sdn-spo-image-viewer,
.sdn-spo-image-viewer *,
.sdn-spo-toast,
.sdn-spo-toast * {
	box-sizing: border-box;
}

.sdn-spo-overlay {
	--sdn-overlay-opacity: 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	position: fixed;
	z-index: 2147483000;
	inset: 0;
	padding: 22px;
	background: rgba(8, 15, 29, calc(.62 * var(--sdn-overlay-opacity)));
	opacity: 0;
	visibility: hidden;
	backdrop-filter: blur(4px);
	transition: opacity .24s ease, visibility .24s ease;
}

.sdn-spo-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.sdn-spo-sheet {
	display: flex;
	flex-direction: column;
	position: relative;
	width: min(680px, 100%);
	max-height: min(90vh, 860px);
	max-height: min(90dvh, 860px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 23px;
	background: #fff;
	color: var(--sdn-spo-ink);
	box-shadow: 0 24px 90px rgba(0, 0, 0, .28);
	font-family: inherit;
	text-align: right;
	transform: translateY(calc(100% + 35px));
	transition: transform .3s cubic-bezier(.2, .75, .25, 1);
}

.sdn-spo-overlay.is-open .sdn-spo-sheet {
	transform: translateY(0);
}

.sdn-spo-sheet.is-dragging {
	transition: none;
}

.sdn-spo-drag {
	display: none;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 25px;
	padding: 6px 0 4px;
	border: 0;
	background: transparent;
	touch-action: none;
	cursor: grab;
}

.sdn-spo-drag span {
	display: block;
	width: 42px;
	height: 4px;
	border-radius: 999px;
	background: #c8d0da;
}

.sdn-spo-sheet__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 20px 14px;
	border-bottom: 1px solid #edf0f4;
	background:
		radial-gradient(circle at 5% 0, color-mix(in srgb, var(--sdn-spo-accent) 12%, transparent), transparent 38%),
		linear-gradient(135deg, #fbfefd, #fff);
}

.sdn-spo-product {
	display: flex;
	align-items: center;
	min-width: 0;
	gap: 12px;
}

.sdn-spo-product img {
	width: 60px;
	height: 60px;
	flex: 0 0 60px;
	object-fit: cover;
	border: 1px solid #e5e9ef;
	border-radius: 13px;
	background: #f7f8fa;
}

.sdn-spo-product > div {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 5px;
}

.sdn-spo-product span {
	color: var(--sdn-spo-accent);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .02em;
}

.sdn-spo-product h2 {
	overflow: hidden;
	margin: 0;
	color: #111827;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.6;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sdn-spo-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	padding: 0;
	border: 1px solid #dfe5eb;
	border-radius: 11px;
	background: #fff;
	color: #475569;
	box-shadow: none;
	cursor: pointer;
	transition: .18s ease;
}

.sdn-spo-close span {
	margin-top: -3px;
	font-family: Arial, sans-serif;
	font-size: 25px;
	font-weight: 300;
	line-height: 1;
}

.sdn-spo-close:hover,
.sdn-spo-close:focus {
	border-color: #b8c3d0;
	background: #f8fafc;
	color: #111827;
	outline: 0;
}

.sdn-spo-sheet__intro {
	padding: 15px 20px 11px;
}

.sdn-spo-sheet__intro strong {
	display: block;
	margin-bottom: 4px;
	color: #1f2937;
	font-size: 13px;
	font-weight: 800;
}

.sdn-spo-sheet__intro p {
	margin: 0;
	color: var(--sdn-spo-muted);
	font-size: 11px;
	line-height: 1.75;
}

.sdn-spo-sheet__body {
	display: flex;
	min-height: 120px;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 13px;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 4px 20px 20px;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
	overscroll-behavior: contain;
}

.sdn-spo-group {
	min-width: 0;
	margin: 0;
	padding: 14px;
	border: 1px solid var(--sdn-spo-border);
	border-radius: 15px;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
}

.sdn-spo-group legend {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 10px;
	float: none;
	margin: 0;
	padding: 0 0 9px;
	border: 0;
	font: inherit;
}

.sdn-spo-group legend span {
	color: #1f2937;
	font-size: 13px;
	font-weight: 800;
}

.sdn-spo-group legend em {
	padding: 4px 7px;
	border-radius: 7px;
	background: #f1f5f9;
	color: #64748b;
	font-size: 9.5px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
}

.sdn-spo-group legend em.is-required {
	background: #fff1f2;
	color: #be123c;
}

.sdn-spo-group__description {
	margin: -2px 0 10px;
	color: var(--sdn-spo-muted);
	font-size: 10.5px;
	line-height: 1.75;
}

.sdn-spo-options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
}

.sdn-spo-options.has-visual-options {
	gap: 12px;
}

.sdn-spo-options.has-visual-options > .sdn-spo-option:not(.has-image) {
	grid-column: 1 / -1;
}

.sdn-spo-option {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	align-items: center;
	position: relative;
	min-height: 66px;
	gap: 9px;
	margin: 0;
	padding: 10px 11px;
	border: 1px solid #dce3ea;
	border-radius: 12px;
	background: #fff;
	color: #283548;
	cursor: pointer;
	transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}

.sdn-spo-option.has-image {
	display: flex;
	min-height: 0;
	flex-direction: column;
	align-items: stretch;
	gap: 9px;
	padding: 9px 9px 11px;
	border-radius: 15px;
}

.sdn-spo-option:hover {
	border-color: color-mix(in srgb, var(--sdn-spo-accent) 47%, #dce3ea);
	transform: translateY(-1px);
}

.sdn-spo-option.is-selected {
	border-color: var(--sdn-spo-accent);
	background: color-mix(in srgb, var(--sdn-spo-accent) 6%, #fff);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--sdn-spo-accent) 11%, transparent);
}

.sdn-spo-option input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none;
}

.sdn-spo-option__control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 19px;
	height: 19px;
	border: 1.5px solid #aeb9c7;
	border-radius: 50%;
	background: #fff;
	transition: .18s ease;
}

.sdn-spo-option.has-image .sdn-spo-option__control {
	position: absolute;
	z-index: 2;
	top: 17px;
	right: 17px;
	width: 23px;
	height: 23px;
	border-width: 2px;
	box-shadow: 0 3px 10px rgba(15, 23, 42, .18);
}

.sdn-spo-option__image {
	display: block;
	position: relative;
	width: 100%;
	height: auto;
	flex: 0 0 auto;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 1px solid #d7e0e9;
	border-radius: 12px;
	background: #f5f7fa;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
	cursor: zoom-in;
}

.sdn-spo-option__image:focus {
	outline: 2px solid var(--sdn-spo-accent);
	outline-offset: 2px;
}

.sdn-spo-option__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .2s ease;
}

.sdn-spo-option.is-selected .sdn-spo-option__image {
	border-color: color-mix(in srgb, var(--sdn-spo-accent) 58%, #d7e0e9);
}

.sdn-spo-option__image:hover img {
	transform: scale(1.06);
}

.sdn-spo-option__image > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	left: 7px;
	bottom: 7px;
	width: 28px;
	height: 28px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 8px;
	background: rgba(15, 23, 42, .78);
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 14px;
	line-height: 1;
}

.sdn-spo-option__image svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2;
}

.sdn-spo-group[data-type="multiple"] .sdn-spo-option__control {
	border-radius: 5px;
}

.sdn-spo-option.is-selected .sdn-spo-option__control {
	border-color: var(--sdn-spo-accent);
	background: var(--sdn-spo-accent);
	box-shadow: inset 0 0 0 4px #fff;
}

.sdn-spo-group[data-type="multiple"] .sdn-spo-option.is-selected .sdn-spo-option__control {
	box-shadow: none;
}

.sdn-spo-group[data-type="multiple"] .sdn-spo-option.is-selected .sdn-spo-option__control::after {
	content: "✓";
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
}

.sdn-spo-option__content {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
}

.sdn-spo-option.has-image .sdn-spo-option__content {
	width: 100%;
	padding: 0 3px;
}

.sdn-spo-option.has-image .sdn-spo-option__top {
	align-items: flex-start;
	flex-wrap: wrap;
}

.sdn-spo-option.has-image .sdn-spo-option__content strong {
	display: -webkit-box;
	overflow: hidden;
	font-size: 12.5px;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sdn-spo-option.has-image .sdn-spo-option__content small {
	display: -webkit-box;
	overflow: hidden;
	font-size: 10px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sdn-spo-option__top {
	display: flex;
	align-items: center;
	min-width: 0;
	gap: 6px;
}

.sdn-spo-option__content strong {
	overflow: hidden;
	color: #263244;
	font-size: 11.5px;
	font-weight: 750;
	line-height: 1.55;
	text-overflow: ellipsis;
}

.sdn-spo-option__content em {
	flex: 0 0 auto;
	padding: 2px 5px;
	border-radius: 5px;
	background: #fef3c7;
	color: #92400e;
	font-size: 8.5px;
	font-style: normal;
	font-weight: 800;
	line-height: 1.4;
}

.sdn-spo-option__content small {
	display: block;
	color: #7a8595;
	font-size: 9.5px;
	line-height: 1.65;
}

.sdn-spo-option__price {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 2px;
	direction: ltr;
	padding: 4px 6px;
	border-radius: 6px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 9.5px;
	font-weight: 800;
	white-space: nowrap;
}

.sdn-spo-option.has-image .sdn-spo-option__price {
	max-width: calc(100% - 6px);
	align-self: flex-start;
	margin: auto 3px 0;
	white-space: normal;
}

.sdn-spo-option.has-image .sdn-spo-option__amounts {
	flex-wrap: wrap;
	row-gap: 2px;
}

.sdn-spo-option.has-image .sdn-spo-option__price del,
.sdn-spo-option.has-image .sdn-spo-option__price ins {
	white-space: nowrap;
}

.sdn-spo-option__amounts {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.sdn-spo-option__price del {
	color: #94a3b8;
	font-size: 8.5px;
	font-weight: 650;
}

.sdn-spo-option__price ins {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	text-decoration: none;
}

.sdn-spo-option__price small {
	direction: rtl;
	color: currentColor;
	font-size: 7.5px;
	font-weight: 650;
	opacity: .78;
}

.sdn-spo-option__price.is-free {
	background: #ecfdf5;
	color: #047857;
}

.sdn-spo-option--none {
	grid-template-columns: 20px 1fr;
}

.sdn-spo-image-viewer {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	z-index: 2147483002;
	inset: 0;
	padding: 56px 22px 24px;
	background: rgba(3, 7, 18, .9);
	opacity: 0;
	visibility: hidden;
	backdrop-filter: blur(6px);
	transition: opacity .18s ease, visibility .18s ease;
}

.sdn-spo-image-viewer.is-open {
	opacity: 1;
	visibility: visible;
}

.sdn-spo-image-viewer__canvas {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.sdn-spo-image-viewer__canvas img {
	display: block;
	max-width: min(94vw, 1080px);
	max-height: min(84vh, 900px);
	max-height: min(84dvh, 900px);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 22px 70px rgba(0, 0, 0, .42);
	object-fit: contain;
	touch-action: pinch-zoom;
}

.sdn-spo-image-viewer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: max(15px, env(safe-area-inset-top));
	left: 18px;
	width: 40px;
	height: 40px;
	padding: 0 0 3px;
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 12px;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font: 300 28px/1 Arial, sans-serif;
	cursor: pointer;
}

.sdn-spo-image-viewer__close:hover,
.sdn-spo-image-viewer__close:focus {
	background: rgba(255, 255, 255, .24);
	outline: 2px solid rgba(255, 255, 255, .6);
	outline-offset: 2px;
}

.sdn-spo-group__error,
.sdn-spo-global-error {
	display: none;
	color: #b42318;
	font-size: 10.5px;
	font-weight: 650;
	line-height: 1.7;
}

.sdn-spo-group.has-error {
	border-color: #fda29b;
	box-shadow: 0 0 0 2px #fef3f2;
}

.sdn-spo-group.has-error .sdn-spo-group__error {
	display: block;
	margin-top: 9px;
}

.sdn-spo-global-error:not(:empty) {
	display: block;
	margin-bottom: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff1f2;
}

.sdn-spo-sheet__footer {
	flex: 0 0 auto;
	padding: 13px 20px max(15px, env(safe-area-inset-bottom));
	border-top: 1px solid #e7ebf0;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 -9px 25px rgba(15, 23, 42, .05);
	backdrop-filter: blur(10px);
}

.sdn-spo-totals {
	display: grid;
	grid-template-columns: 1fr 1.18fr;
	gap: 8px;
	margin-bottom: 10px;
}

.sdn-spo-totals > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
	padding: 8px 10px;
	border-radius: 9px;
	background: #f8fafc;
}

.sdn-spo-totals span {
	color: #64748b;
	font-size: 9.5px;
	line-height: 1.45;
}

.sdn-spo-totals strong {
	direction: ltr;
	color: #1e293b;
	font-size: 11px;
	font-weight: 850;
	white-space: nowrap;
}

.sdn-spo-totals > div:last-child {
	background: color-mix(in srgb, var(--sdn-spo-accent) 7%, #fff);
}

.sdn-spo-totals > div:last-child strong {
	color: var(--sdn-spo-accent-dark);
}

.sdn-spo-confirm {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100%;
	min-height: 48px;
	padding: 10px 18px;
	border: 1px solid var(--sdn-spo-accent);
	border-radius: 12px;
	background: var(--sdn-spo-accent);
	color: #fff;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--sdn-spo-accent) 25%, transparent);
	font: inherit;
	font-size: 12.5px;
	font-weight: 800;
	cursor: pointer;
	transition: filter .18s, transform .18s, opacity .18s;
}

.sdn-spo-confirm:hover,
.sdn-spo-confirm:focus {
	filter: brightness(.92);
	transform: translateY(-1px);
	outline: 0;
}

.sdn-spo-confirm:disabled {
	opacity: .7;
	cursor: wait;
	transform: none;
}

.sdn-spo-spinner {
	display: none;
	position: absolute;
	left: 15px;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sdn-spo-spin .7s linear infinite;
}

.sdn-spo-confirm.is-loading .sdn-spo-spinner {
	display: block;
}

.sdn-spo-resolving {
	position: relative !important;
	opacity: .72 !important;
	pointer-events: none !important;
}

.sdn-spo-resolving::after {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	margin-right: 7px;
	vertical-align: -3px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: sdn-spo-spin .7s linear infinite;
}

.sdn-spo-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	position: fixed;
	z-index: 2147483001;
	right: 18px;
	bottom: max(18px, env(safe-area-inset-bottom));
	max-width: min(390px, calc(100vw - 36px));
	padding: 12px 14px;
	border: 1px solid #bbf7d0;
	border-radius: 12px;
	background: #f0fdf4;
	color: #166534;
	box-shadow: 0 14px 38px rgba(15, 23, 42, .18);
	font-family: inherit;
	text-align: right;
	opacity: 0;
	transform: translateY(18px);
	transition: .22s ease;
}

.sdn-spo-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.sdn-spo-toast.is-error {
	border-color: #fecaca;
	background: #fff1f2;
	color: #b42318;
}

.sdn-spo-toast > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex: 0 0 26px;
	border-radius: 50%;
	background: currentColor;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 14px;
	font-weight: 800;
}

.sdn-spo-toast p {
	margin: 0;
	color: inherit;
	font-size: 11px;
	font-weight: 650;
	line-height: 1.7;
}

.sdn-spo-cart-price {
	direction: ltr;
	display: inline-block;
	color: #64748b;
	font-size: .9em;
}

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

@media (max-width: 720px) {
	.sdn-spo-overlay {
		padding: 0;
		backdrop-filter: blur(2px);
	}

	.sdn-spo-sheet {
		width: 100%;
		max-height: 94vh;
		max-height: 94dvh;
		border-width: 0;
		border-radius: 22px 22px 0 0;
	}

	.sdn-spo-drag {
		display: flex;
	}

	.sdn-spo-sheet__header {
		padding: 8px 15px 12px;
	}

	.sdn-spo-product img {
		width: 53px;
		height: 53px;
		flex-basis: 53px;
	}

	.sdn-spo-product h2 {
		font-size: 13px;
	}

	.sdn-spo-close {
		width: 34px;
		height: 34px;
		flex-basis: 34px;
	}

	.sdn-spo-sheet__intro {
		padding: 12px 15px 9px;
	}

	.sdn-spo-sheet__body {
		gap: 10px;
		padding: 3px 15px 16px;
	}

	.sdn-spo-group {
		padding: 12px;
	}

	.sdn-spo-options {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.sdn-spo-options.has-visual-options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.sdn-spo-option {
		min-height: 60px;
	}

	.sdn-spo-option.has-image {
		min-height: 0;
		padding: 8px 8px 10px;
	}

	.sdn-spo-option.has-image .sdn-spo-option__image {
		aspect-ratio: 1 / 1;
	}

	.sdn-spo-option.has-image .sdn-spo-option__control {
		top: 15px;
		right: 15px;
	}

	.sdn-spo-image-viewer {
		padding: 56px 12px 16px;
	}

	.sdn-spo-sheet__footer {
		padding: 11px 15px max(12px, env(safe-area-inset-bottom));
	}

	.sdn-spo-toast {
		right: 12px;
		bottom: max(12px, env(safe-area-inset-bottom));
		max-width: calc(100vw - 24px);
	}
}

@media (max-width: 420px) {
	.sdn-spo-group legend {
		align-items: flex-start;
		flex-direction: column;
		gap: 6px;
	}

	.sdn-spo-totals {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.sdn-spo-totals > div {
		padding: 6px 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sdn-spo-overlay,
	.sdn-spo-sheet,
	.sdn-spo-image-viewer,
	.sdn-spo-option,
	.sdn-spo-confirm,
	.sdn-spo-toast {
		transition-duration: .01ms !important;
	}
}
