/* Product Detail visual90 -> 95 first bounded page pass. WooCommerce remains
 * the sole owner of product media, price, stock and purchase behavior. */
body.single-product .dscr-product {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	overflow-x: clip;
	padding: 0 0 clamp(3rem, 7vw, 7rem);
	background: #f3f2ef;
}

body.single-product .dscr-product__summary {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0 !important;
	margin: 0 !important;
}

body.single-product .dscr-product__summary > .wp-block-woocommerce-product-image-gallery {
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0 !important;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: #e9ecef;
	box-shadow: none;
}

body.single-product .dscr-product__summary .woocommerce-product-gallery {
	width: 100%;
	max-width: none;
}

body.single-product .dscr-product__summary .flex-control-thumbs {
	justify-content: flex-start;
	width: 100%;
	padding: 0.75rem clamp(0.75rem, 4vw, 1.5rem);
	box-sizing: border-box;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-padding-inline: clamp(0.75rem, 4vw, 1.5rem);
}

body.single-product .dscr-product__summary .flex-control-thumbs li,
body.single-product .dscr-product__summary .flex-control-thumbs img {
	flex-basis: 52px;
	width: 52px !important;
	height: 52px;
	border-radius: 0.25rem;
}

body.single-product .dscr-product__commerce {
	display: flex;
	flex-direction: column;
	width: min(100% - 2rem, 1120px);
	margin: 0 auto !important;
	padding: clamp(1.5rem, 4vw, 3rem) 0;
	box-sizing: border-box;
}

body.single-product .dscr-product__commerce > * {
	min-width: 0;
}

body.single-product .dscr-product__commerce > .wp-block-woocommerce-product-price {
	order: 1;
	margin: 0 !important;
	color: #c92b31;
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.3;
}

body.single-product .dscr-product__commerce > .wp-block-post-title {
	order: 2;
	margin: 0.65rem 0 0 !important;
	font-size: clamp(1.55rem, 4vw, 2.25rem);
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1.08;
}

body.single-product .dscr-product__commerce > .wp-block-woocommerce-product-rating {
	order: 3;
	width: fit-content;
	max-width: 100%;
	margin: 0.875rem 0 0 !important;
	padding: 0.25rem 0.4rem;
	border-radius: 0.25rem;
	background: #fff5c2;
}

body.single-product .dscr-product__commerce > .wp-block-dual-source-commerce-rebuild-product-availability-contextual {
	order: 4;
	display: inline-flex;
	align-items: center;
	width: fit-content;
	min-height: 36px;
	margin: 1rem 0 0 !important;
	padding: 0.4rem 0.7rem;
	box-sizing: border-box;
	border: 1px solid rgb(23 107 58 / 18%);
	border-radius: 999px;
	background: #e8f7ee;
}

body.single-product .dscr-product__commerce > .wp-block-woocommerce-add-to-cart-form {
	order: 5;
	margin: 1.25rem 0 0 !important;
	padding: clamp(1rem, 3vw, 1.5rem);
	box-sizing: border-box;
	border: 1px solid #d9d7d2;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 0.65rem 1.75rem rgb(40 40 40 / 6%);
}

body.single-product .dscr-product > .wp-block-woocommerce-product-details {
	width: min(100% - 2rem, 1120px);
	margin: clamp(1rem, 4vw, 3rem) auto 0 !important;
	padding: clamp(1.25rem, 4vw, 3rem);
	box-sizing: border-box;
	border-radius: 0.5rem;
}

body.single-product .dscr-product__related,
body.single-product .dscr-product__related-empty {
	width: min(100% - 2rem, 1320px);
	margin: clamp(3rem, 7vw, 7rem) auto 0 !important;
	border-radius: 0.5rem;
}

