.ih-frontend-wrap {
	position: relative;
	z-index: 1;
	display: inline-block;
	max-width: 100%;
	--ih-dot-size: 20px;
	--ih-dot-fill-rgba: rgba(255, 255, 255, 1);
	--ih-dot-halo-rgba: rgba(255, 255, 255, 0.7);
	--ih-dot-halo-w: 0px;
	/* Zelfde formule als .ih-hotspot-dot voor hit-zone (halo) */
	--ih-dot-diameter: max(10px, calc(var(--ih-dot-size, 20px) * 0.42));
}

.ih-frontend-wrap img {
	display: block;
	max-width: 100%;
	height: auto;
}

.ih-hotspot {
	position: absolute;
	z-index: 2;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	overflow: visible;
}

/* Grotere hover-/klikzone: halo is box-shadow en telt niet mee voor hit-testing */
.ih-hotspot-hit {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(var(--ih-dot-diameter) + 2 * var(--ih-dot-halo-w, 0px));
	height: calc(var(--ih-dot-diameter) + 2 * var(--ih-dot-halo-w, 0px));
	box-sizing: border-box;
	border-radius: 50%;
	z-index: 3;
	pointer-events: auto;
	cursor: pointer;
	background: transparent;
}

/* Punt: geen rand; halo = enige ring (0px = geen ring). Geen hover-styling op de frontend-cirkel. */
.ih-frontend-wrap button.ih-hotspot-dot,
.ih-frontend-wrap a.ih-hotspot-dot,
.ih-frontend-wrap span.ih-hotspot-dot {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--ih-dot-diameter);
	height: var(--ih-dot-diameter);
	min-width: var(--ih-dot-diameter);
	min-height: var(--ih-dot-diameter);
	max-width: var(--ih-dot-diameter);
	max-height: var(--ih-dot-diameter);
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	line-height: 0;
	border: 0 solid transparent;
	border-radius: 50% !important;
	background-color: var(--ih-dot-fill-rgba, rgba(255, 255, 255, 1));
	box-shadow: 0 0 0 var(--ih-dot-halo-w, 0px) var(--ih-dot-halo-rgba, transparent);
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	transition: none;
	opacity: 1;
}

.ih-frontend-wrap button.ih-hotspot-dot:hover,
.ih-frontend-wrap a.ih-hotspot-dot:hover,
.ih-frontend-wrap span.ih-hotspot-dot:hover,
.ih-frontend-wrap button.ih-hotspot-dot:active,
.ih-frontend-wrap a.ih-hotspot-dot:active,
.ih-frontend-wrap span.ih-hotspot-dot:active {
	background-color: var(--ih-dot-fill-rgba, rgba(255, 255, 255, 1));
	box-shadow: 0 0 0 var(--ih-dot-halo-w, 0px) var(--ih-dot-halo-rgba, transparent);
	filter: none;
	opacity: 1;
	transform: none;
}

.ih-frontend-wrap button.ih-hotspot-dot:focus,
.ih-frontend-wrap a.ih-hotspot-dot:focus,
.ih-frontend-wrap span.ih-hotspot-dot:focus {
	outline: none !important;
	opacity: 1;
	filter: none;
	background-color: var(--ih-dot-fill-rgba, rgba(255, 255, 255, 1));
	box-shadow: 0 0 0 var(--ih-dot-halo-w, 0px) var(--ih-dot-halo-rgba, transparent);
}

.ih-frontend-wrap button.ih-hotspot-dot:focus-visible,
.ih-frontend-wrap a.ih-hotspot-dot:focus-visible,
.ih-frontend-wrap span.ih-hotspot-dot:focus-visible {
	animation: none;
	opacity: 1;
	filter: none;
	box-shadow:
		0 0 0 3px rgba(10, 122, 194, 0.45),
		0 0 0 var(--ih-dot-halo-w, 0px) var(--ih-dot-halo-rgba, transparent);
}

