/* 7.7.162 · Canonical compact Related carousel — MERIT-inspired rhythm. */
.wapu-single__related-carousel {
	max-width: 90rem;
	margin: 2rem auto 0;
	padding: 0 var(--single-gutter);
}

.wapu-single__related-carousel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.wapu-single__related-carousel-header h2 {
	margin: 0;
	color: var(--wtds-on-surface);
	font-family: var(--wtds-font-display);
	font-size:var(--wtds-fs-title-3, 1.5rem);
	font-style: normal;
	font-weight: var(--wtds-fw-medium);
}

.wapu-single__related-carousel-stage {
	position: relative;
}

.wapu-single__related-carousel-viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	overscroll-behavior-inline: contain;
	scroll-snap-type: inline proximity;
	scrollbar-width: none;
}

.wapu-single__related-carousel-viewport::-webkit-scrollbar {
	display: none;
}

.wapu-single__related-carousel-track {
	display: flex;
	gap: 20px;
	align-items: stretch;
}

.wapu-single__related-carousel-item {
	flex: 0 0 clamp(10.5rem, 16vw, 13.5rem);
	min-width: 0;
	scroll-snap-align: start;
}

.wapu-single__related-compact-card {
	display: flex;
	flex-direction: column;
	gap: .65rem;
	min-width: 0;
	color: var(--wtds-on-surface);
	text-decoration: none;
}

.wapu-single__related-compact-media {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--wtds-surface-2);
}

.wapu-single__related-compact-img,
.wapu-single__related-compact-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .25s ease;
}

.wapu-single__related-compact-card:hover .wapu-single__related-compact-img,
.wapu-single__related-compact-card:hover .wapu-single__related-compact-media img {
	transform: scale(1.015);
}

.wapu-single__related-compact-content {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	min-width: 0;
}

.wapu-single__related-compact-name,
.wapu-single__related-compact-price {
	display: block;
	font-family: var(--wtds-font-body);
	font-size:var(--wtds-fs-footnote, .8125rem);
	line-height: 1.35;
}

.wapu-single__related-compact-name {
	font-weight: var(--wtds-fw-medium);
}

.wapu-single__related-compact-price {
	color: var(--wtds-ink-2);
}

.wapu-single__related-compact-price :is(.price, .woocommerce-Price-amount, .wapu-price) {
	font: inherit;
	color: inherit;
}


.wapu-single__related-carousel-scrollbar {
	position: relative;
	height: 1px;
	margin-top: .9rem;
	background: var(--wtds-separator-soft);
	overflow: hidden;
}

.wapu-single__related-carousel-scrollbar-indicator {
	position: absolute;
	inset-block: 0;
	left: 0;
	width: 2rem;
	background: var(--wtds-on-surface);
	transform: translateX(0);
	will-change: transform, width;
}

@media (min-width: 62rem) {
	.wapu-single__similar-mobile {
		display: none !important;
	}
}

@media (max-width: 61.9375rem) {
	.wapu-single__related-carousel {
		display: none;
	}
}

