/* Wholesale offer (prototype W5.3): image + selectable quantity cards + total bar. */
.syf-coffee-ws {
	--syf-coffee-ws-on: var(--wd-primary-color);
	--syf-coffee-ws-tag: var(--syf-coffee-red);
	display: grid;
	grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr);
	align-items: center;
	gap: clamp(20px, 4vw, 44px);
}

.syf-coffee-ws-no-img {
	grid-template-columns: minmax(0, 1fr);
}

.syf-coffee-ws-img-end .syf-coffee-ws-media {
	order: 2;
}

.syf-coffee-ws-media {
	overflow: hidden;
	aspect-ratio: 1;
	border-radius: var(--syf-coffee-r-lg);
	background: var(--syf-coffee-bg2);
}

.syf-coffee-ws-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.syf-coffee-ws-opts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin: 18px 0 16px;
	padding: 18px 0 0;
	border: 0;
}

.syf-coffee-ws-opt {
	position: relative;
	display: block;
	margin: 0;
	padding: 18px 16px 16px;
	border: 2px solid var(--syf-coffee-line);
	border-radius: var(--syf-coffee-r-md);
	background: var(--syf-coffee-tile);
	cursor: pointer;
	transition: border-color .25s, box-shadow .25s, transform .25s;
}

.syf-coffee-ws-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.syf-coffee-ws-opt:has(input:checked) {
	border-color: var(--syf-coffee-ws-on);
	box-shadow: 0 14px 30px color-mix(in srgb, var(--syf-coffee-ws-on) 18%, transparent);
	transform: translateY(-3px);
}

.syf-coffee-ws-opt:has(input:focus-visible) {
	outline: 3px solid var(--syf-coffee-ws-tag);
	outline-offset: 3px;
}

.syf-coffee-ws-dot {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 2px solid var(--syf-coffee-line);
	border-radius: 50%;
}

.syf-coffee-ws-opt:has(input:checked) .syf-coffee-ws-dot {
	border-color: var(--syf-coffee-ws-on);
	background: var(--syf-coffee-ws-on);
}

.syf-coffee-ws-opt:has(input:checked) .syf-coffee-ws-dot::after {
	content: "";
	width: 9px;
	height: 5px;
	border-bottom: 2px solid #fff;
	border-left: 2px solid #fff; /* physical: the tick must not mirror in RTL */
	transform: translateY(-1px) rotate(-45deg);
}

.syf-coffee-ws-name {
	display: block;
	padding-inline-end: 28px;
	color: var(--syf-coffee-ink);
	font-weight: 900;
	font-size: 1.05rem;
}

.syf-coffee .syf-coffee-ws-price {
	display: block;
	margin-top: 6px;
	color: var(--syf-coffee-ink);
	font-weight: 900;
	font-size: 1.6rem;
	line-height: 1.1;
}

.syf-coffee-ws-price .amount,
.syf-coffee-ws-total .amount {
	color: inherit;
}

.syf-coffee-ws-note {
	display: block;
	margin-top: 4px;
	font-weight: 700;
	font-size: .82rem;
}

.syf-coffee-ws-tag {
	position: absolute;
	top: -12px;
	inset-inline-start: 14px;
	padding: 1px 12px;
	border-radius: 999px;
	background: var(--syf-coffee-ws-tag);
	color: #fff;
	font-weight: 900;
	font-size: .75rem;
	line-height: 1.6;
}

.syf-coffee-ws-sum {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-block: 12px;
	padding-inline: 18px 12px;
	border-radius: 999px;
	background: var(--syf-coffee-bg2);
	animation: syf-coffee-ws-in .3s ease;
}

.syf-coffee-ws-sum[hidden] {
	display: none;
}

.syf-coffee-ws-total {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}

.syf-coffee-ws-total b {
	color: var(--syf-coffee-ink);
	font-weight: 900;
	font-size: 1.6rem;
	line-height: 1.1;
}

.syf-coffee-ws-total s {
	font-size: .9rem;
}

.syf-coffee-ws .added_to_cart {
	font-size: .86rem;
}

@keyframes syf-coffee-ws-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.syf-coffee-ws-opt,
	.syf-coffee-ws-sum {
		transition: none;
		animation: none;
	}
}

@media (max-width: 860px) {
	.syf-coffee-ws {
		grid-template-columns: minmax(0, 1fr);
	}

	.syf-coffee-ws-img-end .syf-coffee-ws-media {
		order: 0;
	}

	.syf-coffee-ws-media {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 480px) {
	.syf-coffee-ws-sum {
		border-radius: var(--syf-coffee-r-md);
	}

	.syf-coffee-ws-sum .syf-coffee-btn {
		width: 100%;
	}
}
