/* Orbital Product Wheel Showcase - Frontend Styles (Desktop & Mobile) */

.ows-showcase,
.ows-showcase *,
.ows-showcase *::before,
.ows-showcase *::after {
	box-sizing: border-box;
}

.ows-showcase {
	--ows-bg: #ffffff;
	--ows-primary: #111111;
	--ows-muted: #9ca3af;
	--ows-desktop-h: 680px;
	--ows-vw: 100vw;

	position: relative;
	width: 100%;
	height: var(--ows-desktop-h);
	min-height: 560px;
	background-color: var(--ows-bg);
	color: var(--ows-primary);
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	outline: none;
	isolation: isolate;
}

.ows-showcase.ows-full-bleed {
	width: var(--ows-vw);
	max-width: var(--ows-vw);
	left: 50%;
	transform: translateX(-50%);
}

/* Admin setup notice when empty */
.ows-admin-setup-notice {
	padding: 20px 24px;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	background: #f8fafc;
	color: #0f172a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	text-align: center;
	margin: 16px auto;
	max-width: 760px;
}

/* Top-Left Info Block (Desktop) */
.ows-info {
	position: absolute;
	top: 9%;
	left: clamp(24px, 4.5%, 72px);
	width: min(440px, 38%);
	z-index: 25;
	pointer-events: auto;
	transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.ows-info.is-swapping {
	opacity: 0.45;
	transform: translateY(3px);
}

.ows-counter {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	color: var(--ows-muted);
	font-variant-numeric: tabular-nums;
	margin-bottom: 10px;
	line-height: 1.2;
}

.ows-title {
	margin: 0 0 12px;
	padding: 0;
	font-family: inherit;
	font-size: clamp(24px, 2.35vw, 36px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--ows-primary);
	word-break: break-word;
}

.ows-price-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
	min-height: 24px;
}

.ows-price-current {
	font-size: 17px;
	font-weight: 600;
	color: var(--ows-primary);
	font-variant-numeric: tabular-nums;
}

.ows-price-old {
	font-size: 15px;
	font-weight: 400;
	color: var(--ows-muted);
	text-decoration: line-through;
	font-variant-numeric: tabular-nums;
}

.ows-details-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ows-primary);
	text-decoration: none;
	border: 0;
	padding: 4px 0;
	transition: opacity 0.15s ease, gap 0.15s ease;
}

.ows-details-link:hover,
.ows-details-link:focus {
	color: var(--ows-primary);
	text-decoration: none;
	opacity: 0.72;
	gap: 10px;
}

.ows-details-arrow {
	font-size: 14px;
	line-height: 1;
}

/* Curved Elliptical Orbit Stage */
.ows-stage {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	touch-action: pan-y;
}

.ows-orbit-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
	overflow: visible;
}

.ows-orbit-path {
	stroke: rgba(17, 17, 17, 0.065);
	stroke-width: 1.25px;
	fill: none;
}

.ows-no-orbit-line .ows-orbit-svg {
	display: none;
}

.ows-slots-layer {
	position: absolute;
	inset: 0;
	z-index: 5;
	pointer-events: none;
}

.ows-slot {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	will-change: transform, opacity;
	pointer-events: auto;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.ows-slot[data-active="1"] {
	cursor: grab;
}

.ows-slot[data-active="1"]:active {
	cursor: grabbing;
}

/* SSR fallback centering before JS hydration */
.ows-slot-ssr {
	left: 52%;
	top: 42%;
	height: 300px;
	transform: translate(-50%, -50%);
}

.ows-slot-img-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ows-slot-img-wrap img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
	-webkit-user-drag: none;
	border: 0;
	box-shadow: none;
	background: transparent;
}

.ows-multiply .ows-slot-img-wrap img {
	mix-blend-mode: multiply;
}

/* Soft floating ground contact shadow under active item */
.ows-slot-shadow {
	position: absolute;
	bottom: -14px;
	left: 50%;
	width: 56%;
	height: 18px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.19) 0%, rgba(0, 0, 0, 0.06) 46%, transparent 74%);
	filter: blur(4px);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.12s linear;
}

/* Bottom Controls Wrapper: display:contents on desktop so CTA & Wheel float cleanly */
.ows-bottom-controls {
	display: contents;
}

.ows-cta-wrap {
	position: absolute;
	right: clamp(24px, 4.5%, 72px);
	bottom: 64px;
	z-index: 30;
}

button.ows-add-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 260px;
	height: 50px;
	padding: 0 28px;
	border-radius: 999px;
	border: 0;
	background: var(--ows-primary);
	color: #ffffff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
	text-transform: none;
	margin: 0;
}

