/* Product Category — ACF block */

.ortega-product-category {
	--ortega-pc-blue: #0058a4;
	--ortega-pc-blue-hover: #093272;
	--ortega-pc-navy: #092450;
	--ortega-pc-yellow: #ffe400;
	--ortega-pc-card-bg: var(--wp--preset--color--grey-100, #f7f7f8);
	--ortega-pc-grid-gap: clamp(1rem, 2.5vw, 2.375rem);
	--ortega-pc-carousel-gutter: clamp(1rem, 4vw, 3rem);
	--ortega-pc-badge-size-mobile: 152px;
	--ortega-pc-badge-size-desktop: 245px;
	--ortega-pc-badge-outside: 44px;
	--ortega-pc-badge-mobile-offset: -44px;
	--ortega-pc-cta-reserve: calc(clamp(1.5rem, 4.5vw, 2.55rem) + 85px);
	box-sizing: border-box;
	color: var(--ortega-pc-navy);
	max-width: 100vw;
	overflow-x: clip;
	padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem);
	position: relative;
	width: 100%;
}

.ortega-product-category__inner {
	box-sizing: border-box;
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	margin-inline: auto;
	max-width: min(1440px, 100%);
	width: 100%;
}

/* Header */

.ortega-product-category__head {
	align-items: center;
	display: flex;
	gap: clamp(0.75rem, 2vw, 1.25rem);
	justify-content: center;
	margin: 0;
	text-align: center;
}

.ortega-product-category__flourish {
	aspect-ratio: 66 / 20;
	display: block;
	flex: 0 0 auto;
	height: auto;
	object-fit: contain;
	width: clamp(24px, 4vw, 57px);
}

.ortega-product-category__flourish--right {
	transform: scaleX(-1);
}

.ortega-product-category.is-text-entrance-pending .ortega-product-category__title--desktop,
.ortega-product-category.is-text-entrance-pending .ortega-product-category__head--desktop .ortega-product-category__flourish {
	visibility: hidden;
}

.ortega-product-category.is-cards-entrance-pending .ortega-product-category__grid-item {
	opacity: 0;
	visibility: hidden;
}

