/*
 * HD 0262: the SOLD OUT stamp. Everything is scoped under .sf-sold-out*, which only
 * sold_out.js and the sold-out branch of item_add_to_cart.html ever render, so this file
 * changes nothing on a page with no sold-out item.
 *
 * House red #A82024 (the site's red, not the brand doc's #f80010: owner decision 2026-10-01).
 * White on #A82024 is about 7:1. No visible text below 14px.
 */

:root {
	--sf-so-red: #A82024;
	--sf-so-red-dark: #7d1419;
	--sf-so-cream: #eae5dc;
	--sf-so-ink: #3d3d3d;
}

/* ---------- shared starburst ---------- */
.sf-sold-out-burst {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	background: var(--sf-so-red);
	clip-path: polygon(50% 0%, 59% 10%, 71% 4%, 75% 16%, 88% 14%, 86% 27%, 98% 32%, 91% 43%,
		100% 50%, 91% 57%, 98% 68%, 86% 73%, 88% 86%, 75% 84%, 71% 96%, 59% 90%, 50% 100%,
		41% 90%, 29% 96%, 25% 84%, 12% 86%, 14% 73%, 2% 68%, 9% 57%, 0% 50%, 9% 43%, 2% 32%,
		14% 27%, 12% 14%, 25% 16%, 29% 4%, 41% 10%);
	transform: rotate(-12deg);
	font-family: "Cardo", Georgia, "Times New Roman", serif;
	line-height: 1.05;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

.sf-sold-out-burst .sf-so-main {
	max-width: 62%; /* always two lines, so the word never reaches the star's points */
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.sf-sold-out-burst .sf-so-sub {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 600;
	font-size: 14px;
	margin-top: 0.25em;
	max-width: 66%;
}

/* ---------- catalogue / category / landing-page cards ---------- */
.sf-sold-out-card {
	position: relative;
}

/* Photos stay in full colour on purpose: greyed-out meat looks unappetising (Will, 2026-12-02). */

.sf-sold-out-card > .sf-sold-out-burst {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
	width: clamp(150px, 62%, 190px);
	aspect-ratio: 1 / 1;
	pointer-events: none;
}

/* text must sit inside the star's inner circle, about 70% of its width */
.sf-sold-out-card > .sf-sold-out-burst .sf-so-main {
	font-size: 1.6rem;
}

/* the disabled button that replaces Add to Cart */
.sf-sold-out-btn,
.sf-sold-out-btn:hover,
.sf-sold-out-btn:focus {
	background: var(--sf-so-cream) !important;
	border: 2px solid var(--sf-so-red) !important;
	color: var(--sf-so-red) !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: not-allowed !important;
	box-shadow: none !important;
}

/* ---------- product page: replaces the buy box ---------- */
.sf-sold-out-pdp {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin: 1.25rem 0;
	padding: 1.25rem 1.5rem;
	background: var(--sf-so-cream);
	border: 3px double var(--sf-so-red);
	border-radius: 10px;
}

.sf-sold-out-pdp .sf-sold-out-burst {
	flex: 0 0 auto;
	width: 170px;
	aspect-ratio: 1 / 1;
}

.sf-sold-out-pdp .sf-sold-out-burst .sf-so-main {
	font-size: 2.1rem;
}

.sf-sold-out-pdp-text h2 {
	font-family: "Cardo", Georgia, serif;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--sf-so-red);
	margin: 0 0 0.35rem;
}

.sf-sold-out-pdp-text p {
	color: var(--sf-so-ink);
	font-size: 18px;
	line-height: 1.6;
	margin: 0;
}

.sf-sold-out-pdp-text a {
	color: var(--sf-so-red);
	font-weight: 600;
	text-decoration: underline;
}

@media (max-width: 575px) {
	.sf-sold-out-pdp {
		flex-direction: column;
		text-align: center;
	}
	.sf-sold-out-pdp .sf-sold-out-burst {
		width: 150px;
	}
}

/* a single pop when the stamp lands; off for anyone who asks for less motion */
@media (prefers-reduced-motion: no-preference) {
	.sf-sold-out-burst {
		animation: sf-so-stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both;
	}
	@keyframes sf-so-stamp {
		from { transform: rotate(-30deg) scale(1.8); opacity: 0; }
		to   { transform: rotate(-12deg) scale(1); opacity: 1; }
	}
}