button.ows-add-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

button.ows-add-btn:active {
	transform: scale(0.985);
}

button.ows-add-btn.is-loading {
	opacity: 0.78;
	cursor: wait;
}

button.ows-add-btn.is-added {
	background: #15803d;
}

button.ows-add-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* 3D Knurled Cylinder Wheel */
.ows-wheel-wrap {
	position: absolute;
	left: 48%;
	bottom: 24px;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	z-index: 30;
}

.ows-wheel-pointer {
	width: 2px;
	height: 5px;
	border-radius: 1px;
	background: #52525b;
	margin-bottom: -4px;
	opacity: 0.75;
}

.ows-wheel-capsule {
	position: relative;
	width: 236px;
	height: 24px;
	border-radius: 999px;
	border: 1.5px solid #52525b;
	background: linear-gradient(
		180deg,
		#d4d4d8 0%,
		#f8fafc 24%,
		#ffffff 48%,
		#e4e4e7 74%,
		#a1a1aa 100%
	);
	box-shadow:
		inset 0 2px 4px rgba(0, 0, 0, 0.12),
		inset 0 -2px 4px rgba(0, 0, 0, 0.18),
		0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	cursor: grab;
	touch-action: none;
	outline: none;
}

.ows-wheel-capsule:active,
.ows-wheel-capsule.is-dragging {
	cursor: grabbing;
}

.ows-wheel-capsule:focus-visible {
	box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.22);
}

.ows-wheel-ticks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ows-wheel-tick {
	position: absolute;
	top: 1px;
	bottom: 1px;
	width: 2px;
	margin-left: -1px;
	border-radius: 1px;
	background: linear-gradient(
		90deg,
		rgba(39, 39, 42, 0.68) 0%,
		rgba(255, 255, 255, 0.88) 55%,
		rgba(113, 113, 122, 0.35) 100%
	);
	will-change: left, opacity;
}

.ows-wheel-vignette {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		rgba(24, 24, 27, 0.45) 0%,
		rgba(24, 24, 27, 0.14) 14%,
		rgba(255, 255, 255, 0.16) 50%,
		rgba(24, 24, 27, 0.14) 86%,
		rgba(24, 24, 27, 0.45) 100%
	);
	pointer-events: none;
}

.ows-wheel-labels {
	width: 236px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--ows-muted);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.ows-wheel-hint {
	font-size: 9.5px;
	letter-spacing: 0.15em;
}

/* Subtle Add-to-Cart Toast */
.ows-toast {
	position: absolute;
	bottom: 126px;
	right: clamp(24px, 4.5%, 72px);
	z-index: 40;
	background: var(--ows-primary);
	color: #ffffff;
	padding: 10px 16px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	pointer-events: none;
	animation: owsToastIn 0.2s ease;
}

@keyframes owsToastIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================
   MOBILE LAYOUT (<= 768px)
   ======================== */
@media (max-width: 768px) {
	.ows-showcase {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		height: auto;
		min-height: clamp(560px, 86svh, 740px);
	}

	.ows-info {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		padding: 18px 20px 4px;
		z-index: 20;
	}

	.ows-counter {
		font-size: 12.5px;
		margin-bottom: 8px;
	}

	.ows-title {
		font-size: clamp(21px, 6.1vw, 27px);
		line-height: 1.14;
		min-height: 2.32em;
		margin-bottom: 10px;
	}

	.ows-price-row {
		margin-bottom: 10px;
	}

	.ows-price-current {
		font-size: 16px;
	}

	.ows-price-old {
		font-size: 14px;
	}

	.ows-stage {
		position: relative;
		inset: auto;
		flex: 1 1 auto;
		width: 100%;
		min-height: 290px;
		height: clamp(290px, 42svh, 390px);
	}

	.ows-slot-ssr {
		left: 55%;
		top: 38%;
		height: 205px;
	}

	.ows-bottom-controls {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 20px;
		padding: 6px 20px 24px;
		width: 100%;
		z-index: 30;
	}

	.ows-cta-wrap {
		position: relative;
		right: auto;
		bottom: auto;
		width: 100%;
	}

	button.ows-add-btn {
		width: 100%;
		height: 50px;
		font-size: 14.5px;
	}

	.ows-wheel-wrap {
		position: relative;
		left: auto;
		bottom: auto;
		transform: none;
	}

	.ows-toast {
		right: 50%;
		bottom: 164px;
		transform: translateX(50%);
		white-space: nowrap;
	}
}
