/**
 * Public Free Delivery badge and no-library tooltip.
 */
.oe-free-delivery-badge-wrap {
	position: relative;
	z-index: 2;
	display: inline-block;
	margin: 0 0 12px;
	line-height: 1.3;
}

.oe-free-delivery-badge {
	display: inline-block;
	padding: 7px 11px;
	border-radius: 4px;
	background: #16843f;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.oe-free-delivery-tooltip {
	position: absolute;
	bottom: calc(100% + 9px);
	left: 50%;
	width: max-content;
	max-width: 240px;
	padding: 8px 10px;
	border-radius: 4px;
	background: #222;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.oe-free-delivery-tooltip::after {
	position: absolute;
	top: 100%;
	left: 50%;
	border: 6px solid transparent;
	border-top-color: #222;
	content: "";
	transform: translateX(-50%);
}

.oe-free-delivery-tooltip::before {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	height: 10px;
	content: "";
}

.oe-free-delivery-tooltip a {
	color: #fff !important;
	font-size: 12px;
	font-weight: 500;
	text-decoration: underline;
}

.oe-free-delivery-badge-wrap:hover .oe-free-delivery-tooltip,
.oe-free-delivery-badge-wrap:focus-within .oe-free-delivery-tooltip {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

/* Keep the archive badge positioned in normal flow across WooCommerce themes. */
.woocommerce ul.products li.product .oe-free-delivery-badge-wrap {
	display: table;
	margin: 8px 0 12px;
}

@media (prefers-reduced-motion: reduce) {
	.oe-free-delivery-tooltip {
		transition: none;
	}
}

/**
 * Percentage sale sticker. The native .onsale class retains WooCommerce/theme
 * placement over the top-left of product images.
 */
.woocommerce .oe-discount-sticker.onsale {
	--oe-sticker-colour: #f48fb1;
	position: absolute;
	overflow: visible;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 90px;
	height: 90px;
	min-width: 90px;
	min-height: 90px;
	box-sizing: border-box;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: #fff;
	font-size: 19px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	transform: none;
}

.woocommerce .oe-discount-sticker.onsale::after {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: var(--oe-sticker-colour);
	content: "";
	filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.3));
	-webkit-mask: url("../images/red-poly-line.svg") top left / contain no-repeat;
	mask: url("../images/red-poly-line.svg") top left / contain no-repeat;
}

/* Establish a positioning context when a theme removes WooCommerce's sale flash. */
.woocommerce div.product,
.woocommerce ul.products li.product {
	position: relative;
}

.woocommerce div.product .oe-discount-sticker.onsale {
	position: absolute;
	top: 0 !important;
	right: auto !important;
	bottom: auto !important;
	left: 0 !important;
	z-index: 12;
	margin: 0 !important;
	width: 270px;
	height: 270px;
	min-width: 270px;
	min-height: 270px;
}

.woocommerce div.product .oe-discount-sticker-value {
	top: 76px;
	left: -25px;
	width: 246px;
	font-size: 45px;
}

.woocommerce div.product .oe-discount-sticker-value small {
	margin-left: 0;
	font-size: 45px;
}

