/* ==========================================================================
   "Vue 360°" — interactive 3D tile showcase (template-parts/showcase-360.php)
   Original Multicerame language: Red Hat Display titles, Arial text, orange rule accent,
   warm brown ground behind the tiles, giant faint watermark.
   ========================================================================== */

.o-360 {
	--o360-bg: #dcc9b3; /* warm brown ground behind the tiles */
	--o360-glow: #f4ece2;
	--o360-ink: #1b1e25;
	--o360-text: #4f473e;
	--o360-line: #cdb9a2;
	--o360-accent: #fc9d21;
	--o360-accent-ink: #a8630a;
	position: relative;
	display: grid;
	grid-template-columns: minmax(250px, 330px) minmax(0, 1fr) minmax(270px, 310px);
	grid-template-areas:
		"intro stage card"
		"picker picker picker";
	align-items: center;
	gap: 0 32px;
	margin-top: 0;
	padding: 48px max(24px, (100% - 1240px) / 2) 40px;
	overflow: hidden;
	background: radial-gradient(60% 70% at 50% 45%, var(--o360-glow) 0%, var(--o360-bg) 78%);
	font-family: var(--o-body, Arial, sans-serif);
	color: var(--o360-text);
	transition: background-color 0.6s ease, color 0.6s ease;
	isolation: isolate;
}
.o-360.is-evening {
	--o360-ink: #fff;
	--o360-text: rgba(255, 255, 255, 0.72);
	--o360-line: rgba(255, 255, 255, 0.14);
	background: radial-gradient(60% 70% at 50% 45%, #3a2f25 0%, #17120e 74%);
}

/* Giant outlined "360°" behind the stage. */
.o-360__watermark {
	position: absolute;
	top: 40px;
	left: 50%;
	z-index: -1;
	transform: translateX(-50%);
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: clamp(200px, 30vw, 430px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.04em;
	color: transparent;
	-webkit-text-stroke: 2px rgba(120, 92, 62, 0.22);
	user-select: none;
	pointer-events: none;
	transition: -webkit-text-stroke-color 0.6s ease;
}
.o-360.is-evening .o-360__watermark {
	-webkit-text-stroke-color: rgba(255, 255, 255, 0.07);
}

/* ------------------------------------------------------------ Intro */
.o-360__intro {
	grid-area: intro;
	align-self: start;
	padding-top: 10px;
}
.o-360 .o-title__sub {
	color: #7a6650; /* readable on the warm ground */
	transition: color 0.6s ease;
}
.o-360.is-evening .o-title__sub {
	color: rgba(255, 255, 255, 0.6);
}
.o-360__title {
	margin: 16px 0 0;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: clamp(30px, 2.6vw, 42px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: var(--o360-ink);
	transition: color 0.6s ease;
}
.o-360__lead {
	max-width: 34ch;
	margin: 18px 0 0;
	font-size: 16px;
	line-height: 1.65;
}
.o-360__light {
	display: inline-flex;
	gap: 4px;
	margin-top: 26px;
	padding: 4px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.25);
}
.o-360__light button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #1b1e25;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
}
.o-360__light button[aria-checked="true"] {
	background: #1b1e25;
	color: #fff;
}
.o-360__light svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

/* ------------------------------------------------------------ Stage */
.o-360__stage {
	grid-area: stage;
	position: relative;
	height: 520px;
	outline: none;
	cursor: grab;
	touch-action: pan-y;
}
.o-360__stage.is-dragging {
	cursor: grabbing;
}
.o-360__stage:focus-visible {
	box-shadow: inset 0 0 0 2px var(--o360-accent);
	border-radius: 16px;
}
.o-360__canvas,
.o-360__canvas canvas {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
}
.o-360__fallback {
	position: absolute;
	left: 50%;
	top: 46%;
	width: auto;
	height: auto;
	max-width: 60%;
	max-height: 70%;
	transform: translate(-50%, -50%);
	box-shadow: 0 30px 40px -24px rgba(0, 0, 0, 0.6);
}
.o-360.has-3d .o-360__fallback {
	display: none;
}
.o-360__labels {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Hotspots: a pulsing dot and a pill label. */
.o-360__hot {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	opacity: 0;
	transition: opacity 0.35s ease;
	will-change: transform;
}
.o-360__hot.is-visible {
	opacity: 1;
}
.o-360__hot.is-left {
	flex-direction: row-reverse;
}
.o-360__dot {
	position: relative;
	flex: none;
	width: 14px;
	height: 14px;
	margin: -7px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--o360-accent);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.o-360__dot::after {
	content: "";
	position: absolute;
	inset: -7px;
	border: 2px solid var(--o360-accent);
	border-radius: 50%;
	opacity: 0;
	animation: o360-pulse 2.2s ease-out infinite;
}
@keyframes o360-pulse {
	0% {
		transform: scale(0.5);
		opacity: 0.8;
	}
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}
.o-360__pill {
	padding: 7px 14px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.3);
	color: #1b1e25;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}
.o-360__pill small {
	display: block;
	font-family: var(--o-body, Arial, sans-serif);
	font-size: 11px;
	font-weight: 400;
	color: #6b6f75;
}

/* Turntable degrees (projected from 3D). */
.o-360__deg {
	position: absolute;
	left: 0;
	top: 0;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 12px;
	font-weight: 700;
	color: #9b9fa5;
	transform: translate(-50%, -50%);
	transition: opacity 0.2s linear;
}
.o-360.is-evening .o-360__deg {
	color: rgba(255, 255, 255, 0.45);
}
.o-360__knob {
	position: absolute;
	left: 50%;
	top: 0;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 4px solid #fff;
	border-radius: 50%;
	background: var(--o360-accent);
	color: #fff;
	box-shadow: 0 6px 18px -4px rgba(252, 157, 33, 0.7);
	transform: translate(-50%, -50%);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.4s ease;
}
.o-360.has-3d .o-360__knob {
	opacity: 1;
}
.o-360__knob svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}
.o-360__angle {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translate(-50%, 28px);
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 15px;
	font-weight: 800;
	color: var(--o360-ink);
	font-variant-numeric: tabular-nums;
	transition: color 0.6s ease;
}
.o-360__hint {
	position: absolute;
	left: 50%;
	top: 100%;
	margin: 0;
	white-space: nowrap;
	transform: translateX(-50%);
	font-size: 13px;
	color: var(--o360-text);
	transition: opacity 0.5s ease;
}
.o-360__hint.is-hidden {
	opacity: 0;
}

/* ------------------------------------------------------------ Product card */
.o-360__card {
	grid-area: card;
	padding: 26px 24px 22px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.35);
	color: #5f6368;
}
.o-360__name {
	margin: 0;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	text-transform: uppercase;
	color: #1b1e25;
}
.o-360__line {
	margin: 8px 0 0;
	font-size: 13px;
	color: #7a7d82;
}
.o-360__specs {
	margin: 18px 0 0;
	padding: 14px 0 4px;
	border-top: 1px solid #ececec;
	border-bottom: 1px solid #ececec;
}
.o-360__specs div {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 10px;
	padding: 7px 0;
	font-size: 14px;
	line-height: 1.4;
}
.o-360__specs dt {
	position: relative;
	padding-left: 16px;
	color: #7a7d82;
}
.o-360__specs dt::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	width: 7px;
	height: 7px;
	background: var(--o360-accent);
}
.o-360__specs dd {
	margin: 0;
	font-weight: 700;
	color: #1b1e25;
}
.o-360__actions {
	display: grid;
	gap: 10px;
	margin-top: 18px;
}
.o-360__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 14px;
	background: #1b1e25;
	color: #fff !important;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.6px;
	text-decoration: none;
	white-space: nowrap;
	text-transform: uppercase;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.o-360__btn:hover {
	background: var(--o360-accent);
}
.o-360__btn--ghost {
	border: 1px solid #1b1e25;
	background: #fff;
	color: #1b1e25 !important;
}
.o-360__btn--ghost:hover {
	border-color: #25d366;
	background: #25d366;
	color: #fff !important;
}
.o-360__btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
}
.o-360__link {
	justify-self: center;
	margin-top: 2px;
	font-size: 13px;
	color: #1b1e25;
	text-decoration: underline;
	text-decoration-color: var(--o360-accent);
	text-underline-offset: 4px;
}
.o-360__btn:focus-visible,
.o-360__link:focus-visible,
.o-360__light button:focus-visible,
.o-360__picker button:focus-visible {
	outline: 2px solid var(--o360-accent);
	outline-offset: 3px;
}