@media (max-width: 1023px) {
	body.single-product {
		height: 100svh;
		padding-bottom: 0 !important;
		overflow: hidden;
	}

	body.single-product.admin-bar {
		height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
	}

	body.single-product .wp-site-blocks {
		display: grid;
		grid-template-rows: auto minmax(0, 1fr) auto;
		height: 100%;
		min-height: 0;
		overflow: hidden;
	}

	body.single-product .wp-site-blocks > .woocommerce.product {
		display: contents;
	}

	body.single-product header.wp-block-template-part {
		position: relative;
		z-index: var(--wp--custom--header--z-index);
		grid-row: 1;
	}

	body.single-product main.dscr-product {
		grid-row: 2;
		height: 100%;
		min-height: 0;
		padding-bottom: 2rem;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior-y: contain;
		scrollbar-gutter: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	body.single-product main.dscr-product::-webkit-scrollbar {
		display: none;
	}

	body.single-product footer.wp-block-template-part {
		position: relative;
		z-index: var(--wp--custom--footer--utility-z-index);
		grid-row: 3;
		margin: 0;
	}

	body.single-product .dscr-footer {
		margin: 0;
	}

	body.single-product .dscr-footer__utility {
		position: static;
		inset: auto;
		width: 100%;
		margin: 0 !important;
		transform: none;
	}

	body.single-product .dscr-product__summary .flex-viewport {
		height: min(100vw, 520px) !important;
	}

	body.single-product .dscr-product__summary .woocommerce-product-gallery__image,
	body.single-product .dscr-product__summary .woocommerce-product-gallery__image > a {
		height: min(100vw, 520px);
	}

	body.single-product .dscr-product__summary .woocommerce-product-gallery__image img:not(.zoomImg) {
		height: 100%;
		aspect-ratio: auto;
		object-fit: contain;
	}

	body.single-product .dscr-product .variations_form .single_add_to_cart_button,
	body.single-product .dscr-product form.cart:not(.variations_form) .single_add_to_cart_button {
		bottom: 0;
	}

	body.single-product .dscr-product > .wp-block-woocommerce-product-details {
		margin-top: 0 !important;
	}

	body.single-product .dscr-product .woocommerce-tabs ul.tabs {
		width: 100%;
		border-radius: 0.5rem;
	}

	body.single-product .dscr-product .woocommerce-tabs ul.tabs li {
		flex: 1 0 auto;
	}

	body.single-product .dscr-product .woocommerce-tabs ul.tabs li a {
		width: 100%;
	}
}

@media (min-width: 1024px) {
	body.single-product .dscr-product__summary {
		width: 100vw;
		max-width: 100vw;
		margin-inline: calc(50% - 50vw) !important;
	}

	body.single-product .dscr-product__summary > .wp-block-woocommerce-product-image-gallery {
		height: clamp(680px, calc(100svh - 8rem), 960px);
	}

	body.single-product .dscr-product__summary .woocommerce-product-gallery,
	body.single-product .dscr-product__summary .flex-viewport,
	body.single-product .dscr-product__summary .woocommerce-product-gallery__wrapper,
	body.single-product .dscr-product__summary .woocommerce-product-gallery__image,
	body.single-product .dscr-product__summary .woocommerce-product-gallery__image > a {
		height: 100% !important;
	}

	body.single-product .dscr-product__summary .woocommerce-product-gallery__image img:not(.zoomImg) {
		height: 100%;
		aspect-ratio: auto;
		object-fit: cover;
	}

	body.single-product .dscr-product__summary .flex-control-thumbs {
		position: absolute;
		z-index: 4;
		bottom: 1.5rem;
		left: 50%;
		width: min(100% - 4rem, 920px);
		padding: 0.65rem;
		border: 1px solid rgb(255 255 255 / 28%);
		border-radius: 0.5rem;
		background: rgb(21 23 25 / 72%);
		box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 18%);
		transform: translateX(-50%);
		backdrop-filter: blur(12px);
	}

	body.single-product .dscr-product__summary .flex-control-thumbs li,
	body.single-product .dscr-product__summary .flex-control-thumbs img {
		flex-basis: 68px;
		width: 68px !important;
		height: 68px;
	}

	body.single-product .dscr-product__commerce {
		display: grid;
		grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
		grid-template-rows: repeat(4, auto) 1fr;
		column-gap: clamp(3rem, 7vw, 7rem);
		padding-block: clamp(4rem, 8vw, 8rem);
	}

	body.single-product .dscr-product__commerce > .wp-block-woocommerce-product-price,
	body.single-product .dscr-product__commerce > .wp-block-post-title,
	body.single-product .dscr-product__commerce > .wp-block-woocommerce-product-rating,
	body.single-product .dscr-product__commerce > .wp-block-dual-source-commerce-rebuild-product-availability-contextual {
		grid-column: 1;
	}

	body.single-product .dscr-product__commerce > .wp-block-post-title {
		font-size: clamp(2.5rem, 4vw, 4.75rem);
	}

	body.single-product .dscr-product__commerce > .wp-block-woocommerce-add-to-cart-form {
		grid-column: 2;
		grid-row: 1 / span 5;
		align-self: start;
		margin-top: 0 !important;
		padding: clamp(1.5rem, 3vw, 2.5rem);
	}
}

/* REBUILD-0144: compose the existing Product Editor media as scenes. */
body.single-product .dscr-product .woocommerce-Tabs-panel--description > p:first-of-type {
	max-width: 46rem;
	margin-inline: auto !important;
	font-size: clamp(1.2rem, 2.4vw, 2rem);
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
}

body.single-product .dscr-product .woocommerce-Tabs-panel--description > p:nth-of-type(2) {
	max-width: 42rem;
	margin-inline: auto !important;
	color: var(--wp--preset--color--muted);
	line-height: 1.65;
	text-align: center;
}

body.single-product .product-detail-media-stack {
	align-items: start;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

body.single-product .product-detail-media-stack > figure {
	min-width: 0;
	box-shadow: none;
}

body.single-product .product-detail-media-stack > figure img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto !important;
	object-fit: cover;
}

