.ime-pg360 {
	display: flex;
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
}

.ime-pg360-thumbs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: var(--ime-thumb-w, 90px);
	flex: 0 0 var(--ime-thumb-w, 90px);
}

.ime-pg360-thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 0;
	border: 2px solid #e4e4e4;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.ime-pg360-thumb:hover,
.ime-pg360-thumb:focus-visible {
	border-color: #cc1111;
	outline: none;
}

.ime-pg360-thumb.is-active {
	border-color: #cc1111;
}

.ime-pg360-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ime-pg360-thumb-badge {
	position: absolute;
	left: 3px;
	bottom: 3px;
	background: #cc1111;
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
	padding: 2px 4px;
	border-radius: 4px;
	letter-spacing: 0.02em;
}

.ime-pg360-main {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #eee;
}

.ime-pg360-slides {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 75%; /* ratio 4:3, tecnica clasica en vez de aspect-ratio por compatibilidad */
}

.ime-pg360-slide {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
}

.ime-pg360-slide.is-active {
	display: flex;
}

.ime-pg360-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ime-pg360-slide-360 {
	cursor: ew-resize;
	touch-action: none;
	user-select: none;
	background: #f5f5f5;
}

.ime-pg360-frame-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	pointer-events: none;
}

.ime-pg360-slide-360 .ime-pg360-360-preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 1;
	transition: opacity 0.2s ease;
}

.ime-pg360-slide-360.is-ready .ime-pg360-360-preview {
	opacity: 0;
}

.ime-pg360-sprite-layer {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: 0 center;
	background-size: auto 100%;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ime-pg360-slide-360.is-ready .ime-pg360-sprite-layer {
	opacity: 1;
}

.ime-pg360-badge {
	position: absolute;
	left: 14px;
	bottom: 14px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(17, 17, 17, 0.85);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 10px;
	border-radius: 20px;
	pointer-events: none;
	letter-spacing: 0.02em;
}

.ime-pg360-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.92);
	color: #111;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ime-pg360-arrow:hover,
.ime-pg360-arrow:focus-visible {
	background: #cc1111;
	color: #fff;
	outline: none;
}

.ime-pg360-prev {
	left: 12px;
}

.ime-pg360-next {
	right: 12px;
}

@media (max-width: 767px) {
	.ime-pg360 {
		flex-direction: column-reverse;
	}
	.ime-pg360-thumbs {
		flex-direction: row;
		width: 100%;
		flex: 0 0 auto;
		overflow-x: auto;
	}
	.ime-pg360-thumb {
		width: 64px;
		flex: 0 0 64px;
	}
}