/* ------------------------------------------------------------ Picker */
.o-360__picker {
	grid-area: picker;
	display: flex;
	justify-content: center;
	gap: 14px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}
.o-360__picker button {
	display: grid;
	justify-items: center;
	gap: 6px;
	width: 132px;
	padding: 10px 10px 12px;
	border: 2px solid transparent;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.o-360__picker button:hover {
	transform: translateY(-3px);
}
.o-360__picker button[aria-checked="true"] {
	border-color: var(--o360-accent);
	box-shadow: 0 12px 26px -14px rgba(252, 157, 33, 0.8);
}
.o-360__picker img {
	display: block;
	width: 100%;
	height: 64px;
	border-radius: 8px;
	object-fit: cover;
}
.o-360__pick-name {
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	color: #1b1e25;
}
.o-360__pick-format {
	font-size: 12px;
	font-weight: 700;
	color: var(--o360-accent-ink);
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1100px) {
	.o-360 {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"intro"
			"stage"
			"picker"
			"card";
		gap: 0;
	}
	.o-360__intro {
		text-align: center;
	}
	.o-360__lead {
		margin-inline: auto;
	}
	.o-360__stage {
		height: 480px;
	}
	.o-360__card {
		width: min(560px, 100%);
		margin: 26px auto 0;
		box-sizing: border-box;
	}
}
@media (max-width: 767px) {
	.o-360 {
		margin-top: 0;
		padding-top: 48px;
	}
	.o-360__watermark {
		top: 170px;
	}
	.o-360__stage {
		height: 420px;
	}
	.o-360__picker {
		justify-content: flex-start;
		margin-inline: -24px;
		padding: 4px 24px 10px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}
	.o-360__picker li {
		scroll-snap-align: start;
	}
	.o-360__picker button {
		width: 116px;
	}
	.o-360__pill {
		font-size: 12px;
		padding: 6px 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.o-360,
	.o-360 * {
		transition-duration: 0s !important;
	}
	.o-360__dot::after {
		animation: none;
	}
}
