/* Blue Mar Wellness 2026 — Products page (2026.08.20 comp). */

/* ------------------------------------------------------------------- hero */

.products-hero {
	position: relative;
	/* No overflow:hidden — the intro photo is allowed to overhang the hero's
	   bottom edge slightly (the duotone bg stays clipped by its own
	   .hero-parallax__clip wrapper). */
	background: var(--bmw-black);
	/* Bottom padding + min-height sit halfway between the original comp
	   values (100px / 965px @1920) and the tight solutions-style cut
	   (30px / 820px), plus 20% of the list's top padding folded back into
	   the hero — a moderate slice of the intro photo still bleeds into the
	   light product-list band below. */
	padding: clamp(110px, 7.813vw, 150px) 0 clamp(65px, 5vw, 96px);
	min-height: min(44.5vw, 855px, 100vh);
}
/* Teal duotone: grayscale photo under a multiplied brand-teal wash.
   `cover` guarantees the photo always fills the hero box — no bare
   background-color band — no matter how tall the box gets (title/intro
   copy length, narrow-viewport wrapping, etc). Above ~1450px the hero's
   height tracks a fixed vw ratio (see .products-hero min-height), so a
   tighter 130% zoom is restored there to match the 1920 comp crop. */
.products-hero__bg {
	position: absolute;
	inset: 0;
	background: url("../img/products-hero-2026.jpg") 50% 78% / auto 135% no-repeat;
}
@media (min-width: 1450px) {
	.products-hero__bg {
		background-position: 50% 86%;
		/* 130% zoom, but capped at its 1920px-viewport size (2496px) so
		   wider screens / zoomed-out views stop diving into the photo's
		   dark floor; once the viewport passes 2496px the photo simply
		   rides at 100% width, always covering (hero height ≤ 965px). */
		background-size: max(100%, min(130%, 2496px));
	}
}
@media (min-width: 1921px) {
	.products-hero__bg {
		/* Re-center on the cabin doors — 86% points at the floor once the
		   zoom stops tracking viewport width. */
		background-position: 50% 70%;
	}
	/* On ultra-wide screens the photo caps at 520px tall while the hero
	   stops growing — a touch more hero height keeps the overhang share
	   consistent with 1920. */
	.products-hero { min-height: min(905px, 100vh); }
}
.products-hero .wrap,
.products-intro__media { position: relative; }
.products-hero .wrap,
.products-intro__media { z-index: 1; }
.products-intro__media { position: absolute; }
.products-hero__title {
	margin: 44px 0 0;
	font-family: var(--font-serif);
	font-weight: var(--font-serif-weight);
	color: var(--bmw-white);
	line-height: 1;
	text-align: center;
}
.products-hero__lead {
	display: block;
	color: var(--bmw-ltblue);
	font-size: clamp(36px, 2.92vw, 56px);
	/* Capped like the solutions hero lead — past 1920 the word's font size
	   stops growing, so an uncapped vw margin would keep dragging "Our" left
	   off the word. */
	margin-right: min(17.19vw, 330px);
	margin-bottom: -5px;
}
.products-hero__word {
	display: block;
	font-size: clamp(56px, 5vw, 96px);
	margin-left: min(3.33vw, 64px);
}
.products-intro__text {
	max-width: 400px;
	margin-top: clamp(110px, 9.11vw, 175px);
	color: var(--bmw-white);
}
.products-intro__title {
	font-family: var(--font-serif-it);
	font-style: italic;
	font-weight: var(--font-serif-weight);
	font-size: clamp(26px, 1.667vw, 32px);
	line-height: 1.09;
	color: var(--bmw-ltblue);
	margin-bottom: 22px;
}
.products-intro__text p {
	margin: 0;
	max-width: 364px;
	font-size: 18px;
	line-height: 1.2;
}
.products-intro__rule {
	display: block;
	width: 205px;
	border-top: 2px solid var(--bmw-white);
	margin-top: 30px;
}
.has-scroll-animations .products-intro__rule {
	transform: scaleX(0.06);
	transform-origin: left center;
	will-change: transform;
}
.has-scroll-animations .products-intro__rule.is-in-view {
	animation: bmw-rule-reveal-from-left var(--reveal-duration) var(--motion-easing) forwards;
}
.products-intro__media {
	/* Left edge pinned to the exact midpoint of the content column (the
	   .wrap is centered/symmetrically padded, so 50vw *is* that midpoint
	   at every width) and stretched to the viewport edge via right: 0 —
	   this keeps the intro row a true 6/6 split with the image bleeding
	   off the right, matching the comp. Anchored to the right edge (not
	   left: 50vw) so the 960px cap can't strand it short of the viewport
	   edge on screens wider than 1920px. */
	position: absolute;
	margin: 0;
	right: 0;
	/* Full 6/6 split at every width: the photo always runs from the viewport
	   midpoint to the right edge, so it keeps taking space on 1440p/4K
	   instead of freezing at a 960px cap and looking marooned. */
	width: 50vw;
	top: clamp(265px, 24.22vw, 465px);
	/* Fixed-height crop like the solutions intro photo (min(18.91vw, 363px)
	   there). 23.44vw tracks the width (same 2.13:1 box as the 1920 comp);
	   the 520px cap stops vertical growth past ~2200px wide, letting the
	   photo overhang the hero bottom slightly — the same deliberate
	   section-boundary bleed the solutions intro photo has. */
	height: min(23.44vw, 520px);
	/* Scroll-linked upward drift, same mechanism as the services hero photo
	   (main.js drives the custom property). */
	--services-media-shift: 0px;
	transform: translate3d(0, var(--services-media-shift), 0);
	will-change: transform;
}
.products-intro__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius) 0 0 var(--radius);
}

