/* MM Global Sections v1.2.2 (2026-11). Scoped to .mm-gs; uses the theme's existing type/button classes. */
.mm-gs {
	--mm-gs-orange: #e97709;
	--mm-gs-brown: #66544c;
	--mm-gs-dark: #4c3a2d;
	--mm-gs-cream: #f9f5ef;
	position: relative;
	background: var(--mm-gs-cream);
	color: var(--mm-gs-brown);
	padding: 4.5rem 0;
	overflow: hidden;
}
.mm-gs .mm-gs-title {
	color: #2b211a;
}
.mm-gs .mm-gs-head {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}
.mm-gs .mm-gs-intro p {
	margin-bottom: 1rem;
	line-height: 1.6;
}
.mm-gs .mm-gs-intro p:last-child {
	margin-bottom: 0;
}
@media (min-width: 992px) {
	.mm-gs .mm-gs-head {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-start;
		gap: 3rem;
	}
	.mm-gs .mm-gs-head .mm-gs-title {
		flex: 0 1 42%;
	}
	.mm-gs .mm-gs-head .mm-gs-intro {
		flex: 0 1 48%;
	}
}

/* ---- Variation ---- */
.mm-gs-variation .mm-gs-variation-media {
	position: relative;
	margin: 0;
	overflow: visible; /* long card text may extend past the photo, never clipped */
	aspect-ratio: 15 / 7;
	background: #e7ddd0;
}
.mm-gs-variation .mm-gs-variation-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.mm-gs-variation .mm-gs-guides,
.mm-gs-variation .mm-gs-guides::before,
.mm-gs-variation .mm-gs-guides::after {
	position: absolute;
	pointer-events: none;
}
.mm-gs-variation .mm-gs-guides {
	inset: 0;
}
.mm-gs-variation .mm-gs-guides::before {
	content: "";
	left: 0;
	right: 0;
	top: 15%;
	height: 42%;
	border-top: 1px solid rgba(255, 255, 255, 0.45);
	border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}
.mm-gs-variation .mm-gs-guides::after {
	content: "";
	top: 0;
	bottom: 0;
	left: 62%;
	width: 18.5%;
	border-left: 1px solid rgba(255, 255, 255, 0.45);
	border-right: 1px solid rgba(255, 255, 255, 0.45);
}
.mm-gs-variation .mm-gs-cards {
	position: absolute;
	left: 62%;
	top: 15%;
	width: 18.5%;
	min-width: 170px;
	display: grid;
}
.mm-gs-variation .mm-gs-card {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-height: 9.5rem;
	padding: 0.9rem 1rem;
	background: #b85e07; /* darker brand orange: white text passes WCAG AA (4.5:1) */
	color: #fff;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0s linear 0.8s;
	overflow-wrap: anywhere;
}
.mm-gs-variation .mm-gs-card.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.8s ease;
}
.mm-gs-variation .mm-gs-card-tag {
	align-self: flex-start;
	margin-bottom: auto;
	padding: 0.15rem 0.5rem;
	background: #3b2e25;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.mm-gs-variation .mm-gs-card-name {
	margin-top: 1.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
}
.mm-gs-variation .mm-gs-cards.is-rotating .mm-gs-card {
	padding-bottom: 3rem; /* room for the Pause/Play button */
}
.mm-gs-variation .mm-gs-cards-toggle {
	position: absolute;
	right: 0.4rem;
	bottom: 0.4rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 50%;
	background: rgba(59, 46, 37, 0.85);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}