.woocommerce ul.products li.product .oe-discount-sticker.onsale {
	position: absolute;
	top: 0 !important;
	right: auto !important;
	bottom: auto !important;
	left: 0 !important;
	z-index: 12;
	margin: 0 !important;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-under-30 {
	--oe-sticker-colour: #f48fb1;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-30 {
	--oe-sticker-colour: #f06292;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-40 {
	--oe-sticker-colour: #ec407a;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-50 {
	--oe-sticker-colour: #d81b60;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-60 {
	--oe-sticker-colour: #ad1457;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-70 {
	--oe-sticker-colour: #d32f4f;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-80 {
	--oe-sticker-colour: #e51c23;
}

.woocommerce .oe-discount-sticker.onsale.oe-discount-90 {
	--oe-sticker-colour: #ff1600;
}

.oe-discount-sticker-value {
	position: absolute;
	top: 25px;
	left: -8px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	width: 82px;
	font-size: 15px;
	font-weight: 900;
	text-align: center;
	white-space: nowrap;
	transform: rotate(-45deg);
}

.oe-discount-sticker-value small {
	display: inline;
	margin: 0;
	color: inherit;
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.08em;
	line-height: 1;
}

.oe-discount-sticker-tooltip {
	position: absolute;
	top: calc(100% + 6px);
	left: 12px;
	z-index: 20;
	width: max-content;
	max-width: 240px;
	box-sizing: border-box;
	padding: 9px 11px;
	border-radius: 4px;
	background: #222;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: normal;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	text-align: left;
	text-shadow: none;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.oe-discount-sticker-tooltip::before {
	position: absolute;
	bottom: 100%;
	left: 18px;
	border: 7px solid transparent;
	border-bottom-color: #222;
	content: "";
}

.oe-discount-sticker:hover .oe-discount-sticker-tooltip,
.oe-discount-sticker:focus .oe-discount-sticker-tooltip,
.oe-discount-sticker:focus-within .oe-discount-sticker-tooltip {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.oe-discount-sticker-tooltip {
		transition: none;
	}
}

/**
 * Variable-product offer summary. Its desktop offset aligns it with common
 * "Please Choose" headings immediately above the variations form.
 */
.woocommerce div.product form.variations_form {
	position: relative;
}

.woocommerce div.product .oe-variable-offer-heading-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 12px;
}

.woocommerce div.product .oe-variable-offer-heading-row > :first-child {
	flex: 0 0 auto;
	margin: 0;
}

.woocommerce div.product .oe-variable-offer-card {
	--oe-sticker-colour: #f48fb1;
	position: absolute;
	right: auto;
	left: 175px;
	top: -8px;
	width: max-content;
	max-width: 100%;
	box-sizing: border-box;
	padding: 13px 20px;
	border: 1px solid var(--oe-sticker-colour);
	border-radius: 18px;
	background: var(--oe-sticker-colour);
	box-shadow: 0 2px 5px rgba(160, 36, 50, 0.12);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
	white-space: normal;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-under-30 {
	--oe-sticker-colour: #f48fb1;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-30 {
	--oe-sticker-colour: #f06292;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-40 {
	--oe-sticker-colour: #ec407a;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-50 {
	--oe-sticker-colour: #d81b60;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-60 {
	--oe-sticker-colour: #ad1457;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-70 {
	--oe-sticker-colour: #d32f4f;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-80 {
	--oe-sticker-colour: #e51c23;
}

.woocommerce div.product .oe-variable-offer-card.oe-discount-90 {
	--oe-sticker-colour: #ff1600;
}

.woocommerce div.product .oe-variable-offer-heading-row .oe-variable-offer-card {
	position: static;
	flex: 0 0 auto;
	margin: 0;
}

.woocommerce div.product .oe-simple-offer-card {
	position: static;
	width: max-content;
	max-width: 100%;
	margin: 18px 0;
}

/* The exact simple-product quantity is already displayed inside the offer card. */
.single-product div.product.product-type-simple p.stock.in-stock {
	display: none;
}

.woocommerce div.product .oe-variable-offer-card-heading {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: normal;
	line-height: 1.25;
	text-transform: none;
}

.woocommerce div.product .oe-variable-offer-card-heading span {
	display: block;
}

.woocommerce div.product .oe-variable-offer-card-heading span + span {
	margin-top: 2px;
}

.woocommerce div.product .oe-variable-offer-card-note {
	margin: 7px 0 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.3;
}

@media (max-width: 767px) {
	.woocommerce div.product .oe-discount-sticker.onsale {
		width: 180px;
		height: 180px;
		min-width: 180px;
		min-height: 180px;
	}

	.woocommerce div.product .oe-discount-sticker-value {
		top: 51px;
		left: -17px;
		width: 164px;
		font-size: 30px;
	}

	.woocommerce div.product .oe-discount-sticker-value small {
		margin-left: 0;
		font-size: 30px;
	}

	.woocommerce div.product .oe-variable-offer-heading-row {
		display: block;
	}

	.woocommerce div.product .oe-variable-offer-card {
		position: static;
		width: max-content;
		max-width: 100%;
		margin: 0 0 14px;
		white-space: normal;
	}
}

/**
 * Clickable Free Delivery control and accessible terms modal.
 */
.woocommerce div.product .oe-free-delivery-control {
	display: block;
	margin: 10px 0 18px;
}

.woocommerce div.product .oe-free-delivery-trigger {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	min-height: 82px;
	box-sizing: border-box;
	padding: 4px 8px 4px 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
	color: #26332a;
	cursor: pointer;
	font: inherit;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.woocommerce div.product .oe-free-delivery-trigger:hover .oe-free-delivery-copy > span {
	text-decoration: underline;
}

.woocommerce div.product .oe-free-delivery-trigger:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 3px;
}

.oe-free-delivery-icon {
	display: inline-flex;
	width: 132px;
	height: 66px;
	flex: 0 0 132px;
}

.oe-free-delivery-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.oe-free-delivery-icon .oe-truck-wrap,
.oe-free-delivery-icon .oe-truck-wheel {
	transform-box: fill-box;
	transform-origin: center;
}

.oe-free-delivery-icon.oe-truck-animate-once .oe-truck-wrap {
	animation: oe-truck-enter-and-settle 1.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.oe-free-delivery-icon.oe-truck-animate-once .oe-truck-wheel {
	animation: oe-truck-wheel-roll 1.05s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes oe-truck-enter-and-settle {
	0% {
		opacity: 0;
		transform: translateX(-48px) translateY(0);
	}
	12% {
		opacity: 1;
	}
	76% {
		opacity: 1;
		transform: translateX(0) translateY(0);
	}
	86% {
		transform: translateX(0) translateY(2px);
	}
	94% {
		transform: translateX(0) translateY(-1px);
	}
	100% {
		opacity: 1;
		transform: translateX(0) translateY(0);
	}
}

@keyframes oe-truck-wheel-roll {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(540deg);
	}
}

.oe-free-delivery-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.2;
}

.oe-free-delivery-copy strong {
	color: #55775f;
	font-size: 21px;
	font-weight: 700;
	letter-spacing: 0.1em;
}

.oe-free-delivery-copy > span {
	color: #2c2c2c;
	font-size: 17px;
	font-weight: 600;
}

.oe-free-delivery-copy > span span {
	color: #c76843;
	font-size: 24px;
	line-height: 0;
	vertical-align: -2px;
}

.oe-delivery-modal[hidden] {
	display: none !important;
}

.oe-delivery-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.oe-delivery-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.62);
}