@media (max-width: 599px) {
	body.single-product .product-detail-media-stack {
		grid-template-columns: none;
		grid-template-rows: 1fr;
		grid-auto-flow: column;
		grid-auto-columns: calc(100% - clamp(1.25rem, 8vw, 2rem));
		gap: 0.75rem;
		padding: 0 0.25rem 0.75rem;
		box-sizing: border-box;
		max-width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-inline: contain;
		scroll-padding-inline: 0.25rem;
		scroll-snap-type: x mandatory;
		scrollbar-width: thin;
		touch-action: pan-x pan-y;
	}

	body.single-product .product-detail-media-stack > figure,
	body.single-product .product-detail-media-stack > figure:nth-child(even),
	body.single-product .product-detail-media-stack > figure:nth-child(odd) {
		width: 100%;
		margin: 0 !important;
		aspect-ratio: 1;
		scroll-snap-align: center;
		scroll-snap-stop: always;
	}
}

@media (min-width: 600px) and (max-width: 1023px) {
	body.single-product .product-detail-media-stack {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}

	body.single-product .product-detail-media-stack > figure,
	body.single-product .product-detail-media-stack > figure:nth-child(even),
	body.single-product .product-detail-media-stack > figure:nth-child(odd) {
		width: 100%;
		margin: 0 !important;
		aspect-ratio: 1;
	}
}

@media (min-width: 1024px) {
	body.single-product .product-detail-media-stack {
		grid-template-columns: minmax(0, 1.18fr) minmax(20rem, 0.82fr);
		grid-template-rows: repeat(3, min(54svh, 32rem));
		gap: clamp(1.25rem, 2.5vw, 2rem);
		align-items: start;
		max-width: 75rem;
		margin-inline: auto !important;
	}

	body.single-product .product-detail-media-stack > figure {
		width: 100%;
		height: 100%;
		border-radius: 0.75rem;
	}

	body.single-product .product-detail-media-stack > figure.product-detail-story-image--scene-1 {
		position: sticky;
		top: clamp(6rem, 10svh, 8rem);
		grid-column: 1;
		grid-row: 1 / span 3;
		align-self: start;
		height: min(76svh, 47.5rem);
	}

	body.single-product .product-detail-media-stack > figure.product-detail-story-image--scene-2 {
		grid-column: 2;
		grid-row: 1;
	}

	body.single-product .product-detail-media-stack > figure.product-detail-story-image--scene-3 {
		grid-column: 2;
		grid-row: 2;
	}

	body.single-product .product-detail-media-stack > figure.product-detail-story-image--scene-4 {
		grid-column: 2;
		grid-row: 3;
	}
}

/* Native product purchase controls: high-contrast quantity and two genuine
 * form submits, with the custom-order catalogue kept on its quote path. */
body.single-product .dscr-product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
}

body.single-product .dscr-product form.cart .quantity {
	flex: 0 0 auto;
	margin: 0 !important;
}

body.single-product .dscr-product form.cart .quantity input.qty {
	width: 5.25rem !important;
	min-width: 5.25rem;
	min-height: 3.25rem !important;
	padding: 0.625rem 0.75rem !important;
	box-sizing: border-box;
	border: 2px solid #30343b !important;
	border-radius: 0.375rem !important;
	background: #fff !important;
	box-shadow: inset 0 0 0 1px rgb(48 52 59 / 8%);
	color: #17191c !important;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

body.single-product .dscr-product form.cart .quantity input.qty:focus-visible {
	border-color: #1f5fc4 !important;
	outline: 3px solid #86b7fe;
	outline-offset: 2px;
	box-shadow: 0 0 0 1px #fff;
}

body.single-product .dscr-product form.cart .single_add_to_cart_button,
body.single-product .dscr-product form.cart .dscr-buy-now {
	position: static;
	flex: 1 1 11rem;
	width: auto;
	min-width: min(100%, 11rem);
	min-height: 3.25rem;
	margin: 0;
	padding: 0.75rem 1.25rem;
	box-sizing: border-box;
	border: 2px solid #17191c;
	border-radius: 0.375rem;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
}

body.single-product .dscr-product form.cart .single_add_to_cart_button {
	background: #fff;
	color: #17191c;
}

body.single-product .dscr-product form.cart .dscr-buy-now {
	background: #17191c;
	color: #fff;
}

body.single-product .dscr-product form.cart :is(.single_add_to_cart_button, .dscr-buy-now):focus-visible {
	outline: 3px solid #86b7fe;
	outline-offset: 2px;
}

body.single-product .dscr-product__commerce > .dscr-product__quote {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.875rem 1rem;
	width: 100%;
	max-width: 36rem;
	margin-top: 1rem !important;
	padding: 1rem;
	box-sizing: border-box;
	border: 1px solid #c8c4bb;
	border-radius: 0.5rem;
	background: #fff;
	color: #272725;
}

body.single-product .dscr-product__quote-copy {
	flex: 1 1 18rem;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45;
}

body.single-product .dscr-product__quote-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0.75rem 1.25rem;
	box-sizing: border-box;
	border: 2px solid #17191c;
	border-radius: 0.375rem;
	background: #17191c;
	color: #fff;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
}

body.single-product .dscr-product__quote-button:focus-visible {
	outline: 3px solid #86b7fe;
	outline-offset: 2px;
}

@media (max-width: 519px) {
	body.single-product .dscr-product form.cart .single_add_to_cart_button,
	body.single-product .dscr-product form.cart .dscr-buy-now,
	body.single-product .dscr-product__quote-button {
		flex-basis: 100%;
		width: 100%;
	}
}