/* ---------------------------------------------------------- product rows */

.products-list {
	background: linear-gradient(180deg, rgba(154, 218, 244, 0.6) 0%, rgba(154, 218, 244, 0.2) 100%);
	/* Top padding absorbs the height the hero gave up (see .products-hero) —
	   half the original shift, minus the 20% handed back to the hero's
	   bottom padding. */
	padding: clamp(85px, 6.56vw, 126px) 0 82px;
}
.product-row {
	display: grid;
	grid-template-columns: minmax(0, 520px) 1fr;
	gap: clamp(32px, 3.021vw, 58px);
	align-items: start;
	padding: 21px 0;
	scroll-margin-top: 32px;
}
.product-row__media { order: 1; }
.product-row__text { order: 2; padding-top: 8px; }
.product-row--flip { grid-template-columns: 1fr minmax(0, 520px); }
.product-row--flip .product-row__text { order: 1; }
.product-row--flip .product-row__media { order: 2; }
.product-row__title {
	font-family: var(--font-serif-it);
	font-style: italic;
	font-weight: var(--font-serif-weight);
	font-size: 27px;
	line-height: 1.2;
	color: var(--bmw-teal);
	margin-bottom: 18px;
	padding-bottom: 0;
}
.product-row__title::after {
	content: "";
	display: block;
	width: 330px;
	height: 0;
	border: 0;
	border-top: 1px solid var(--bmw-white);
	background: transparent;
	box-shadow: none;
	filter: none;
	margin-top: 14px;
}
/* 435.25px sits between the widest comp line that must fit (435.16px,
   "programmable cycles…with") and the narrowest that must wrap
   (435.38px, "…leading to a state"), reproducing every comp line break
   that a single width can. Three paragraphs need to wrap one word
   earlier than the shared width allows ("…stainless steel" fits at
   434.19px, "…helps cool and" at 434.55px, "…benefiting the
   respiratory" at 434.67px, while another row's line needs 435.16px),
   so those three get a 434px override below. */