.ortega-product-category__title {
	color: var(--ortega-pc-blue);
	font-family: var(--ortega-font-display);
	font-size: clamp(2.25rem, 7vw, 5rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 0.87;
	margin: 0;
	text-align: center;
	text-transform: uppercase;
}

/* Layout */

.ortega-product-category__layout {
	display: grid;
	gap: var(--ortega-pc-grid-gap);
	min-width: 0;
	width: 100%;
}

/* Featured media */

.ortega-product-category__media {
	min-width: 0;
	overflow: visible;
	width: 100%;
}

.ortega-product-category__media-frame {
	border-radius: 20px;
	box-sizing: border-box;
	isolation: isolate;
	min-height: clamp(280px, 72vw, 420px);
	overflow: visible;
	position: relative;
	width: 100%;
}

.ortega-product-category__media-image-wrap {
	background-color: var(--ortega-pc-card-bg);
	border-radius: inherit;
	inset: 0;
	overflow: hidden;
	position: absolute;
}

.ortega-product-category__media-fill {
	background-color: var(--ortega-pc-yellow);
	inset: 0;
	position: absolute;
	z-index: 0;
}

.ortega-product-category__media-image-wrap.is-reveal-pending .ortega-product-category__media-fill,
.ortega-product-category__media-image-wrap.is-reveal-pending .ortega-product-category__media-image {
	visibility: hidden;
}

.ortega-product-category__media-overlay {
	display: none;
}

.ortega-product-category__title--overlay {
	margin: 0;
}

.ortega-product-category__media-image {
	display: block;
	height: 100%;
	inset: 0;
	min-height: inherit;
	object-fit: cover;
	object-position: center;
	position: absolute;
	width: 100%;
	z-index: 1;
}

.ortega-product-category__badge {
	height: auto;
	left: 50%;
	margin-top: var(--ortega-pc-badge-mobile-offset);
	pointer-events: none;
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	width: var(--ortega-pc-badge-size-mobile);
	z-index: 2;
}

.ortega-product-category__media-cta {
	display: none;
}

/* Desktop — split columns with image left/right */

.ortega-product-category__grid {
	display: grid;
	gap: var(--ortega-pc-grid-gap);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-width: 0;
	width: 100%;
}

.ortega-product-category__grid-item {
	min-width: 0;
}

.ortega-product-category .ortega-shop-the-lineup__card {
	align-items: center;
	background-color: var(--ortega-pc-card-bg);
	border-radius: 20px;
	flex: initial;
	gap: 1rem;
	min-width: 0;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	text-align: center;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.ortega-product-category .ortega-shop-the-lineup__card-media-link {
	margin-inline: auto;
	max-width: 100%;
}

.ortega-product-category .ortega-shop-the-lineup__card-body {
	align-items: center;
	text-align: center;
	width: 100%;
}

.ortega-product-category .ortega-shop-the-lineup__card-media {
	--ortega-stl-media-height: clamp(140px, 28vw, 220px);
}

.ortega-product-category .ortega-shop-the-lineup__card-title {
	color: var(--ortega-pc-blue);
	font-family: var(--ortega-font-copy);
	font-size: clamp(16px, 2vw, 24px);
	font-weight: 800;
	line-height: 1.25;
	margin-inline: auto;
	max-width: 16rem;
	text-align: center;
}

.ortega-product-category .ortega-shop-the-lineup__learn-more {
	background-color: var(--ortega-pc-yellow);
	color: var(--ortega-pc-navy);
	font-size: clamp(14px, 1.5vw, 16px);
	min-height: 44px;
	padding: 0 clamp(1.1rem, 2.5vw, 1.5rem);
}

.ortega-product-category .ortega-shop-the-lineup__learn-more:hover,
.ortega-product-category .ortega-shop-the-lineup__learn-more:focus-visible {
	background-color: var(--wp--preset--color--yellow-600, #ffd000);
	color: var(--ortega-pc-navy);
}

.ortega-product-category .ortega-shop-the-lineup__find-it {
	color: var(--ortega-pc-blue);
	font-size: clamp(14px, 1.5vw, 16px);
}

.ortega-product-category .ortega-shop-the-lineup__card-actions {
	gap: 0.85rem;
	justify-content: center;
}

/* Mobile view-all button */

.ortega-btn.ortega-product-category__mobile-cta {
	background-color: var(--ortega-pc-blue);
	box-sizing: border-box;
	color: var(--ortega-pc-yellow);
	font-size: var(--ortega-type-cta);
	justify-self: center;
	max-width: 100%;
	width: 100%;
}

.ortega-btn.ortega-product-category__mobile-cta:hover,
.ortega-btn.ortega-product-category__mobile-cta:focus-visible {
	background-color: var(--ortega-pc-blue-hover);
	color: var(--ortega-pc-yellow);
}

.ortega-product-category-placeholder {
	background: #f7f7f8;
	border: 1px dashed #0058a4;
	color: #0058a4;
	padding: 24px;
	text-align: center;
}

/* Mobile — stacked layout with horizontal product carousel */

@media (max-width: 781px) {
	.ortega-product-category__inner {
		gap: clamp(1.25rem, 4vw, 2rem);
	}

	.ortega-product-category__head--desktop {
		border: 0;
		clip: rect(0 0 0 0);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute;
		white-space: nowrap;
		width: 1px;
	}

	.ortega-product-category__layout {
		gap: clamp(1.25rem, 4vw, 2rem);
	}

	.ortega-product-category__media-frame {
		min-height: clamp(260px, 78vw, 360px);
	}

	.ortega-product-category__media-image-wrap::after {
		background: linear-gradient(180deg, rgb(0 0 0 / 0%) 35%, rgb(0 0 0 / 72%) 100%);
		border-radius: inherit;
		content: "";
		inset: 0;
		pointer-events: none;
		position: absolute;
		z-index: 1;
	}

	.ortega-product-category__media-overlay {
		align-items: flex-end;
		bottom: 0;
		box-sizing: border-box;
		display: flex;
		inset-inline: 0;
		padding: clamp(1.25rem, 5vw, 2rem);
		pointer-events: none;
		position: absolute;
		z-index: 2;
	}

	.ortega-product-category__title--overlay {
		color: #fff;
		font-family: var(--ortega-font-display);
		font-size: clamp(2rem, 9vw, 3rem);
		font-weight: 700;
		letter-spacing: 0.02em;
		line-height: 0.9;
		text-align: center;
		text-transform: uppercase;
		width: 100%;
	}

	.ortega-product-category__badge {
		z-index: 3;
	}

	.ortega-product-category__grid {
		align-items: stretch;
		display: flex;
		gap: clamp(0.85rem, 2vw, 1.25rem);
		margin-inline: calc(50% - 50vw);
		max-width: 100vw;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		padding-inline-start: var(--ortega-pc-carousel-gutter);
		scroll-behavior: auto;
		scroll-padding-inline: var(--ortega-pc-carousel-gutter);
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		width: 100vw;
	}

	.ortega-product-category__grid::after {
		content: "";
		flex: 0 0 var(--ortega-pc-carousel-gutter);
	}

	.ortega-product-category__grid::-webkit-scrollbar {
		display: none;
	}

	.ortega-product-category__grid {
		-ms-overflow-style: none;
		scrollbar-width: none;
	}

	.ortega-product-category__grid-item {
		display: flex;
		flex: 0 0 min(78vw, 300px);
		flex-direction: column;
		scroll-snap-align: start;
	}

	.ortega-product-category .ortega-shop-the-lineup__card {
		background-color: var(--wp--preset--color--blue-200, #e9f2f9);
		flex: 1 1 auto;
		height: 100%;
		width: 100%;
	}

	.ortega-product-category .ortega-shop-the-lineup__card-media {
		--ortega-stl-media-height: clamp(150px, 38vw, 200px);
	}
}

/* Desktop — split columns with image left/right */

@media (min-width: 782px) {
	.ortega-product-category {
		--ortega-pc-grid-gap: 38px;
		--ortega-pc-content-gutter: clamp(1rem, 2.8vw, 40px);
		overflow-x: visible;
		padding-inline: var(--ortega-pc-content-gutter);
	}

	.ortega-product-category__layout {
		align-items: stretch;
		column-gap: var(--ortega-pc-grid-gap);
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		min-width: 0;
		overflow: clip;
	}

	.ortega-product-category__layout > .ortega-product-category__grid,
	.ortega-product-category__layout > .ortega-product-category__media {
		min-width: 0;
	}

	.ortega-product-category--image_right .ortega-product-category__grid {
		order: 1;
		padding-inline-start: var(--ortega-pc-content-gutter);
	}

	.ortega-product-category--image_right .ortega-product-category__media {
		order: 2;
	}

	.ortega-product-category__media {
		align-self: stretch;
		min-height: 0;
		overflow: visible;
		position: relative;
	}

	.ortega-product-category__grid {
		align-content: start;
		align-items: stretch;
		box-sizing: border-box;
		grid-auto-rows: auto;
		max-width: 100%;
		overflow: clip;
		width: 100%;
	}

	.ortega-product-category__grid-item {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.ortega-product-category .ortega-shop-the-lineup__card {
		flex: 1 1 auto;
		height: auto;
		max-width: 100%;
		min-height: 0;
		min-width: 0;
		width: 100%;
	}

	.ortega-product-category .ortega-shop-the-lineup__card-body {
		flex: 1 1 auto;
		min-height: 0;
	}

	.ortega-product-category--image_left .ortega-product-category__media-frame {
		margin-inline-end: 0;
		margin-inline-start: var(--ortega-pc-badge-outside);
		max-width: calc(100% - var(--ortega-pc-badge-outside));
		width: calc(100% - var(--ortega-pc-badge-outside));
	}

	.ortega-product-category--image_right .ortega-product-category__media-frame {
		margin-inline-end: var(--ortega-pc-badge-outside);
		margin-inline-start: 0;
		max-width: calc(100% - var(--ortega-pc-badge-outside));
		width: calc(100% - var(--ortega-pc-badge-outside));
	}

	.ortega-product-category__media-frame {
		height: 100%;
		min-height: 0;
		min-width: 0;
	}

	.ortega-product-category--image_left .ortega-product-category__badge {
		left: calc(-1 * var(--ortega-pc-badge-outside));
		margin-top: 0;
		right: auto;
		top: 50%;
		transform: translateY(-50%);
		width: var(--ortega-pc-badge-size-desktop);
	}

	.ortega-product-category__media-frame:has(.ortega-product-category__media-cta) .ortega-product-category__badge {
		top: calc((100% - var(--ortega-pc-cta-reserve)) / 2);
		transform: translateY(-50%);
	}

	.ortega-product-category--image_right .ortega-product-category__badge {
		left: auto;
		margin-top: 0;
		right: calc(-1 * var(--ortega-pc-badge-outside));
		top: 50%;
		transform: translateY(-50%);
		width: var(--ortega-pc-badge-size-desktop);
	}

	.ortega-product-category--image_right .ortega-product-category__media-frame:has(.ortega-product-category__media-cta) .ortega-product-category__badge {
		top: calc((100% - var(--ortega-pc-cta-reserve)) / 2);
		transform: translateY(-50%);
	}

	.ortega-product-category__media-cta {
		align-items: center;
		background: #fff;
		border-radius: 8px;
		bottom: clamp(1.5rem, 4.5vw, 2.55rem);
		box-sizing: border-box;
		color: #0069b0;
		display: flex;
		font-family: var(--ortega-font-display);
		font-size: var(--ortega-type-cta-pill);
		gap: 1rem;
		justify-content: space-between;
		left: clamp(1.5rem, 4.5vw, 2.55rem);
		letter-spacing: 0.02em;
		line-height: 1.12;
		min-height: 85px;
		padding: 16px 20px;
		position: absolute;
		right: clamp(1.5rem, 4.5vw, 2.55rem);
		text-decoration: none;
		text-transform: uppercase;
		transition: box-shadow 0.2s ease;
		z-index: 3;
	}

	.ortega-product-category__media-cta:hover,
	.ortega-product-category__media-cta:focus-visible {
		box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
		outline: none;
	}

	.ortega-product-category__media-cta:focus-visible {
		box-shadow: 0 0 0 3px #0069b0;
	}

	.ortega-product-category__media-cta-label {
		text-align: left;
	}

	.ortega-product-category__media-cta .ortega-text-roll {
		min-width: 0;
	}

	.ortega-product-category__media-cta-icon {
		align-items: center;
		background: #e9f2f9;
		border-radius: 999px;
		color: #0069b0;
		display: flex;
		flex-shrink: 0;
		height: 33px;
		justify-content: center;
		width: 33px;
	}

	.ortega-product-category__media-cta-icon svg {
		display: block;
		height: 24px;
		width: 24px;
	}

	.ortega-product-category__media-overlay {
		display: none;
	}

	.ortega-btn.ortega-product-category__mobile-cta {
		display: none;
	}

	.ortega-product-category .ortega-shop-the-lineup__card {
		padding-block: clamp(1.25rem, 2vw, 2.5rem);
	}

	.ortega-product-category .ortega-shop-the-lineup__card-media {
		--ortega-stl-media-height: clamp(150px, 12vw, 210px);
	}

	.ortega-product-category .ortega-shop-the-lineup__card-title {
		font-size: clamp(18px, 1.5vw, 28px);
		max-width: 210px;
	}

	.ortega-product-category--products-3 .ortega-product-category__grid-item:last-child {
		grid-column: 1 / -1;
	}
}

/* Card hover mirrors shop-the-lineup (any fine pointer — not only ≥1200px). */
@media (hover: hover) and (pointer: fine) {
	.ortega-product-category .ortega-shop-the-lineup__card:hover,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within {
		background-color: var(--ortega-stl-card-hover, #093272);
	}

	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__card-title,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__card-title,
	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__card-title-link,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__card-title-link,
	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__card-title-link:hover,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__card-title-link:hover,
	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__card-title-link:focus-visible,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__card-title-link:focus-visible {
		color: var(--ortega-stl-yellow, #ffe400);
	}

	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__learn-more,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__learn-more {
		background-color: var(--ortega-stl-blue, #0058a4);
		color: var(--ortega-stl-yellow, #ffe400);
	}

	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__find-it,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__find-it {
		color: var(--ortega-stl-yellow, #ffe400);
	}

	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__find-it-icon,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__find-it-icon {
		filter: brightness(0) saturate(100%) invert(88%) sepia(69%) saturate(749%) hue-rotate(358deg) brightness(104%) contrast(104%);
	}

	.ortega-product-category .ortega-shop-the-lineup__card:hover .ortega-shop-the-lineup__find-it::after,
	.ortega-product-category .ortega-shop-the-lineup__card:focus-within .ortega-shop-the-lineup__find-it::after {
		filter: brightness(0) saturate(100%) invert(88%) sepia(69%) saturate(749%) hue-rotate(358deg) brightness(104%) contrast(104%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ortega-product-category__media-image-wrap.is-reveal-pending .ortega-product-category__media-fill,
	.ortega-product-category__media-image-wrap.is-reveal-pending .ortega-product-category__media-image {
		visibility: visible;
	}

	.ortega-product-category.is-text-entrance-pending .ortega-product-category__title--desktop,
	.ortega-product-category.is-text-entrance-pending .ortega-product-category__head--desktop .ortega-product-category__flourish {
		visibility: visible;
	}

	.ortega-product-category.is-cards-entrance-pending .ortega-product-category__grid-item {
		opacity: 1;
		visibility: visible;
	}

	.ortega-product-category__media-cta,
	.ortega-product-category__grid,
	.ortega-product-category .ortega-shop-the-lineup__learn-more {
		transition: none;
	}

	.ortega-product-category__grid {
		scroll-behavior: auto;
	}
}
