.spd-deal {
	--spd-border: #e1e4e8;
	--spd-muted: #68707a;
	--spd-dark: #171a1f;
	--spd-soft: #f7f8fa;
	--spd-accent: #111827;
	box-sizing: border-box;
	max-width: 1180px;
	margin: 28px auto;
	padding: 24px;
	border: 1px solid var(--spd-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
	color: var(--spd-dark);
}

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

.spd-deal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 28px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--spd-border);
}

.spd-deal-heading { min-width: 0; }

.spd-deal-badge {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--spd-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .01em;
}

.spd-deal-heading h2 {
	margin: 10px 0 6px;
	font-size: clamp(24px, 3vw, 36px);
	line-height: 1.12;
}

.spd-deal-heading p {
	max-width: 680px;
	margin: 0;
	color: var(--spd-muted);
	font-size: 15px;
}

.spd-deal-price {
	flex: 0 0 210px;
	min-width: 210px;
}

.spd-deal-price-card {
	position: relative;
	overflow: hidden;
	padding: 18px 20px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 15px;
	background: linear-gradient(145deg, #111827 0%, #253044 100%);
	box-shadow: 0 12px 26px rgba(17, 24, 39, .18);
	color: #fff;
	text-align: left;
}

.spd-deal-price-card::after {
	content: "";
	position: absolute;
	right: -34px;
	top: -48px;
	width: 115px;
	height: 115px;
	border-radius: 50%;
	background: rgba(255,255,255,.08);
}

.spd-deal-price-label,
.spd-deal-price-meta,
.spd-deal-price-amount {
	position: relative;
	z-index: 1;
	display: block;
}

.spd-deal-price-label {
	margin-bottom: 4px;
	color: rgba(255,255,255,.72);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .12em;
}

.spd-deal-price-amount {
	margin: 0;
	color: #fff;
	font-size: clamp(30px, 3.4vw, 40px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.035em;
	white-space: nowrap;
}

.spd-deal-price-meta {
	margin-top: 7px;
	color: rgba(255,255,255,.72);
	font-size: 12px;
	font-weight: 600;
}

.spd-progress-wrap { padding: 18px 0 20px; }
.spd-progress-text { margin-bottom: 8px; font-size: 14px; }
.spd-progress {
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: #eaedf0;
}
.spd-progress span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--spd-accent);
	transition: width .2s ease;
}

.spd-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.spd-product {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--spd-border);
	border-radius: 12px;
	background: #fff;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.spd-product:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(17, 24, 39, .08);
}

.spd-product.is-selected {
	border-color: var(--spd-accent);
	box-shadow: 0 0 0 2px rgba(17, 24, 39, .10);
}

.spd-variable-trigger {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	outline: none;
	cursor: pointer;
}

.spd-variable-trigger:focus-visible {
	box-shadow: inset 0 0 0 3px rgba(17, 24, 39, .18);
}

.spd-product-image {
	position: relative;
	aspect-ratio: 1 / 1;
	padding: 14px;
	background: var(--spd-soft);
}

.spd-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}

.spd-product-info {
	flex: 1;
	padding: 14px 14px 9px;
}

.spd-product-info h3 {
	margin: 0 0 5px;
	font-size: 15px;
	line-height: 1.3;
}

.spd-variation-label {
	margin-bottom: 7px;
	color: var(--spd-muted);
	font-size: 12px;
	line-height: 1.35;
}

.spd-normal-price {
	color: var(--spd-dark);
	font-size: 13px;
	font-weight: 600;
}

.spd-quantity-control {
	display: grid;
	grid-template-columns: 42px 1fr 42px;
	align-items: center;
	margin: 0 12px 12px;
	overflow: hidden;
	border: 1px solid var(--spd-border);
	border-radius: 9px;
	background: #fff;
}

.spd-quantity-control button,
.spd-modal-quantity-control button {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #f2f4f6;
	color: var(--spd-dark);
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
}

.spd-quantity-control button {
	width: 42px;
	height: 40px;
}