@keyframes ih-dot-halo-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 var(--ih-dot-halo-w, 0px) var(--ih-dot-halo-rgba, transparent);
	}
	50% {
		box-shadow: 0 0 0 calc(var(--ih-dot-halo-w, 0px) * 1.22) var(--ih-dot-halo-rgba, transparent);
	}
}

/* Standaard tooltip (zonder productkaart) */
.ih-hotspot:not(.ih-hotspot--card) .ih-hotspot-tooltip {
	position: absolute;
	left: 14px;
	top: 14px;
	background: #fff;
	padding: 10px 12px;
	min-width: 180px;
	border-radius: 6px;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.ih-hotspot:not(.ih-hotspot--card) .ih-hotspot-tooltip-link:hover {
	background: #fcfcfc;
}

.ih-hotspot:not(.ih-hotspot--card) .ih-hotspot-tooltip strong {
	display: block;
	font-size: 14px;
	line-height: 1.3;
}

.ih-hotspot:not(.ih-hotspot--card) .ih-hotspot-tooltip span {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #4a4a4a;
}

/* Tooltip / kaart: standaard verborgen (opacity i.p.v. alleen display: voorkomt dat theme/Elementor display:block forceren) */
.ih-hotspot-tooltip {
	position: absolute;
	z-index: 20;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.15s ease,
		visibility 0.15s ease;
}

.ih-hotspot-tooltip-link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.ih-hotspot--card .ih-hotspot-tooltip {
	z-index: 3;
	left: calc(var(--ih-dot-size) * 0.35 + 12px);
	top: 50%;
	right: auto;
	bottom: auto;
	transform: translateY(-50%);
	margin: 0;
	min-width: 200px;
	padding: 0;
	overflow: visible;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

/* Desktop: kaart links van stip als er rechts te weinig ruimte is */
@media (min-width: 768px) {
	.ih-hotspot--card .ih-hotspot-tooltip.ih-hotspot-tooltip--align-left {
		left: auto;
		right: calc(var(--ih-dot-size, 20px) * 0.35 + 12px);
	}

	.ih-hotspot--card .ih-hotspot-tooltip.ih-hotspot-tooltip--clamp-x {
		transform: translateY(-50%) translateX(var(--ih-tooltip-shift-x, 0));
	}
}

.ih-hotspot-card-wrap.ih-hotspot-tooltip-link:hover {
	background: transparent;
}

.ih-hotspot-card-wrap {
	text-decoration: none;
	color: inherit;
	display: block;
	filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.2));
}

