/* Let tooltips paint outside the widget box (Elementor clips by default). */
.elementor-widget-panoramic-product-widget {
	position: relative;
	display: block;
}

.elementor-widget-panoramic-product-widget,
.elementor-widget-panoramic-product-widget > .elementor-widget-container,
.ppw-container {
	overflow: visible !important;
}

.ppw-container {
	position: relative;
	width: 100%;
	height: auto !important;
	aspect-ratio: 16 / 9;
	background-color: transparent;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

/* Beat legacy Style → Height CSS still cached on published pages */
.elementor-widget-panoramic-product-widget .ppw-container {
	height: auto !important;
	aspect-ratio: 16 / 9;
}

.ppw-title-wrap {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: 3;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	transform: translateX(-50%);
	pointer-events: none;
}

.ppw-title {
	width: 100%;
	min-width: 0;
	margin: 0;
	box-sizing: border-box;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
}

/* Pinned to the 16:9 box. Stack: image 0 → overlay 1 → hotspot 2 → title/disclaimer 3 → open hotspot 10050 → tooltip 10060 */
.ppw-title-disclaimer {
	position: absolute;
	right: 12px;
	bottom: 0;
	z-index: 3;
	max-width: calc(100% - 24px);
	box-sizing: border-box;
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.3;
	text-align: right;
	color: #426e9b;
	pointer-events: none;
}

/* Beat theme/Elementor `img { max-width:100%; height:auto }` so cover can fill the box.
   Container also paints the same URL as background-size:cover (fills any letterbox gaps). */
.elementor-widget-panoramic-product-widget .ppw-panoramic-image,
.ppw-container > .ppw-panoramic-image {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center center;
}

.ppw-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: var(--ppw-overlay-color, #000000);
	opacity: var(--ppw-overlay-opacity, 0.35);
}

/* Bottom wave: Elementor-style top-fill SVG, rotated 180° like section bottom dividers. */
.ppw-wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	width: 100%;
	height: var(--ppw-wave-height, 48px);
	line-height: 0;
	pointer-events: none;
	overflow: hidden;
	transform: rotate(180deg);
}

.ppw-wave svg {
	display: block;
	width: 100%;
	height: 100%;
}

.ppw-wave .elementor-shape-fill {
	fill: var(--ppw-wave-color, #ffffff);
}

.ppw-hotspot {
	position: absolute;
	width: var(--ppw-hotspot-size, 30px);
	height: var(--ppw-hotspot-size, 30px);
	box-sizing: border-box;
	border-radius: 50%;
	border: 2px solid rgba(0, 0, 0, 0.15);
	background: var(--ppw-hotspot-color, #ffffff);
	transform: translate(-50%, -50%);
	cursor: pointer;
	z-index: 2;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ppw-hotspot::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--ppw-hotspot-pulse-color, var(--ppw-hotspot-color, #ffffff));
	opacity: 0.6;
	animation: ppw-pulse 1.8s ease-out infinite;
	pointer-events: none;
}

.ppw-hotspot:hover:not(.is-open),
.ppw-hotspot.dragging {
	transform: translate(-50%, -50%) scale(1.15);
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
	z-index: 10050;
}

.ppw-hotspot.is-open {
	z-index: 10050;
}

.ppw-hotspot.dragging {
	cursor: grabbing;
}

.ppw-editable .ppw-hotspot {
	cursor: grab;
	touch-action: none;
}

/* 5% snap grid while dragging in the editor */
.ppw-container.ppw-snapping {
	background-image:
		repeating-linear-gradient(
			to right,
			transparent 0,
			transparent calc(5% - 1px),
			rgba(0, 0, 0, 0.12) calc(5% - 1px),
			rgba(0, 0, 0, 0.12) 5%
		),
		repeating-linear-gradient(
			to bottom,
			transparent 0,
			transparent calc(5% - 1px),
			rgba(0, 0, 0, 0.12) calc(5% - 1px),
			rgba(0, 0, 0, 0.12) 5%
		);
	background-size: 100% 100%;
}

body.ppw-dragging {
	user-select: none;
	cursor: grabbing;
}

.ppw-tooltip {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%);
	width: 180px;
	padding: 10px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	/* Fade only — transform/placement must not animate */
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0.2s,
		background-color 0.2s ease;
	text-align: center;
	z-index: 10060;
	line-height: normal;
}

.ppw-tooltip.is-below {
	bottom: auto;
	top: calc(100% + 12px);
}

.ppw-hotspot.is-open .ppw-tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0s,
		background-color 0.2s ease;
}

.ppw-tooltip-image {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
	object-position: center;
	margin: 0 auto 8px;
	border-radius: 4px;
}

.ppw-tooltip-body {
	min-width: 0;
}

.ppw-layout-two {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 280px;
	text-align: left;
}

.ppw-layout-two .ppw-tooltip-image {
	margin: 0;
	flex-shrink: 0;
	align-self: center;
}

.ppw-layout-two .ppw-tooltip-body {
	flex: 1;
}

.ppw-product-taxonomy {
	display: inline-block;
	width: auto;
	max-width: 100%;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	margin-bottom: 4px;
	opacity: 0.75;
	box-sizing: border-box;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

a.ppw-product-taxonomy:hover {
	opacity: 1;
}

.ppw-product-name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 4px;
	transition: color 0.2s ease;
}

.ppw-product-price {
	font-size: 12px;
	margin-bottom: 8px;
	transition: color 0.2s ease;
}

.ppw-view-more {
	display: inline-block;
	font-size: 12px;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

@keyframes ppw-pulse {
	0% {
		transform: scale(0.85);
		opacity: 0.6;
	}
	70% {
		transform: scale(1.35);
		opacity: 0;
	}
	100% {
		transform: scale(1.35);
		opacity: 0;
	}
}

/* Tablet / mobile: tooltips shrink; hotspot size/color come from Elementor responsive controls */
@media (max-width: 768px) {
	.ppw-tooltip {
		width: min(180px, 70vw);
		padding: 8px;
	}

	.ppw-layout-two {
		width: min(280px, 85vw);
	}
}