.oe-delivery-modal-dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(720px, 100%);
	height: min(600px, calc(100vh - 48px));
	max-height: calc(100vh - 48px);
	box-sizing: border-box;
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

.oe-delivery-modal-dialog:focus {
	outline: none;
}

.oe-delivery-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 18px 22px;
	border-bottom: 1px solid #dfe5e1;
	background: #f6f9f7;
}

.oe-delivery-modal-header h2 {
	margin: 0;
	color: #2f5039;
	font-size: 22px;
	line-height: 1.25;
}

.oe-delivery-modal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #26332a;
	cursor: pointer;
	font-size: 32px;
	line-height: 1;
}

.oe-delivery-modal-close:hover,
.oe-delivery-modal-close:focus-visible {
	background: #e4ece7;
}

.oe-delivery-modal-close:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.oe-delivery-modal-content {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 24px 26px 32px;
	color: #2c2c2c;
	font-size: 15px;
	line-height: 1.65;
	scrollbar-gutter: stable;
}

.oe-delivery-modal-content > :first-child {
	margin-top: 0;
}

.oe-delivery-modal-content > :last-child {
	margin-bottom: 0;
}

body.oe-delivery-modal-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.woocommerce div.product .oe-free-delivery-trigger {
		width: 100%;
		justify-content: flex-start;
		gap: 12px;
	}

	.oe-free-delivery-icon {
		width: 100px;
		height: 50px;
		flex-basis: 100px;
	}

	.oe-free-delivery-copy strong {
		font-size: 20px;
	}

	.oe-free-delivery-copy > span {
		font-size: 15px;
	}

	.oe-delivery-modal {
		padding: 12px;
	}

	.oe-delivery-modal-dialog {
		width: 100%;
		height: 86vh;
		max-height: 86vh;
		border-radius: 10px;
	}

	.oe-delivery-modal-header {
		padding: 14px 16px;
	}

	.oe-delivery-modal-header h2 {
		font-size: 18px;
	}

	.oe-delivery-modal-content {
		padding: 20px 18px 26px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce div.product .oe-free-delivery-trigger {
		transition: none;
	}

	.oe-free-delivery-icon .oe-truck-wrap,
	.oe-free-delivery-icon .oe-truck-wheel {
		animation: none;
		transform: none;
		opacity: 1;
	}
}