.ih-hotspot-card-wrap:hover .ih-hotspot-card {
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

.ih-hotspot-card {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: min(100vw - 32px, 300px);
	min-width: 240px;
	max-width: 300px;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

.ih-hotspot-card-swatch {
	flex: 0 0 92px;
	width: 92px;
	min-width: 88px;
	max-width: 100px;
	min-height: 96px;
	align-self: stretch;
	border-radius: 12px 0 0 12px;
}

.ih-hotspot-card-body {
	flex: 1 1 auto;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	text-align: center;
	padding: 14px 52px 14px 12px;
	gap: 2px;
	min-height: 96px;
}

.ih-hotspot-card-title {
	display: block;
	width: 100%;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #000;
	margin: 0;
	white-space: normal;
	word-break: break-word;
	hyphens: auto;
}

.ih-hotspot-card-brand {
	display: block;
	width: 100%;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #000;
	line-height: 1.35;
	margin-top: 2px;
}

.ih-hotspot-card-price {
	display: block;
	width: 100%;
	margin-top: auto;
	padding-top: 10px;
	line-height: 1;
}

.ih-price-line {
	display: inline-flex;
	align-items: flex-start;
	justify-content: center;
	flex-wrap: nowrap;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #000;
}

.ih-price-major {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.ih-price-minor {
	font-size: 11px;
	font-weight: 600;
	vertical-align: super;
	line-height: 1;
	margin-top: 3px;
	margin-left: 1px;
}

.ih-price-line--plain {
	font-size: 18px;
	font-weight: 700;
}

.ih-hotspot-card-chevron {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 38px;
	font-weight: 300;
	color: #1a1a1a;
	line-height: 1;
	opacity: 0.75;
	pointer-events: none;
}

/* Gepind na tik of klik op de stip (.is-active) — desktop én touch */
.ih-hotspot.is-active .ih-hotspot-tooltip,
.ih-hotspot-tooltip.ih-is-portaled {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Desktop: hover, toetsenbordfocus, muis binnen hotspot, of gepind */
@media (hover: hover) {
	.ih-hotspot:hover .ih-hotspot-tooltip,
	.ih-hotspot:focus-within .ih-hotspot-tooltip,
	.ih-hotspot.ih-mouse-inside .ih-hotspot-tooltip {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}
}

.ih-admin-edit-link-wrap {
	position: absolute;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	margin: 0;
	z-index: 25;
}

.ih-admin-edit-link {
	display: inline-block;
	font-size: 12px;
	color: #1d2327;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.92);
	padding: 6px 10px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/*
 * Mobiel: kaart vast in viewport (body + fixed), niet afgesneden door slider/Swiper.
 */
@media (max-width: 767px) {
	.ih-frontend-wrap {
		position: relative;
	}

	.ih-frontend-wrap > img {
		position: relative;
		z-index: 0;
	}

	.ih-hotspot--card > .ih-hotspot-tooltip {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	body.ih-hotspot-card-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 99998;
		background: rgba(0, 0, 0, 0.38);
		pointer-events: auto;
	}

	.ih-hotspot-tooltip.ih-is-portaled-body {
		position: fixed !important;
		left: 50% !important;
		top: 50% !important;
		right: auto !important;
		bottom: auto !important;
		transform: translate(-50%, -50%) !important;
		margin: 0 !important;
		z-index: 99999 !important;
		box-sizing: border-box;
		width: min(calc(100vw - 60px), 300px) !important;
		max-width: min(calc(100vw - 60px), 300px) !important;
		min-width: 0 !important;
		max-height: min(85vh, 520px) !important;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.ih-hotspot-tooltip.ih-is-portaled-body .ih-hotspot-card-wrap {
		display: block;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.ih-hotspot-tooltip.ih-is-portaled-body .ih-hotspot-card {
		width: 100%;
		min-width: 0;
		max-width: none;
		box-sizing: border-box;
	}

	.ih-hotspot-tooltip.ih-is-portaled-body .ih-hotspot-card-swatch {
		flex: 0 0 76px;
		width: 76px;
		min-width: 64px;
		max-width: 35%;
		min-height: 84px;
	}

	.ih-hotspot-tooltip.ih-is-portaled-body .ih-hotspot-card-body {
		flex: 1 1 auto;
		min-width: 0;
		min-height: 84px;
		padding: 12px 40px 12px 8px;
	}
}

/* Modal-opening: zwevend kaartje niet tonen en niet over de stip laten liggen. */
body.ih-hotspots-modal .ih-frontend-wrap .ih-hotspot-tooltip,
.ih-frontend-wrap[data-ih-open="modal"] .ih-hotspot-tooltip {
	display: none !important;
}

body.ih-hotspot-modal-open {
	overflow: hidden;
}

.ih-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 16px;
	box-sizing: border-box;
}

.ih-modal[hidden] {
	display: none;
}

.ih-modal.is-open {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.ih-modal.is-open .ih-modal-card,
.ih-modal.is-open .ih-hotspot-card,
.ih-modal.is-open .ih-hotspot-card-swatch {
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.ih-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.ih-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 340px);
}

.ih-modal-close {
	position: absolute;
	top: -14px;
	right: -6px;
	z-index: 2;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #1a1a1a;
	font-size: 20px;
	line-height: 32px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ih-modal-card {
	position: relative;
	left: auto;
	top: auto;
	right: auto;
	bottom: auto;
	transform: none;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	display: block;
	width: 100%;
	max-width: 340px;
}

.ih-modal-card .ih-hotspot-card {
	width: 100%;
	max-width: none;
}

.ih-modal-card .ih-hotspot-card-swatch {
	flex-basis: 120px;
	width: 120px;
	min-width: 120px;
	max-width: 120px;
	min-height: 140px;
}