/* 7.7.183 · Mobile Single related: compact free-flow carousel with a next-card peek. */
@media (max-width: 61.9375rem) {
	.single-product .wapu-single--regular-product .wapu-product-recommendations .wapu-single__related-carousel {
		display: flex;
		flex-direction: column;
		gap: 16px;
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.single-product .wapu-single--regular-product .wapu-single__related-carousel-viewport {
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: inline proximity;
		scroll-padding-inline: 0;
		-webkit-overflow-scrolling: touch;
	}

	.single-product .wapu-single--regular-product .wapu-single__related-carousel-track {
		display: flex;
		flex-flow: row nowrap;
		gap: 16px;
		width: max-content;
		min-width: 100%;
		align-items: stretch;
	}

	.single-product .wapu-single--regular-product .wapu-single__related-carousel-item {
		width: auto;
		min-width: 0;
		flex: 0 0 clamp(7.5rem, 36vw, 9.5rem);
		scroll-snap-align: start;
	}

	/* Keep the desktop-like card proportion while allowing the next card to peek in. */
	.single-product .wapu-single--regular-product .wapu-single__related-compact-card {
		width: 100%;
		max-width: none;
		margin-inline: 0;
		gap: 8px;
	}

	.single-product .wapu-single--regular-product .wapu-single__related-compact-content {
		gap: 4px;
	}

	.single-product .wapu-single--regular-product :is(.wapu-single__related-compact-name, .wapu-single__related-compact-price) {
		font-size:var(--wtds-fs-caption-1);
		line-height: 1.35;
	}
}

.wapu-single__related-carousel-navigation { position:absolute; inset:0; display:flex; align-items:center; justify-content:space-between; pointer-events:none; z-index:2; }
.wapu-single__related-carousel-navigation[hidden] { display:none; }
.wapu-single__related-carousel-arrow { display:grid; place-items:center; width:40px; height:40px; padding:0; flex:0 0 40px; border:0; border-radius:50%; background:var(--wtds-surface); color:var(--wtds-ink); cursor:pointer; pointer-events:auto; }
.wapu-single__related-carousel-arrow:disabled { opacity:.4; cursor:default; }
.wapu-single__related-carousel-arrow:focus-visible { outline:2px solid var(--wtds-action); outline-offset:3px; }

/* Related products occupy their own row below gallery and product information. */
body.single-product .wapu-product-related-below { width:100%; min-width:0; margin-top:32px; }
body.single-product .wapu-product-related-below .wapu-single__related-carousel { display:block; width:100%; max-width:none; box-sizing:border-box; margin:0; padding:0; }
body.single-product .wapu-single__related-carousel-arrow {
 width:44px; height:44px; flex-basis:44px;
 border:0;
 background:color-mix(in srgb,var(--wtds-surface) 94%,transparent);
 box-shadow:var(--wtds-shadow-sm,0 2px 8px rgba(0,0,0,.08));
 transition:background-color .15s ease,border-color .15s ease;
}
body.single-product .wapu-single__related-carousel-arrow:first-child { margin-left:12px; }
body.single-product .wapu-single__related-carousel-arrow:last-child { margin-right:12px; }
body.single-product .wapu-single__related-carousel-arrow svg { display:none; }
body.single-product .wapu-single__related-carousel-arrow::before { content:''; width:9px; height:9px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; transform:rotate(45deg) translate(-1px,1px); }
body.single-product .wapu-single__related-carousel-arrow:first-child::before { transform:rotate(-135deg) translate(-1px,-1px); }
body.single-product .wapu-single__related-carousel-arrow:hover:not(:disabled) { background:var(--wapu-choice-soft, color-mix(in srgb,var(--wtds-action) 12%,var(--wtds-surface))); }
@media(max-width:61.9375rem) {
 body.single-product .wapu-product-related-below .wapu-single__related-carousel-item { flex:0 0 clamp(120px,36vw,152px); }
}
@media(max-width:47.9375rem) {
 body.single-product .wapu-single__related-carousel-arrow { width:40px; height:40px; flex-basis:40px; }
 body.single-product .wapu-single__related-carousel-arrow:first-child { margin-left:10px; }
 body.single-product .wapu-single__related-carousel-arrow:last-child { margin-right:10px; }
}
@media(prefers-reduced-motion:reduce) { body.single-product .wapu-single__related-carousel-arrow { transition:none; } }

/* Use the same outer measure and gutters as the product content. */
body.single-product .wapu-single > .wapu-product-related-below {
 max-width:1440px; width:100%; margin:32px auto 0; padding:0 var(--single-gutter); box-sizing:border-box;
}
body.single-product :is(.wapu-single--sellable-service,.wapu-single--sellable-course) > .wapu-product-related-below { max-width:1120px; padding-inline:24px; }
@media(max-width:767px) {
 body.single-product .wapu-single > .wapu-product-related-below { padding-inline:24px; }
 body.single-product :is(.wapu-single--sellable-service,.wapu-single--sellable-course) > .wapu-product-related-below { padding-inline:16px; }
}

/* Product-tabs composition adapted from Blocks; all assets belong to the theme. */
.wapu-related-tabs__title { text-align:center; font-family:var(--wtds-font-display); font-size:var(--wtds-fs-title-1); font-weight:var(--wtds-fw-bold); line-height:var(--wtds-lh-tight); margin:0 0 8px; }
.wapu-related-tabs__list { display:flex; justify-content:safe center; overflow-x:auto; scrollbar-width:none; margin-bottom:32px; }
.wapu-related-tabs__list [role="tab"] { flex:0 0 auto; min-height:40px; padding:8px 16px; border:0; border-bottom:1px solid var(--wtds-separator); border-radius:0; background:transparent; box-shadow:none; color:var(--wtds-ink-2); font:var(--wtds-fw-regular) 16px/24px var(--wtds-font-text); cursor:pointer; white-space:nowrap; }
.wapu-related-tabs__list [role="tab"][aria-selected="true"] { border-bottom-color:var(--wtds-action); color:var(--wtds-ink); }
.wapu-related-tabs__list [role="tab"]:focus-visible { outline:2px solid var(--wtds-action); outline-offset:-3px; }
.wapu-related-tabs > [hidden] { display:none!important; }
.wapu-related-tabs .wapu-single__related-carousel-header.screen-reader-text { margin:0; }

.wapu-related-tabs__help { margin:0 0 24px; text-align:center; color:var(--wtds-ink-3); font-family:var(--wtds-font-text); font-size:var(--wtds-fs-body); line-height:var(--wtds-lh-base); font-weight:var(--wtds-fw-regular); }
.wapu-product-related-below:not(.wapu-related-tabs) .wapu-single__related-carousel-header { flex-direction:column; gap:8px; }
.wapu-product-related-below:not(.wapu-related-tabs) .wapu-single__related-carousel-header h2 { font-size:var(--wtds-fs-title-1); font-weight:var(--wtds-fw-bold); line-height:var(--wtds-lh-tight); text-align:center; }

/* Four visible recommendations; shorter rows retain card size and center. */
@media (min-width: 62rem) {
 body.single-product .wapu-single__related-carousel .wapu-single__related-carousel-track {
  width: 100%;
  min-width: 0;
  gap: 20px;
  justify-content: safe center;
 }
 body.single-product .wapu-single__related-carousel .wapu-single__related-carousel-item {
  flex: 0 0 calc((100% - 60px) / 4);
  width: calc((100% - 60px) / 4);
  min-width: 0;
 }
}
body.single-product .wapu-single__related-carousel.is-static .wapu-single__related-carousel-track {
 justify-content: center;
}

/* Separate recommendations from the preceding product content on all screens. */
body.single-product .wapu-single--regular-product > .wapu-product-related-below {
 margin-top:80px;
}

/* Playground tab motion, owned locally by the theme. */
.wapu-related-tabs__list.has-motion { position:relative; }
.wapu-related-tabs__list.has-motion [role="tab"] { border-bottom-color:transparent; }
.wapu-related-tabs__track { position:absolute; bottom:0; height:3px; border-radius:999px; background:color-mix(in srgb,currentColor 18%,transparent); pointer-events:none; overflow:hidden; }
.wapu-related-tabs__indicator { display:block; position:absolute; inset-block:0; left:0; border-radius:999px; background:var(--wtds-action); }
.wapu-related-tabs__list.is-motion-ready .wapu-related-tabs__indicator { transition:transform 480ms cubic-bezier(.22,.61,.36,1),width 480ms cubic-bezier(.22,.61,.36,1); }
@media(prefers-reduced-motion:reduce) { .wapu-related-tabs__list.is-motion-ready .wapu-related-tabs__indicator { transition:none; } }