/**
 * Text-free starburst artwork based on the supplied 30/40/50/clearance badges.
 * These final rules intentionally override the legacy diagonal-ribbon rules.
 */
.woocommerce .oe-discount-sticker.onsale {
	--oe-badge-image: url("../images/badge-clearance-exact.png");
	--oe-badge-colour: #5A1420;
	overflow: hidden;
	width: 130px;
	height: 130px;
	min-width: 130px;
	min-height: 130px;
	background: var(--oe-badge-image) center / contain no-repeat !important;
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.24));
}

.woocommerce .oe-discount-sticker.onsale::after {
	display: none;
}

.woocommerce div.product .oe-discount-sticker.onsale {
	top: 10px !important;
	left: 10px !important;
	width: 139px;
	height: 139px;
	min-width: 139px;
	min-height: 139px;
}

.woocommerce ul.products li.product .oe-discount-sticker.onsale {
	top: 7px !important;
	left: 7px !important;
	width: 91px;
	height: 91px;
	min-width: 91px;
	min-height: 91px;
}

/* Match the default rule's specificity so variation changes replace the image. */
.woocommerce .oe-discount-sticker.onsale.oe-badge-30 { --oe-badge-image: url("../images/badge-30-exact.png"); --oe-badge-colour: #D87554; }
.woocommerce .oe-discount-sticker.onsale.oe-badge-40 { --oe-badge-image: url("../images/badge-40-exact.png"); --oe-badge-colour: #B94F3A; }
.woocommerce .oe-discount-sticker.onsale.oe-badge-50 { --oe-badge-image: url("../images/badge-50-exact.png"); --oe-badge-colour: #962B2B; }
.woocommerce .oe-discount-sticker.onsale.oe-badge-clearance { --oe-badge-image: url("../images/badge-clearance-exact.png"); --oe-badge-colour: #5A1420; }

.woocommerce .oe-discount-sticker .oe-discount-sticker-value,
.woocommerce div.product .oe-discount-sticker .oe-discount-sticker-value {
	display: none !important;
}

.woocommerce div.product .oe-discount-sticker .oe-discount-sticker-value {
	font-size: 19px;
}

.oe-discount-sticker-line-primary,
.oe-discount-sticker-line-secondary {
	display: block;
}

.oe-discount-sticker-line-secondary {
	margin-top: 3px;
	font-size: 0.56em;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
}

.woocommerce .oe-badge-text-clearance .oe-discount-sticker-value {
	width: 78%;
	font-size: 12px;
	letter-spacing: 0.04em;
	transform: rotate(-27deg);
}

.woocommerce div.product .oe-badge-text-clearance .oe-discount-sticker-value {
	font-size: 17px;
}

.woocommerce .oe-discount-sticker-tooltip {
	display: none;
}

.woocommerce div.product .oe-variable-offer-card.oe-badge-30 { --oe-sticker-colour: #D87554; }
.woocommerce div.product .oe-variable-offer-card.oe-badge-40 { --oe-sticker-colour: #B94F3A; }
.woocommerce div.product .oe-variable-offer-card.oe-badge-50 { --oe-sticker-colour: #962B2B; }
.woocommerce div.product .oe-variable-offer-card.oe-badge-clearance { --oe-sticker-colour: #5A1420; }

@media (max-width: 767px) {
	.woocommerce div.product .oe-discount-sticker.onsale {
		top: 7px !important;
		left: 7px !important;
		width: 113px;
		height: 113px;
		min-width: 113px;
		min-height: 113px;
	}

	.woocommerce div.product .oe-discount-sticker .oe-discount-sticker-value {
		font-size: 16px;
	}

	.woocommerce div.product .oe-badge-text-clearance .oe-discount-sticker-value {
		font-size: 13px;
	}
}