.mm-gs-variation .mm-gs-cards-toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.mm-gs-variation .mm-gs-cards-toggle-icon::before {
	content: "\275A\275A"; /* pause bars */
	font-size: 0.55rem;
	letter-spacing: -0.1em;
}
.mm-gs-variation .mm-gs-cards-toggle[aria-pressed="true"] .mm-gs-cards-toggle-icon::before {
	content: "\25B6"; /* play */
	font-size: 0.75rem;
	letter-spacing: 0;
}
@media (max-width: 991.98px) {
	/* Phones + tablets: photo keeps its crop, cards sit in normal flow under it (never clipped). */
	.mm-gs-variation .mm-gs-variation-media {
		aspect-ratio: auto;
		overflow: visible;
		background: none;
	}
	.mm-gs-variation .mm-gs-variation-img {
		aspect-ratio: 4 / 3;
		height: auto;
	}
	.mm-gs-variation .mm-gs-guides {
		display: none;
	}
	.mm-gs-variation .mm-gs-cards {
		position: relative;
		left: auto;
		top: auto;
		width: 100%;
		min-width: 0;
	}
	.mm-gs-variation .mm-gs-card {
		min-height: 7.5rem;
	}
}

@media (min-width: 992px) {
	/* Desktop: the card overlays the photo by sharing its grid cell (not position:absolute), so enlarged text
	   (browser font-size settings, 200% text) grows the photo area instead of being clipped by the section.
	   At normal text size this renders identically to the absolute layout (7% of the width = 15% of the 15:7 height). */
	.mm-gs-variation .mm-gs-variation-media {
		display: grid;
		aspect-ratio: auto;
	}
	.mm-gs-variation .mm-gs-variation-img {
		grid-area: 1 / 1;
		aspect-ratio: 15 / 7;
		height: 100%;
	}
	.mm-gs-variation .mm-gs-cards {
		position: relative;
		grid-area: 1 / 1;
		align-self: start;
		left: auto;
		top: auto;
		margin: 7% 0 1.5rem min(62%, calc(100% - max(170px, 10.625rem) - 1rem));
		width: 18.5%;
		min-width: max(170px, 10.625rem);
	}
}

/* ---- Variation, split layout (product pages, dark, Figma "Color Variation" row 2 col 3; MM pick 2026-11-12):
   text left inside the page container, photo on the right half at full section height out to the screen edge,
   orange arrow anchored bottom-right. Below 992px: text, then the photo edge to edge, flush with the section bottom. ---- */
.mm-gs.mm-gs-var-split {
	background: var(--mm-gs-dark);
	color: #efe7dc;
	padding-bottom: 0;
}
.mm-gs-var-split .mm-gs-title {
	color: #fff;
	margin-bottom: 1.25rem;
}
.mm-gs-var-split .mm-gs-split-text {
	margin-bottom: 2.5rem;
}
.mm-gs-var-split .mm-gs-split-media {
	position: relative;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #3b2e25;
}
.mm-gs-var-split .mm-gs-split-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 40%;
}
.mm-gs-var-split .mm-gs-split-shape {
	/* inline SVG arrow (Figma trace, 100x100 viewBox); preserveAspectRatio="xMaxYMax meet" keeps it square and
	   bottom-right whatever the photo box ratio. 65% = MM feedback 2026-11-12 ("a little smaller"). */
	position: absolute;
	right: 0;
	bottom: 0;
	width: 65%;
	height: 65%;
	fill: var(--mm-gs-orange);
	pointer-events: none;
}
/* No white band above the dark section: on product_new the theme's cream FAQ block right before it ends with
   .mb-6 (96px white margin). Only when that block is directly followed by this section (MM feedback 2026-11-12). */
.site-main > .mb-6:has(+ .mm-gs-var-split) {
	margin-bottom: 0 !important;
}
@media (min-width: 992px) {
	.mm-gs.mm-gs-var-split {
		display: flex;
		align-items: center;
		min-height: clamp(520px, 44vw, 720px);
		padding: 4.5rem 0;
	}
	.mm-gs-var-split > .container {
		width: 100%;
	}
	.mm-gs-var-split .mm-gs-split-text {
		/* left half of the container, clear of the photo */
		width: calc(50% - 2rem);
		max-width: 32rem;
		margin-bottom: 0;
	}
	.mm-gs-var-split .mm-gs-split-media {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 50%;
		aspect-ratio: auto;
	}
	.mm-gs-var-split .mm-gs-split-img {
		object-position: 30% 40%; /* keep the house left of the arrow */
	}
}