.spd-quantity-control button:hover:not(:disabled),
.spd-modal-quantity-control button:hover:not(:disabled) { background: #e7eaee; }
.spd-quantity-control button:disabled,
.spd-modal-quantity-control button:disabled { opacity: .38; cursor: not-allowed; }
.spd-item-qty,
.spd-modal-item-qty { text-align: center; font-size: 15px; font-weight: 700; }

.spd-variable-selector-row {
	padding: 0 12px 12px;
}

.spd-deal .spd-open-variations {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	width: 100%;
	min-height: 42px;
	padding: 9px 10px 9px 13px;
	border: 1px solid var(--spd-border);
	border-radius: 9px;
	background: #fff;
	color: var(--spd-dark);
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	text-align: left;
	cursor: pointer;
}

.spd-deal .spd-open-variations:hover {
	border-color: #b7bdc6;
	background: var(--spd-soft);
}

.spd-group-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--spd-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.spd-group-summary {
	min-height: 31px;
	margin-top: 7px;
	color: var(--spd-muted);
	font-size: 11px;
	line-height: 1.35;
}

.spd-deal-footer {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin: 22px -24px -24px;
	padding: 16px 24px;
	border-top: 1px solid var(--spd-border);
	border-radius: 0 0 14px 14px;
	background: rgba(255,255,255,.96);
	box-shadow: 0 -5px 16px rgba(17,24,39,.05);
	backdrop-filter: blur(6px);
}

.spd-deal-message {
	color: var(--spd-muted);
	font-size: 14px;
}

.spd-deal-message.is-error { color: #b42318; }
.spd-deal-message.is-success { color: #067647; }
.spd-deal-message a { font-weight: 700; }

.spd-add-deal.button {
	min-width: 210px;
	min-height: 46px;
	padding: 10px 18px;
	border-radius: 9px;
	font-weight: 700;
}

.spd-add-deal:disabled { opacity: .45; cursor: not-allowed; }
.spd-empty { padding: 24px; border-radius: 10px; background: var(--spd-soft); text-align: center; }
.spd-locked-cart-quantity { display: inline-block; min-width: 28px; text-align: center; font-weight: 700; }

.spd-load-more-wrap {
	display: flex;
	justify-content: center;
	padding: 20px 0 0;
}

.spd-load-more.button {
	min-width: 190px;
	min-height: 42px;
	border-radius: 8px;
	font-weight: 700;
}

.spd-load-more.is-loading { opacity: .65; cursor: wait; }

body.spd-modal-open { overflow: hidden; }

.spd-variation-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.spd-variation-modal.is-open { display: flex; }

.spd-variation-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 15, 25, .66);
	backdrop-filter: blur(4px);
}

.spd-variation-dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(720px, 100%);
	max-height: min(760px, calc(100vh - 40px));
	overflow: hidden;
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(0,0,0,.30);
}

.spd-variation-dialog-header,
.spd-variation-dialog-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
}

.spd-variation-dialog-header { border-bottom: 1px solid var(--spd-border); }
.spd-variation-dialog-footer { border-top: 1px solid var(--spd-border); background: var(--spd-soft); }

.spd-variation-dialog-kicker {
	display: block;
	margin-bottom: 3px;
	color: var(--spd-muted);
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .11em;
}

.spd-variation-dialog-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
}

.spd-deal .spd-variation-dialog-close {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--spd-border);
	border-radius: 50%;
	background: #fff;
	color: var(--spd-dark);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.spd-variation-dialog-body {
	overflow: auto;
	padding: 14px;
}

.spd-modal-option {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 132px;
	align-items: center;
	gap: 14px;
	padding: 10px;
	border: 1px solid var(--spd-border);
	border-radius: 12px;
	background: #fff;
}

.spd-modal-option + .spd-modal-option { margin-top: 10px; }
.spd-modal-option.is-selected { border-color: var(--spd-accent); box-shadow: 0 0 0 2px rgba(17,24,39,.08); }

.spd-modal-option-image {
	width: 72px;
	height: 72px;
	padding: 5px;
	border-radius: 9px;
	background: var(--spd-soft);
}

.spd-modal-option-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.spd-modal-option-info { min-width: 0; }
.spd-modal-option-info strong { display: block; font-size: 14px; line-height: 1.3; }
.spd-modal-option-price { margin-top: 5px; font-size: 13px; font-weight: 650; }

.spd-modal-quantity-control {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	align-items: center;
	overflow: hidden;
	border: 1px solid var(--spd-border);
	border-radius: 9px;
	background: #fff;
}

