/* Слайд с точками: picture как у соседних слайдов.
   data-ip-figure на .splide__slide, слой точек — абсолютный оверлей. */

.splide__slide[data-ip-figure] {
	position: relative;
}

/* Не даём исходному WebP раздуть кадр, если src без ресайза */
.single-product__slider .splide__slide[data-ip-figure] picture,
.single-product__thumb .splide__slide[data-ip-figure] picture {
	display: block;
	width: 100%;
	height: 100%;
}

.single-product__slider .splide__slide[data-ip-figure] picture img,
.single-product__thumb .splide__slide[data-ip-figure] picture img {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	max-width: none;
	max-height: none;
}

/* Размер/позицию уточняет JS по object-fit; до sync — на весь кадр */
.ip-hotspots {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 3;
	overflow: hidden;
}

.ip-hotspots__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
}

.ip-hotspots__connectors {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
	z-index: 3;
}

.ip-hotspots__line {
	stroke: #c8c8c8;
	stroke-width: 1.25;
	vector-effect: non-scaling-stroke;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ip-hotspots__line.is-visible {
	opacity: 1;
}

.ip-hotspots__connectors path.ip-hotspots__line,
.ip-hotspots__connectors polyline.ip-hotspots__line {
	fill: none;
}

/* Область: всегда видна красным; подсказка — по клику */
.ip-hotspots__area {
	fill: rgba(140, 35, 35, 0.45);
	stroke: rgba(120, 20, 20, 0.55);
	stroke-width: 0.15;
	transition: fill 0.2s ease, stroke 0.2s ease;
	pointer-events: auto;
	cursor: pointer;
}

.ip-hotspots__area.is-hover,
.ip-hotspots__area.is-active {
	fill: rgba(160, 30, 30, 0.55);
	stroke: rgba(140, 15, 15, 0.7);
	stroke-width: 0.2;
}

/* Маркер: красная точка с пульсацией */
.ip-hotspots__point {
	position: absolute;
	transform: translate(-50%, -50%);
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #e53935;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	pointer-events: auto;
	z-index: 2;
}

.ip-hotspots__point.is-hover,
.ip-hotspots__point.is-active {
	background: #c62828;
	box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.35), 0 1px 4px rgba(0, 0, 0, 0.35);
}

.ip-hotspots__pulse {
	position: absolute;
	inset: -8px;
	border-radius: 50%;
	border: 2px solid rgba(229, 57, 53, 0.65);
	animation: ip-pulse 2s ease-out infinite;
	pointer-events: none;
}

.ip-hotspots__point.is-hover .ip-hotspots__pulse,
.ip-hotspots__point.is-active .ip-hotspots__pulse {
	animation-play-state: paused;
	opacity: 0;
}

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

@media (prefers-reduced-motion: reduce) {
	.ip-hotspots__pulse {
		animation: none;
	}
}

/* Подсказка: светлая контрастная подложка; текст внутри, перенос только по словам */
.ip-hotspots__tip {
	position: absolute;
	box-sizing: border-box;
	width: max-content;
	max-width: min(240px, 100%);
	min-width: 0;
	padding: 12px 16px;
	background: linear-gradient(180deg, #f7f7f7 0%, #ececec 100%);
	color: #111;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translate(0, 0);
	transition: opacity 0.2s ease, visibility 0.2s;
	pointer-events: none;
	z-index: 4;
	overflow: hidden;
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	word-wrap: normal;
	hyphens: none;
	-webkit-hyphens: none;
	-ms-hyphens: none;
	text-align: left !important;
}

.ip-hotspots__tip.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ip-hotspots__tip a {
	color: #0b5cad;
	text-decoration: underline;
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
}

.ip-hotspots__tip-inner {
	display: block;
	max-width: 100%;
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-align: left !important;
}

/* Оверлей внутри lightGallery */
.ip-lg-layer {
	position: absolute;
	pointer-events: none;
	z-index: 1085;
}

.ip-lg-layer .ip-hotspots {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
