/**
 * Perfamix single-product offer.
 * Mobile-first, CSS-only, and intentionally scoped to the product summary.
 */

.single-product .goldsmith-product-summary .perfamix-product-offer {
	--perfamix-offer-deep: #173a28;
	--perfamix-offer-green: #264e36;
	--perfamix-offer-sage: #78947c;
	--perfamix-offer-gold: #c8a05a;
	--perfamix-offer-gold-readable: #dec58f;
	--perfamix-offer-paper: #f7f9f5;
	isolation: isolate;
	display: grid;
	grid-template-columns: 94px minmax(0, 1fr);
	width: 100%;
	min-height: 136px;
	padding: 7px;
	overflow: hidden;
	border: 1px solid rgba(38, 78, 54, 0.15);
	border-radius: 18px;
	background:
		radial-gradient(circle at 94% 8%, rgba(200, 160, 90, 0.16), transparent 31%),
		linear-gradient(135deg, #fbfcfa 0%, var(--perfamix-offer-paper) 100%);
	box-shadow: 0 14px 34px rgba(23, 58, 40, 0.08);
	color: var(--perfamix-offer-deep);
	text-align: start;
}

.single-product .goldsmith-product-summary .goldsmith-summary-item + .perfamix-product-offer {
	margin-top: 16px;
}

.single-product .perfamix-product-offer::before {
	position: absolute;
	z-index: -1;
	top: -42px;
	inline-size: 112px;
	block-size: 112px;
	inset-inline-end: -45px;
	border: 1px solid rgba(120, 148, 124, 0.18);
	border-radius: 50%;
	box-shadow:
		0 0 0 15px rgba(120, 148, 124, 0.05),
		0 0 0 31px rgba(120, 148, 124, 0.035);
	content: "";
	pointer-events: none;
}

.single-product .perfamix-product-offer__visual {
	position: relative;
	display: flex;
	min-width: 0;
	overflow: hidden;
	flex-direction: column;
	justify-content: space-between;
	padding: 12px 11px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 13px;
	background:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(145deg, var(--perfamix-offer-green), var(--perfamix-offer-deep));
	background-size: 13px 13px, 13px 13px, auto;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
	color: #fff;
}

.single-product .perfamix-product-offer__visual::after {
	position: absolute;
	inline-size: 54px;
	block-size: 54px;
	inset-inline-end: -22px;
	bottom: -24px;
	border: 13px solid rgba(200, 160, 90, 0.14);
	border-radius: 50%;
	content: "";
}

.single-product .perfamix-product-offer__icon {
	display: inline-grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border: 1px solid rgba(200, 160, 90, 0.42);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
	color: var(--perfamix-offer-gold-readable);
}

.single-product .perfamix-product-offer__icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.single-product .perfamix-product-offer__metric {
	position: relative;
	z-index: 1;
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	direction: ltr;
	unicode-bidi: isolate;
}

.single-product .perfamix-product-offer__metric strong {
	max-width: 100%;
	overflow: hidden;
	color: #fff;
	font-family: var(--goldsmith-font-heading, inherit);
	font-size: clamp(20px, 6vw, 28px);
	font-weight: 700;
	letter-spacing: -0.055em;
	line-height: 0.95;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.single-product .perfamix-product-offer__metric span {
	margin-top: 6px;
	color: var(--perfamix-offer-gold-readable);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
}

.single-product .perfamix-product-offer__content {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	justify-content: center;
	padding: 13px 11px 16px 15px;
}

.single-product .perfamix-product-offer__eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #58705c;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.13em;
	line-height: 1.2;
	text-transform: uppercase;
}

.single-product .perfamix-product-offer__eyebrow > span {
	width: 6px;
	height: 6px;
	flex: 0 0 6px;
	border-radius: 50%;
	background: var(--perfamix-offer-gold);
	box-shadow: 0 0 0 4px rgba(200, 160, 90, 0.12);
}

.single-product .goldsmith-product-summary .perfamix-product-offer h3 {
	margin: 9px 0 5px;
	color: var(--perfamix-offer-green);
	font-family: var(--goldsmith-font-heading, inherit);
	font-size: clamp(17px, 4.8vw, 21px);
	font-weight: 650;
	letter-spacing: -0.035em;
	line-height: 1.08;
}

.single-product .goldsmith-product-summary .perfamix-product-offer p {
	max-width: 47ch;
	margin: 0;
	color: #607064;
	font-size: 11.5px;
	line-height: 1.5;
}

.single-product .perfamix-product-offer__signal {
	position: absolute;
	display: flex;
	gap: 4px;
	bottom: 7px;
	inset-inline-end: 11px;
}

.single-product .perfamix-product-offer__signal > span {
	display: block;
	width: 12px;
	height: 2px;
	border-radius: 2px;
	background: rgba(120, 148, 124, 0.22);
}

.single-product .perfamix-product-offer__signal > span:first-child {
	width: 25px;
	background: var(--perfamix-offer-gold);
}

/* Keep the paper surface legible in Goldsmith's optional dark showcase. */
.single-product .goldsmith-product-showcase.goldsmith-bg-dark .goldsmith-product-summary .goldsmith-summary-item.perfamix-product-offer {
	color: var(--perfamix-offer-deep);
}

.single-product .goldsmith-product-showcase.goldsmith-bg-dark .goldsmith-product-summary .goldsmith-summary-item.perfamix-product-offer p {
	color: #607064;
}

/* Goldsmith may render the cart template again in overlays or its fixed cart. */
.goldsmith-product-bottom-popup-cart .perfamix-product-offer,
.goldsmith-quickshop-wrapper .perfamix-product-offer,
.goldsmith-quickview-wrapper .perfamix-product-offer {
	display: none;
}

@media (min-width: 480px) {
	.single-product .goldsmith-product-summary .perfamix-product-offer {
		grid-template-columns: 112px minmax(0, 1fr);
		min-height: 146px;
		padding: 8px;
		border-radius: 20px;
	}

	.single-product .perfamix-product-offer__visual {
		padding: 14px;
		border-radius: 14px;
	}

	.single-product .perfamix-product-offer__icon {
		width: 36px;
		height: 36px;
	}

	.single-product .perfamix-product-offer__content {
		padding: 17px 21px 19px;
	}

	.single-product .goldsmith-product-summary .perfamix-product-offer h3 {
		font-size: clamp(20px, 3.2vw, 24px);
	}

	.single-product .goldsmith-product-summary .perfamix-product-offer p {
		font-size: 12.5px;
	}

	.single-product .perfamix-product-offer__metric strong {
		font-size: 31px;
	}
}

@media (max-width: 340px) {
	.single-product .goldsmith-product-summary .perfamix-product-offer {
		grid-template-columns: 82px minmax(0, 1fr);
		min-height: 130px;
		padding: 6px;
		border-radius: 16px;
	}

	.single-product .perfamix-product-offer__visual {
		padding: 10px 9px;
		border-radius: 11px;
	}

	.single-product .perfamix-product-offer__icon {
		width: 29px;
		height: 29px;
	}

	.single-product .perfamix-product-offer__content {
		padding: 11px 9px 14px 12px;
	}

	.single-product .goldsmith-product-summary .perfamix-product-offer h3 {
		font-size: 16px;
	}

	.single-product .goldsmith-product-summary .perfamix-product-offer p {
		font-size: 10.75px;
	}

	.single-product .perfamix-product-offer__metric strong {
		font-size: 20px;
	}
}