/* ---- Metrics ---- */
.mm-gs-metrics .mm-gs-metric-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}
.mm-gs-metrics .mm-gs-metric {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 2.5rem;
	min-height: 170px;
	padding: 1.5rem 1.5rem 1.25rem;
	background: var(--mm-gs-dark);
	color: #fff;
}
@media (min-width: 992px) {
	.mm-gs-metrics .mm-gs-metric {
		min-height: 220px;
		padding: 1.75rem 1.5rem 1.5rem;
	}
	.mm-gs-metrics .mm-gs-metric-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.25rem;
	}
}
.mm-gs-metrics .mm-gs-metric-label {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.5;
	max-width: 15em;
}
.mm-gs-metrics .mm-gs-metric-value {
	margin: 0;
	color: var(--mm-gs-orange);
	font-size: clamp(2.75rem, 4.2vw, 4.25rem);
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.mm-gs-metrics .mm-gs-count {
	display: inline-block;
	text-align: left;
}
.mm-gs-metrics .mm-gs-metric-visual {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.08em;
}
.mm-gs-metrics .mm-gs-unit,
.mm-gs-metrics .mm-gs-star {
	position: static;
	top: auto;
	vertical-align: baseline;
	font-size: max(24px, 0.42em); /* >=24px = WCAG "large text": orange on brown (3.65:1) passes 3:1 */
	line-height: 1;
	margin-top: 0.15em;
}
.mm-gs-metrics .mm-gs-star {
	font-size: max(24px, 0.35em);
	margin-left: 0.05em;
}
.mm-gs-metrics .mm-gs-footnote {
	margin: 0.9rem 0 0;
	font-size: 0.85rem;
	opacity: 0.85;
}

/* ---- Where to buy ---- */
.mm-gs-wtb .mm-gs-wtb-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: center;
	position: relative;
	z-index: 1;
}
@media (min-width: 992px) {
	.mm-gs-wtb .mm-gs-wtb-grid {
		grid-template-columns: 0.9fr 1.1fr;
		gap: 3.5rem;
	}
}
.mm-gs-wtb .mm-gs-wtb-text .mm-gs-title {
	margin-bottom: 1.25rem;
}
.mm-gs-wtb .mm-gs-wtb-text .mm-gs-intro {
	margin-bottom: 1.75rem;
	max-width: 34rem;
}
.mm-gs-wtb .mm-gs-btn {
	min-width: 0;
}
/* Keyboard focus: the theme's .btn-diagonal shape uses clip-path, which cuts off any outline, so the indicator is
   drawn INSIDE the shape: a 2px dark band + 3px white ring (contrast >= 3:1 on the brown default AND the orange hover). */
.mm-gs-wtb .mm-gs-btn:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px #2a1f18, inset 0 0 0 5px #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mm-gs-wtb .mm-gs-wtb-media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	align-items: start;
}
.mm-gs-wtb .mm-gs-wtb-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.mm-gs-wtb .mm-gs-wtb-photo-1 {
	aspect-ratio: 0.64;
}
.mm-gs-wtb .mm-gs-wtb-photo-2 {
	aspect-ratio: 0.72;
	margin-top: 4.5rem;
}
/* Brand corner (MM feedback 2026-11-12: the traced shapes were off-brand): the theme's own top-left angle
   (images/shape-angle-left-top-3.svg, used as .shape-left-top-orange-3), sized and shown like the theme does
   (>= 1200px only, width capped at 144px). */
.mm-gs-wtb .mm-gs-wtb-brand {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: clamp(40px, 8vw, 144px);
	aspect-ratio: 207 / 285.5;
	background: url("../images/shape-angle-left-top-3.svg") no-repeat left top / contain;
	pointer-events: none;
}
@media (min-width: 1200px) {
	.mm-gs-wtb .mm-gs-wtb-brand {
		display: block;
	}
}
@media (max-width: 767.98px) {
	.mm-gs-wtb .mm-gs-wtb-photo-2 {
		margin-top: 2.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mm-gs-variation .mm-gs-card,
	.mm-gs-variation .mm-gs-card.is-active {
		transition: none;
	}
}
