/**
 * Out-N-Out Before & After. Token-driven; no JS. Handle: oon-widget-before-after.
 * Shared by the theme single-product template and the Elementor widget. Centred
 * eyebrow + heading over a responsive card grid (1 / 2 / 3 columns), matching the
 * live "Transformations" section. The card grid adapts to any number of pairs.
 */
/* Full-bleed light-grey band with a centred inner container — mirrors live's
   m-color-footer (#f5f5f5) section over a container-fluid (~1620px). The negative
   margins break the section out of the 1170 product container to full width. */
.oon-ba {
	margin-inline: calc(50% - 50vw);
	/* Live m-section-py: --section-padding 50px (scales down on smaller screens). */
	padding-block: clamp(30px, 4vw, 50px);
	background: var(--oon-color-bg-secondary, #f5f5f5);
}
.oon-ba__header,
.oon-ba__grid {
	max-width: 1650px;
	margin-inline: auto;
	padding-inline: 15px;
}

/* Centred section header (eyebrow + heading) */
.oon-ba__header {
	text-align: center;
	margin-bottom: clamp(28px, 4vw, 48px);
}
.oon-ba__eyebrow {
	margin: 0 0 10px;
	font-family: var(--oon-font-body);
	font-weight: var(--oon-fw-medium, 500);
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	color: var(--oon-color-text-secondary, #666);
}
.oon-ba__heading {
	margin: 0;
	font-family: var(--oon-font-heading);
	font-weight: var(--oon-fw-heading, 500);
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	line-height: 1.15;
	color: var(--oon-color-heading, #332d55);
}

/* Card grid: 3 equal columns on desktop (one row), 2 on tablet, 1 on mobile —
   like live's grid-1/2/3-cols. repeat(3,1fr) never wraps the third card. */
.oon-ba__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 30px;
	row-gap: 130px;
}

.oon-ba__card {
	margin: 0;
}
.oon-ba__pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.oon-ba__pair[data-count="1"] {
	grid-template-columns: 1fr;
}

.oon-ba__img {
	position: relative;
	overflow: hidden;
	border-radius: var(--oon-radius-md, 10px);
	background: var(--oon-color-bg-secondary, #f5f5f5);
	aspect-ratio: 3 / 4;
}
.oon-ba__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Composite mode: a single image holds the whole (baked-in) transformation —
   show it complete, uncropped, at its natural aspect ratio (no forced crop). */
.oon-ba__pair--composite {
	grid-template-columns: 1fr;
}
.oon-ba__img--composite {
	aspect-ratio: auto;
	/* Composites are transparent PNGs (subject on a transparent bg). Render them
	   on white so each is a clean white card like live — otherwise the grey
	   section shows through the transparent padding and reads as a huge row gap. */
	background: #fff;
}
.oon-ba__img--composite img {
	height: auto;
	object-fit: contain;
}

/* Before / After labels (our pairs are separate images, so they carry a tag —
   unlike live's single baked-in composites). */
.oon-ba__tag {
	position: absolute;
	left: 10px;
	bottom: 10px;
	padding: 3px 10px;
	font-family: var(--oon-font-body);
	font-size: 0.7rem;
	font-weight: var(--oon-fw-medium, 500);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(26, 26, 26, 0.85);
	border-radius: var(--oon-radius-full, 9999px);
}
.oon-ba__tag--after {
	background: rgba(37, 150, 80, 0.92);
}

.oon-ba__caption {
	margin-top: 12px;
	text-align: center;
	font-family: var(--oon-font-body);
	color: var(--oon-color-text-secondary, #666);
}

.oon-ba__notice {
	padding: 20px;
	border: 1px dashed var(--oon-color-border, #eee);
	color: var(--oon-color-text-secondary, #666);
	text-align: center;
	border-radius: var(--oon-radius-sm, 4px);
}

/* Tablet: 2 columns. */
@media (max-width: 1024px) {
	.oon-ba__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}
/* Mobile: 1 column. Live mobile gaps: column 16px, row 24px. */
@media (max-width: 767px) {
	.oon-ba__grid {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 16px;
		row-gap: 24px;
	}
}
@media (max-width: 480px) {
	.oon-ba__pair {
		gap: 6px;
	}
}
