/* One overlaid Hero model for the six category roots and the existing Maxi root.
 * Content stays in flow to grow the Hero; only the existing image is absolute.
 * This last-loaded component supersedes the old 1400/1088px split rules. */
.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) {
	position: relative;
	display: block;
	min-height: clamp(27rem, 33.3vw, 40rem);
	overflow: hidden;
	background: var(--yd-color-cream);
	isolation: isolate;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) > :is(.yd-category-shared-hero__media, .yd-product-manufacturer__hero-media) {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	line-height: 0;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) > :is(.yd-category-shared-hero__media, .yd-product-manufacturer__hero-media) img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: none;
	aspect-ratio: auto;
	object-fit: cover;
	object-position: 50% 50%;
	filter: none;
	background: transparent;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero)::after {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(90deg, rgb(247 245 240 / 97%) 0%, rgb(247 245 240 / 92%) 34%, rgb(247 245 240 / 40%) 60%, transparent 80%);
	content: "";
	pointer-events: none;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) > :not(.yd-category-shared-hero__media, .yd-product-manufacturer__hero-media) {
	position: relative;
	inset: auto;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	order: 0;
	width: min(52%, 40rem);
	min-height: inherit;
	margin: 0 0 0 max(1rem, calc((100vw - var(--yd-content-width)) / 2));
	padding-block: clamp(2rem, 3.5vw, 3.5rem);
	gap: 0;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) h1 {
	max-width: none;
	margin: 0.65rem 0 1rem;
	font-size: clamp(2rem, 4.2vw, 3.75rem);
	line-height: 1.04;
	overflow-wrap: break-word;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) h1 + p {
	max-width: 39ch;
	margin: 0;
	color: var(--yd-color-ink);
	font-size: clamp(1rem, 1.2vw, 1.0625rem);
	line-height: 1.6;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) h1 + p + div {
	display: flex;
	flex-wrap: wrap;
	margin-top: 1.25rem;
	gap: 0.75rem;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) h1 + p + div > a {
	max-width: 100%;
	margin: 0;
	text-align: center;
}

.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) .yd-product-manufacturer__capabilities {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 100%;
}

@media (max-width: 48rem) {
	.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) > :not(.yd-category-shared-hero__media, .yd-product-manufacturer__hero-media) {
		width: calc(100% - 2rem);
		margin-inline: auto;
		padding-block: 2.5rem;
	}

	.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) > :is(.yd-category-shared-hero__media, .yd-product-manufacturer__hero-media) img {
		object-position: 65% 50%;
	}

	.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero)::after {
		background: linear-gradient(90deg, rgb(247 245 240 / 96%), rgb(247 245 240 / 88%) 60%, rgb(247 245 240 / 70%));
	}
}

@media (max-width: 42rem) {
	.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) h1 + p + div {
		align-items: stretch;
		flex-direction: column;
	}

	.site-main :is(.yd-category-shared-hero, .yd-product-manufacturer__section--hero) h1 + p + div > a {
		justify-content: center;
		width: 100%;
	}
}
