/* ============================================================================
   OUDADEN ART — making the product area behave like people expect
   ----------------------------------------------------------------------------
   Two corrections, both to things that were quietly costing taps.
   ========================================================================= */

/*
 * THE PRODUCT PICTURE MUST NOT SWALLOW CLICKS.
 *
 * The product image is absolutely positioned to fill .product-ground and then
 * scaled about its centre (scale(1.6456) on the home page, 1.7326 on a
 * collection page) so the piece fills the frame. `overflow: hidden` on the
 * ground clips what you SEE — but the image's hit area still reaches far past
 * that edge. Measured on the home page at 375x812: the ground ends at y=555
 * while the image stayed the topmost element for hit-testing down to y=653,
 * covering the "Explore Collection" button from 626 to 653. Only the bottom
 * 13px of a 48px button could be clicked, which is exactly why it took two or
 * three taps and only ever worked on the words themselves.
 *
 * The image is decoration: nothing about it needs to receive a click. Taking it
 * out of hit-testing hands the whole button back, and on a collection page it
 * also frees the product name, the price and "View details" underneath.
 */
.product-ground img {
	pointer-events: none;
}

/* On the home stage the picture is now a way into the collection, so it says so. */
#shop .product-ground {
	cursor: pointer;
}

/* ------------------------------------------------------- the detail popup --*/

/*
 * Opened in place of navigating away to the personalize page, so a visitor
 * checking a measurement does not lose the model they were looking at.
 */
#oa-detail {
	position: fixed;
	inset: 0;
	z-index: 2147483000;   /* above the app's own fixed header */
	display: none;
	align-items: flex-end;
	justify-content: center;
}

#oa-detail.is-open {
	display: flex;
}

#oa-detail .oa-detail__veil {
	position: absolute;
	inset: 0;
	background: hsl(30 28% 11% / .46);
}

#oa-detail .oa-detail__card {
	position: relative;
	width: min(460px, 100%);
	max-height: 88vh;
	overflow-y: auto;
	background: hsl(39 56% 96%);
	color: hsl(30 28% 11%);
	border-radius: 18px 18px 0 0;
	padding: 18px 20px 22px;
	box-shadow: 0 -10px 40px hsl(30 28% 11% / .28);
	animation: oa-detail-in .22s cubic-bezier(.22, 1, .36, 1);
}

@media (min-width: 700px) {
	#oa-detail { align-items: center; }
	#oa-detail .oa-detail__card { border-radius: 18px; }
}

@keyframes oa-detail-in {
	from { transform: translateY(14px); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	#oa-detail .oa-detail__card { animation: none; }
}

#oa-detail .oa-detail__top {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

#oa-detail .oa-detail__shot {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	display: grid;
	place-items: center;
	background: hsl(38 46% 92%);
	border-radius: 12px;
	overflow: hidden;
}

#oa-detail .oa-detail__shot img {
	max-width: 84%;
	max-height: 84%;
	width: auto;
	height: auto;
	object-fit: contain;
}

#oa-detail h2 {
	margin: 2px 0 4px;
	font-size: 1.35rem;
	line-height: 1.1;
}

#oa-detail .oa-detail__price {
	font-weight: 700;
	color: hsl(24 58% 40%);
}

#oa-detail .oa-detail__spec {
	margin: 10px 0 0;
	font-size: .92rem;
	line-height: 1.5;
	color: hsl(30 14% 32%);
}

#oa-detail .oa-detail__actions {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

#oa-detail .oa-detail__go {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 18px;
	border-radius: 10px;
	background: hsl(30 28% 11%);
	color: hsl(39 56% 95%);
	font-weight: 600;
	text-decoration: none;
}

#oa-detail .oa-detail__close {
	flex: 0 0 auto;
	min-height: 46px;
	padding: 0 16px;
	border-radius: 10px;
	border: 1px solid hsl(30 28% 11% / .3);
	background: transparent;
	color: hsl(30 28% 11%);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

#oa-detail .oa-detail__go:focus-visible,
#oa-detail .oa-detail__close:focus-visible {
	outline: 2px solid hsl(28 48% 44%);
	outline-offset: 3px;
}

/* ==========================================================================
   The personalize stage
   ========================================================================== */

/* One strip across the top of the product card: how it works on the left,
   a single Reset on the right — where the piece is, not buried at the bottom. */
#oa-pz-strip {
	position: absolute;
	z-index: 40;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 12px;
	pointer-events: none;   /* the card behind stays draggable */
}

#oa-pz-strip.is-ready {
	display: flex;
}

#oa-pz-strip button {
	pointer-events: auto;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 9999px;
	border: 1px solid hsl(30 28% 11% / .16);
	background: hsl(39 56% 96% / .92);
	backdrop-filter: blur(4px);
	color: hsl(30 28% 11%);
	font: 600 11px/1 inherit;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
}

#oa-pz-strip button:hover {
	background: hsl(38 46% 91%);
}

#oa-pz-strip button:focus-visible {
	outline: 2px solid hsl(28 48% 44%);
	outline-offset: 2px;
}

/* The finished piece, shown while "Original" is selected. */
#oa-pz-original {
	position: absolute;
	z-index: 30;
	display: none;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background: hsl(0 0% 100%);
	border-radius: 18px;
	overflow: hidden;
}

#oa-pz-original.is-on {
	display: flex;
}

#oa-pz-original img {
	max-width: 82%;
	max-height: 82%;
	width: auto;
	height: auto;
	object-fit: contain;
}

#oa-pz-original span {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 12px;
	border-radius: 9999px;
	background: hsl(30 28% 11% / .07);
	color: hsl(30 20% 28%);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ------------------------------------------------------- how it works --*/

#oa-how {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	align-items: flex-end;
	justify-content: center;
}

#oa-how.is-open { display: flex; }

#oa-how .oa-how__veil {
	position: absolute;
	inset: 0;
	background: hsl(30 28% 11% / .46);
}

#oa-how .oa-how__card {
	position: relative;
	width: min(470px, 100%);
	max-height: 86vh;
	overflow-y: auto;
	padding: 20px 22px 22px;
	border-radius: 18px 18px 0 0;
	background: hsl(39 56% 96%);
	color: hsl(30 28% 11%);
	box-shadow: 0 -10px 40px hsl(30 28% 11% / .28);
}

@media (min-width: 700px) {
	#oa-how { align-items: center; }
	#oa-how .oa-how__card { border-radius: 18px; }
}

#oa-how h2 {
	margin: 0 0 12px;
	font-size: 1.25rem;
	line-height: 1.15;
}

#oa-how ol {
	margin: 0;
	padding-left: 1.15em;
	display: flex;
	flex-direction: column;
	gap: 9px;
	font-size: .94rem;
	line-height: 1.5;
	color: hsl(30 14% 30%);
}

#oa-how li b { color: hsl(30 28% 11%); }

#oa-how .oa-how__note {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid hsl(34 26% 80%);
	font-size: .88rem;
	color: hsl(30 14% 34%);
}

#oa-how .oa-how__close {
	width: 100%;
	min-height: 46px;
	margin-top: 16px;
	border: 0;
	border-radius: 10px;
	background: hsl(30 28% 11%);
	color: hsl(39 56% 95%);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

#oa-how .oa-how__close:focus-visible {
	outline: 2px solid hsl(28 48% 44%);
	outline-offset: 3px;
}