.spd-modal-quantity-control button { width: 40px; height: 40px; }
.spd-variation-dialog-status { color: var(--spd-muted); font-size: 13px; font-weight: 650; }
.spd-variation-dialog-done.button { min-width: 110px; min-height: 42px; border-radius: 9px; font-weight: 750; }

@media (max-width: 960px) {
	.spd-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
	.spd-deal { margin: 18px 0; padding: 16px; border-radius: 11px; }
	.spd-deal-header { flex-direction: column; gap: 16px; }
	.spd-deal-price { width: 100%; min-width: 0; flex-basis: auto; }
	.spd-deal-price-card { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 18px; }
	.spd-deal-price-label { grid-column: 1; }
	.spd-deal-price-amount { grid-column: 1; }
	.spd-deal-price-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; text-align: right; }
	.spd-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.spd-product-info { padding: 11px 11px 7px; }
	.spd-product-image { padding: 9px; }
	.spd-quantity-control { margin: 0 9px 9px; grid-template-columns: 38px 1fr 38px; }
	.spd-quantity-control button { width: 38px; }
	.spd-variable-selector-row { padding: 0 9px 9px; }
	.spd-deal-footer { margin: 18px -16px -16px; padding: 13px 16px; border-radius: 0 0 11px 11px; }
	.spd-add-deal.button { min-width: 180px; }
	.spd-variation-modal { align-items: flex-end; padding: 0; }
	.spd-variation-dialog { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
	.spd-modal-option { grid-template-columns: 58px minmax(0, 1fr); }
	.spd-modal-option-image { width: 58px; height: 58px; }
	.spd-modal-quantity-control { grid-column: 1 / -1; width: 100%; grid-template-columns: 44px 1fr 44px; }
	.spd-modal-quantity-control button { width: 44px; }
}

@media (max-width: 480px) {
	.spd-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spd-product-info h3 { font-size: 13px; }
	.spd-variation-label, .spd-normal-price { font-size: 11px; }
	.spd-group-summary { font-size: 10px; }
	.spd-deal .spd-open-variations { font-size: 11px; }
	.spd-deal-footer { flex-direction: column; align-items: stretch; gap: 9px; }
	.spd-add-deal.button { width: 100%; min-width: 0; }
	.spd-variation-dialog-header,
	.spd-variation-dialog-footer { padding: 14px; }
	.spd-variation-dialog-title { font-size: 18px; }
	.spd-variation-dialog-footer { align-items: stretch; flex-direction: column; }
	.spd-variation-dialog-done.button { width: 100%; }
}


/* Deal discovery badges shown outside the deal-builder itself. */
.spd-product-deal-promo-wrap {
	margin: 14px 0 18px;
}

.spd-product-deal-promo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2px 14px;
	align-items: center;
	padding: 13px 15px;
	border: 1px solid #dfe3e8;
	border-radius: 11px;
	background: #f7f8fa;
	box-shadow: 0 3px 12px rgba(17, 24, 39, .05);
	color: #171a1f !important;
	text-decoration: none !important;
	transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.spd-product-deal-promo:hover {
	transform: translateY(-1px);
	border-color: #b9c0c9;
	box-shadow: 0 7px 18px rgba(17, 24, 39, .09);
	color: #171a1f !important;
}

.spd-product-deal-promo-kicker {
	grid-column: 1;
	display: block;
	color: #68707a;
	font-size: 10px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.spd-product-deal-promo-text {
	grid-column: 1;
	display: block;
	margin-top: 2px;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.35;
}

.spd-product-deal-promo-arrow {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.spd-loop-deal-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: calc(100% - 2px);
	margin: 8px 1px 10px;
	padding: 8px 10px;
	border: 1px solid #dfe3e8;
	border-radius: 8px;
	background: #f7f8fa;
	color: #171a1f !important;
	font-size: 12px;
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	transition: background .16s ease, border-color .16s ease;
}

.spd-loop-deal-badge:hover {
	border-color: #b9c0c9;
	background: #f0f2f5;
	color: #171a1f !important;
}

@media (max-width: 480px) {
	.spd-product-deal-promo {
		padding: 11px 12px;
	}
	.spd-product-deal-promo-text {
		font-size: 13px;
	}
}