.product-row__text p {
	max-width: 435.25px;
	margin: 0 0 16px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--bmw-black);
}
.product-row:nth-of-type(2) .product-row__text p:nth-of-type(2),
.product-row:nth-of-type(3) .product-row__text p:nth-of-type(1),
.product-row:nth-of-type(7) .product-row__text p:nth-of-type(2) { max-width: 434px; }
.product-row__bullets {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	max-width: 440px;
}
.product-row__bullets li {
	position: relative;
	padding-left: 18px;
	margin-bottom: 15px;
	font-size: 16px;
	line-height: 1.3;
	color: var(--bmw-black);
}
.product-row__bullets li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 8px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--bmw-black);
}
.product-row__media {
	position: relative;
	margin: 0;
}
.product-row__media img {
	display: block;
	width: 100%;
	aspect-ratio: 520 / 402;
	height: auto;
	max-height: 402px;
	object-fit: cover;
	border-radius: var(--radius);
}
.product-row__dots {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	gap: 10px;
}
.product-row__dots i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	border: 1px solid var(--bmw-white);
	background: transparent;
}
.product-row__dots i.is-active { background: var(--bmw-white); }

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
	.products-intro__media {
		/* Must stay a *positioned* box (not static) so it paints above the
		   absolutely-positioned .products-hero__bg duotone layer per CSS
		   stacking rules — a static box sinks below any positioned sibling
		   regardless of DOM order, which otherwise hides this image
		   entirely behind the hero background at mobile widths. */
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		width: auto;
		height: auto;
		max-width: none;
		/* Left gutter only — the image bleeds off the right viewport edge
		   like the desktop comp (left corners rounded, right square). */
		padding: 0 0 0 var(--gutter);
		margin-top: 50px;
	}
	/* Container height is auto here, so restore the photo's intrinsic ratio
	   (the desktop rules crop it inside a fixed-height box instead). */
	.products-intro__media img {
		height: auto;
		aspect-ratio: 920 / 365;
	}
	.products-hero { min-height: 0; }
	.products-intro__text { margin-top: 90px; }
	.products-hero__lead { margin-right: 160px; }
	.products-hero__word { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.products-intro__rule,
	.product-row__title::after { animation: none; transform: none; }
}
@media (max-width: 900px) {
	.products-hero { padding: 130px 0 60px; }
	.products-hero__lead { font-size: 40px; margin-right: 100px; }
	.products-hero__word { font-size: 64px; }
	.products-intro__title { font-size: 28px; }
	.product-row,
	.product-row--flip { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
	.product-row,
	.product-row__text,
	.product-row__media { min-width: 0; }
	.product-row--flip .product-row__text { order: 2; }
	.product-row--flip .product-row__media { order: 1; }
	.product-row__media img { height: auto; }
	.product-row__title::after { width: 100%; max-width: 330px; }
	/* The 434-435px comp-matched paragraph widths exist to reproduce exact
	   desktop line breaks; on a single-column mobile/tablet row they just
	   strand a lot of blank space to the right once the column itself
	   grows past that width (most visible at 768px tablet). Let copy use
	   more of the actual row width instead, capped for readable line
	   length. */
	.product-row__text p,
	.product-row__bullets { max-width: min(560px, 100%); }
}

/* --------------------------------------------------- UL closing card */
/* Mirrors .sol-closing on the Solutions page. */

.products-closing { padding-top: 45px; }
.products-closing__card {
	display: flex;
	align-items: center;
	gap: clamp(36px, 3.96vw, 76px);
	max-width: 705px;
	margin: 0 auto;
	background: var(--bmw-white);
	border-radius: var(--radius);
	padding: 22px clamp(32px, 2.92vw, 56px) 22px clamp(44px, 4.79vw, 92px);
}
.products-closing__ul { flex: 0 0 auto; width: 120px; height: auto; }
.products-closing__copy p {
	max-width: 320px;
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.5;
}
.products-closing__copy p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
	.products-list { padding: 60px 0; }
	.product-row,
	.product-row--flip { gap: 24px; padding: 32px 0; }
	.products-closing { padding-top: 48px; }
	.products-closing__card {
		max-width: calc(100% - 2 * var(--gutter));
		flex-direction: column;
		gap: 30px;
		padding: 40px;
		text-align: center;
	}
	.products-closing__copy p { max-width: none; font-size: 15px; }
}
