.acipc-epg {
	position: relative;
	box-sizing: border-box;
}

.acipc-epg *,
.acipc-epg *::before,
.acipc-epg *::after {
	box-sizing: border-box;
}

.acipc-epg__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
}

.acipc-epg__main-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

.acipc-epg__main-image {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain !important;
	object-position: center center;
}

.acipc-epg__arrow,
.acipc-epg__lightbox-arrow {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14);
	color: #111;
	font: inherit;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
}

.acipc-epg__arrow--prev {
	left: 12px;
}

.acipc-epg__arrow--next {
	right: 12px;
}

.acipc-epg__counter {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 3;
	padding: 5px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #222;
	font-size: 12px;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.acipc-epg__thumbs {
	display: flex;
	gap: 8px;
	width: 100%;
	margin-top: 10px;
	padding: 2px 1px 6px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.acipc-epg__thumb {
	flex: 0 0 76px;
	width: 76px;
	height: 76px;
	margin: 0;
	padding: 4px;
	border: 1px solid #d9d9d9;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	opacity: 0.76;
}

.acipc-epg__thumb.is-active {
	border-color: #555;
	box-shadow: 0 0 0 1px #555;
	opacity: 1;
}

.acipc-epg__thumb img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: contain !important;
	background: #fff;
}

.acipc-epg__lightbox[hidden] {
	display: none !important;
}

.acipc-epg__lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
}

.acipc-epg__lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
}

.acipc-epg__lightbox-content {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(1200px, 94vw);
	height: min(900px, 90vh);
}

.acipc-epg__lightbox-image {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: contain !important;
}

.acipc-epg__lightbox-close {
	position: fixed;
	top: 14px;
	right: 18px;
	z-index: 5;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255,255,255,.94);
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}

.acipc-epg__lightbox-arrow--prev {
	left: 20px;
}

.acipc-epg__lightbox-arrow--next {
	right: 20px;
}

.acipc-epg__lightbox-counter {
	position: fixed;
	left: 50%;
	bottom: 18px;
	z-index: 5;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(255,255,255,.94);
	color: #111;
	transform: translateX(-50%);
}

body.acipc-epg-lightbox-open {
	overflow: hidden !important;
}

img.acipc-external-product-image {
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

@media (max-width: 767px) {
	.acipc-epg__arrow,
	.acipc-epg__lightbox-arrow {
		width: 38px;
		height: 38px;
		font-size: 30px;
	}

	.acipc-epg__arrow--prev { left: 7px; }
	.acipc-epg__arrow--next { right: 7px; }

	.acipc-epg__thumb {
		flex-basis: 64px;
		width: 64px;
		height: 64px;
	}

	.acipc-epg__lightbox {
		padding: 12px;
	}

	.acipc-epg__lightbox-content {
		width: 96vw;
		height: 84vh;
	}

	.acipc-epg__lightbox-arrow--prev { left: 8px; }
	.acipc-epg__lightbox-arrow--next { right: 8px; }
}


/* ==========================================================
 * 1.3.1 – Techone3 hover / jednotná velikost galerie
 * ========================================================== */

/* Šablona nesmí přebarvovat plochu galerie ani button při hoveru. */
.single-product .acipc-epg,
.single-product .acipc-epg__stage,
.single-product .acipc-epg__main-button,
.single-product .acipc-epg__main-button:hover,
.single-product .acipc-epg__main-button:focus,
.single-product .acipc-epg__main-button:focus-visible,
.single-product .acipc-epg__main-button:active {
	background: #fff !important;
	background-color: #fff !important;
	background-image: none !important;
	box-shadow: none;
}

/* Některé šablony dávají buttonům barevný ::before / ::after overlay. */
.single-product .acipc-epg__main-button::before,
.single-product .acipc-epg__main-button::after,
.single-product .acipc-epg__main-button:hover::before,
.single-product .acipc-epg__main-button:hover::after {
	content: none !important;
	display: none !important;
	background: transparent !important;
}

/*
 * Všechny obrázky mají stejný zobrazovací box.
 * object-fit: contain zachová celý produkt bez ořezu.
 */
.single-product .acipc-epg__main-button {
	overflow: hidden !important;
	border: 0 !important;
	outline-offset: -2px;
}

.single-product .acipc-epg__main-image {
	width: 90% !important;
	height: 90% !important;
	max-width: 90% !important;
	max-height: 90% !important;
	margin: auto !important;
	object-fit: contain !important;
	object-position: center center !important;
	background: #fff !important;
	transform: scale(1);
	transform-origin: center center;
	transition:
		transform 260ms cubic-bezier(.2,.65,.3,1),
		opacity 180ms ease !important;
	will-change: transform;
}

/* Jemné a vždy stejné přiblížení při najetí. */
@media (hover: hover) and (pointer: fine) {
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image {
		transform: scale(1.035);
	}
}

/* Šipky zůstanou bílé i při hoveru – Techone je nesmí přebarvit. */
.single-product .acipc-epg__arrow,
.single-product .acipc-epg__arrow:hover,
.single-product .acipc-epg__arrow:focus,
.single-product .acipc-epg__arrow:focus-visible,
.single-product .acipc-epg__arrow:active,
.single-product .acipc-epg__lightbox-arrow,
.single-product .acipc-epg__lightbox-arrow:hover,
.single-product .acipc-epg__lightbox-arrow:focus,
.single-product .acipc-epg__lightbox-arrow:focus-visible,
.single-product .acipc-epg__lightbox-arrow:active {
	background: rgba(255,255,255,.94) !important;
	background-color: rgba(255,255,255,.94) !important;
	background-image: none !important;
	color: #111 !important;
}

/* Miniatury také bez barevného theme hoveru. */
.single-product .acipc-epg__thumb,
.single-product .acipc-epg__thumb:hover,
.single-product .acipc-epg__thumb:focus,
.single-product .acipc-epg__thumb:focus-visible,
.single-product .acipc-epg__thumb:active {
	background: #fff !important;
	background-color: #fff !important;
	background-image: none !important;
}

/* Na dotykových zařízeních bez hover zoomu. */
@media (hover: none), (pointer: coarse) {
	.single-product .acipc-epg__main-image,
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image {
		transform: none !important;
	}
}


/* ==========================================================
 * 1.3.2 – jednotná výchozí velikost hlavního obrázku
 * ========================================================== */

/*
 * Pevný vizuální viewport: zdrojové fotografie mohou mít různé rozměry,
 * ale galerie má na každém produktu stejnou výšku.
 */
.single-product .acipc-epg__stage {
	aspect-ratio: auto !important;
	height: 460px !important;
	min-height: 460px !important;
	max-height: 460px !important;
	padding: 34px !important;
	background: #fff !important;
}

/*
 * Každý produkt dostane stejný maximální zobrazovací box.
 * Těsně oříznuté zdrojové fotografie už nemohou zabrat celou galerii.
 */
.single-product .acipc-epg__main-button {
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	background: #fff !important;
	overflow: hidden !important;
}

.single-product .acipc-epg__main-image {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: 0 auto !important;
	object-fit: contain !important;
	object-position: center center !important;
	background: #fff !important;
	transform: scale(1) !important;
	transition:
		transform 280ms cubic-bezier(.2,.65,.3,1),
		opacity 180ms ease !important;
}

/*
 * Jemný, identický hover u všech produktů.
 * Zoom probíhá uvnitř stejného viewportu, takže žádný produkt "nevyskočí".
 */
@media (hover: hover) and (pointer: fine) {
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image {
		transform: scale(1.025) !important;
	}
}

/* Středně široké displeje. */
@media (max-width: 1199px) {
	.single-product .acipc-epg__stage {
		height: 420px !important;
		min-height: 420px !important;
		max-height: 420px !important;
		padding: 30px !important;
	}
}

/* Tablet. */
@media (max-width: 991px) {
	.single-product .acipc-epg__stage {
		height: 390px !important;
		min-height: 390px !important;
		max-height: 390px !important;
		padding: 26px !important;
	}
}

/* Mobil. */
@media (max-width: 767px) {
	.single-product .acipc-epg__stage {
		height: 340px !important;
		min-height: 340px !important;
		max-height: 340px !important;
		padding: 22px !important;
	}

	.single-product .acipc-epg__main-image,
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image {
		transform: none !important;
	}
}

@media (max-width: 479px) {
	.single-product .acipc-epg__stage {
		height: 300px !important;
		min-height: 300px !important;
		max-height: 300px !important;
		padding: 18px !important;
	}
}


/* ==========================================================
 * 1.4.0 – autoplay + jemný crossfade
 * ========================================================== */

.single-product .acipc-epg__main-image {
	opacity: 1;
	transition:
		transform 280ms cubic-bezier(.2,.65,.3,1),
		opacity 180ms ease !important;
}

.single-product .acipc-epg__main-image.is-changing {
	opacity: 0.08;
}

@media (prefers-reduced-motion: reduce) {
	.single-product .acipc-epg__main-image,
	.single-product .acipc-epg__main-image.is-changing {
		transition: none !important;
		opacity: 1 !important;
	}
}


/* ==========================================================
 * 1.4.1 – jemnější crossfade + micro zoom při změně obrázku
 * ========================================================== */

.single-product .acipc-epg__main-image {
	opacity: 1;
	transform: scale(1);
	transition:
		opacity 300ms ease,
		transform 350ms cubic-bezier(.2,.65,.3,1) !important;
}

.single-product .acipc-epg__main-image.is-changing {
	opacity: 0;
	transform: scale(.985) !important;
}

/* Po doběhnutí transition se obraz vrátí plynule na 1.0. */
@media (hover: hover) and (pointer: fine) {
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image:not(.is-changing) {
		transform: scale(1.025) !important;
	}
}

/* Reduced motion: žádný fade ani zoom. */
@media (prefers-reduced-motion: reduce) {
	.single-product .acipc-epg__main-image,
	.single-product .acipc-epg__main-image.is-changing,
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image {
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}


/* ==========================================================
 * 1.4.2 – lightbox close button
 * ========================================================== */

/* Techone3 nesmí přebarvit zavírací křížek. */
.single-product .acipc-epg__lightbox-close,
.single-product .acipc-epg__lightbox-close:hover,
.single-product .acipc-epg__lightbox-close:focus,
.single-product .acipc-epg__lightbox-close:focus-visible,
.single-product .acipc-epg__lightbox-close:active {
	background: #fff !important;
	background-color: #fff !important;
	background-image: none !important;
	color: #000 !important;
	border: 0 !important;
	text-shadow: none !important;
	box-shadow: 0 2px 12px rgba(0,0,0,.18) !important;
}

/* Samotný znak × musí zůstat černý i při hover/focus stavech. */
.single-product .acipc-epg__lightbox-close {
	font-family: Arial, Helvetica, sans-serif !important;
	font-weight: 400 !important;
	line-height: 1 !important;
}


/* ==========================================================
 * 1.5.0 – premium lightbox / "wow" UX
 * ========================================================== */

.acipc-epg__lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 220ms ease, visibility 220ms ease;
}

.acipc-epg__lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.acipc-epg__lightbox-backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 50% 35%, rgba(255,255,255,.08), transparent 42%),
		rgba(10, 10, 12, .88);
	-webkit-backdrop-filter: blur(14px) saturate(115%);
	backdrop-filter: blur(14px) saturate(115%);
}

.acipc-epg__lightbox-shell {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto auto;
	gap: 12px;
	width: min(1320px, 96vw);
	height: min(920px, 94vh);
	padding: 18px;
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 26px;
	background: rgba(22, 22, 25, .74);
	box-shadow:
		0 34px 90px rgba(0,0,0,.48),
		inset 0 1px 0 rgba(255,255,255,.08);
	transform: translateY(14px) scale(.985);
	opacity: 0;
	transition:
		transform 360ms cubic-bezier(.2,.75,.25,1),
		opacity 260ms ease;
	overflow: hidden;
}

.acipc-epg__lightbox.is-open .acipc-epg__lightbox-shell {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.acipc-epg__lightbox-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 46px;
	padding: 0 2px 0 6px;
}

.acipc-epg__lightbox-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 72px;
	padding: 9px 13px;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 999px;
	background: rgba(255,255,255,.09);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.acipc-epg__lightbox-badge-separator {
	opacity: .45;
}

.single-product .acipc-epg__lightbox-close,
.single-product .acipc-epg__lightbox-close:hover,
.single-product .acipc-epg__lightbox-close:focus,
.single-product .acipc-epg__lightbox-close:focus-visible,
.single-product .acipc-epg__lightbox-close:active {
	position: static !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 46px !important;
	height: 46px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255,255,255,.15) !important;
	border-radius: 999px !important;
	background: rgba(255,255,255,.94) !important;
	color: #000 !important;
	box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
	transform: none !important;
	transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease !important;
}

.single-product .acipc-epg__lightbox-close:hover {
	transform: rotate(5deg) scale(1.06) !important;
	background: #fff !important;
	box-shadow: 0 10px 30px rgba(0,0,0,.3) !important;
}

.single-product .acipc-epg__lightbox-close span {
	display: block;
	transform: translateY(-1px);
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
	color: #000 !important;
}

.acipc-epg__lightbox-media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 18px 76px;
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 20px;
	background:
		linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
		rgba(255,255,255,.02);
	overflow: hidden;
}

.acipc-epg__lightbox-image {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain !important;
	object-position: center center;
	opacity: 1;
	transform: scale(1);
	filter: drop-shadow(0 18px 34px rgba(0,0,0,.22));
	transition:
		opacity 360ms ease,
		transform 420ms cubic-bezier(.2,.75,.25,1),
		filter 420ms ease !important;
}

.acipc-epg__lightbox-image.is-changing {
	opacity: 0;
	transform: scale(.975);
	filter: drop-shadow(0 8px 18px rgba(0,0,0,.12));
}

.single-product .acipc-epg__lightbox-arrow,
.single-product .acipc-epg__lightbox-arrow:hover,
.single-product .acipc-epg__lightbox-arrow:focus,
.single-product .acipc-epg__lightbox-arrow:focus-visible,
.single-product .acipc-epg__lightbox-arrow:active {
	position: absolute !important;
	top: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 52px !important;
	height: 52px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255,255,255,.14) !important;
	border-radius: 999px !important;
	background: rgba(255,255,255,.92) !important;
	color: #111 !important;
	box-shadow: 0 10px 30px rgba(0,0,0,.22) !important;
	transform: translateY(-50%) !important;
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		background 180ms ease !important;
}

.single-product .acipc-epg__lightbox-arrow:hover {
	transform: translateY(-50%) scale(1.08) !important;
	background: #fff !important;
	box-shadow: 0 14px 36px rgba(0,0,0,.32) !important;
}

.single-product .acipc-epg__lightbox-arrow span {
	display: block;
	margin-top: -3px;
	font-size: 40px;
	font-weight: 300;
	line-height: 1;
	color: #111 !important;
}

.acipc-epg__lightbox-arrow--prev {
	left: 18px !important;
}

.acipc-epg__lightbox-arrow--next {
	right: 18px !important;
}

.acipc-epg__lightbox-progress {
	position: relative;
	width: 100%;
	height: 3px;
	border-radius: 999px;
	background: rgba(255,255,255,.11);
	overflow: hidden;
}

.acipc-epg__lightbox-progress > span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: rgba(255,255,255,.9);
	box-shadow: 0 0 12px rgba(255,255,255,.32);
}

@keyframes acipc-epg-progress {
	from { width: 0; }
	to { width: 100%; }
}

.acipc-epg__lightbox-thumbs {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 72px;
	padding: 2px 2px 0;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.acipc-epg__lightbox-thumbs::-webkit-scrollbar {
	display: none;
}

.single-product .acipc-epg__lightbox-thumb,
.single-product .acipc-epg__lightbox-thumb:hover,
.single-product .acipc-epg__lightbox-thumb:focus,
.single-product .acipc-epg__lightbox-thumb:focus-visible,
.single-product .acipc-epg__lightbox-thumb:active {
	flex: 0 0 66px;
	width: 66px;
	height: 66px;
	margin: 0 !important;
	padding: 4px !important;
	border: 1px solid rgba(255,255,255,.13) !important;
	border-radius: 12px !important;
	background: rgba(255,255,255,.07) !important;
	box-shadow: none !important;
	opacity: .58;
	transform: scale(.96);
	transition:
		opacity 180ms ease,
		transform 180ms ease,
		border-color 180ms ease,
		background 180ms ease !important;
	scroll-snap-align: center;
	overflow: hidden;
}

.single-product .acipc-epg__lightbox-thumb:hover {
	opacity: .9;
	transform: scale(1);
}

.single-product .acipc-epg__lightbox-thumb.is-active {
	opacity: 1;
	transform: scale(1);
	border-color: rgba(255,255,255,.72) !important;
	background: rgba(255,255,255,.15) !important;
}

.acipc-epg__lightbox-thumb img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: contain !important;
	border-radius: 8px;
	background: #fff;
}

/* Mobilní UX: více prostoru pro samotný produkt, menší ovládací prvky. */
@media (max-width: 767px) {
	.acipc-epg__lightbox {
		padding: 8px;
	}

	.acipc-epg__lightbox-shell {
		width: 100%;
		height: 96vh;
		padding: 12px;
		gap: 9px;
		border-radius: 20px;
	}

	.acipc-epg__lightbox-media {
		padding: 12px 48px;
		border-radius: 16px;
	}

	.single-product .acipc-epg__lightbox-arrow,
	.single-product .acipc-epg__lightbox-arrow:hover,
	.single-product .acipc-epg__lightbox-arrow:focus,
	.single-product .acipc-epg__lightbox-arrow:active {
		width: 42px !important;
		height: 42px !important;
	}

	.acipc-epg__lightbox-arrow--prev {
		left: 7px !important;
	}

	.acipc-epg__lightbox-arrow--next {
		right: 7px !important;
	}

	.single-product .acipc-epg__lightbox-thumb,
	.single-product .acipc-epg__lightbox-thumb:hover,
	.single-product .acipc-epg__lightbox-thumb:focus,
	.single-product .acipc-epg__lightbox-thumb:active {
		flex-basis: 58px;
		width: 58px;
		height: 58px;
	}

	.acipc-epg__lightbox-thumbs {
		min-height: 64px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.acipc-epg__lightbox,
	.acipc-epg__lightbox-shell,
	.acipc-epg__lightbox-image,
	.single-product .acipc-epg__lightbox-close,
	.single-product .acipc-epg__lightbox-arrow,
	.single-product .acipc-epg__lightbox-thumb {
		transition: none !important;
		animation: none !important;
	}
}


/* ==========================================================
 * 1.5.1 – stabilní layout + smart visual normalization
 * ========================================================== */

/*
 * Používáme standardní WooCommerce gallery class a zároveň přidáváme
 * fallback rozměry. Tím Techone3 nemůže u některého produktu roztáhnout
 * galerii na 70–80 % řádku a u jiného ji ponechat menší.
 */
@media (min-width: 992px) {
	.single-product div.product .acipc-epg.woocommerce-product-gallery {
		box-sizing: border-box !important;
		float: left !important;
		flex: 0 0 48% !important;
		width: 48% !important;
		max-width: 48% !important;
		min-width: 0 !important;
	}

	.single-product div.product .summary.entry-summary {
		box-sizing: border-box !important;
		float: right !important;
		max-width: 48% !important;
	}
}

@media (max-width: 991px) {
	.single-product div.product .acipc-epg.woocommerce-product-gallery {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/*
 * JS vypočte --acipc-media-scale podle skutečného produktu uvnitř obrázku,
 * ne jen podle rozměru plátna. Výsledkem je mnohem konzistentnější velikost
 * mezi slide obrázky s rozdílnými bílými okraji.
 */
.single-product .acipc-epg__main-image {
	--acipc-media-scale: 1;
	transform: scale(var(--acipc-media-scale)) !important;
	transform-origin: center center !important;
}

.single-product .acipc-epg__main-image.is-changing {
	opacity: 0 !important;
	transform: scale(calc(var(--acipc-media-scale) * .985)) !important;
}

@media (hover: hover) and (pointer: fine) {
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image:not(.is-changing) {
		transform: scale(calc(var(--acipc-media-scale) * 1.018)) !important;
	}
}

/*
 * Stage má stabilní rozměr a nikdy nereaguje na intrinsic size nového src.
 * To odstraňuje vertikální i horizontální "poskočení" při autoplay.
 */
.single-product .acipc-epg__stage,
.single-product .acipc-epg__main-button {
	contain: layout paint;
}

.single-product .acipc-epg__stage {
	overflow: hidden !important;
}

/* Thumbnails nemění výšku řádku při změně aktivního stavu. */
.single-product .acipc-epg__thumbs {
	min-height: 82px;
	align-items: center;
}

@media (max-width: 767px) {
	.single-product .acipc-epg__main-image,
	.single-product .acipc-epg__main-image.is-changing,
	.single-product .acipc-epg__main-button:hover .acipc-epg__main-image {
		transform: scale(var(--acipc-media-scale)) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.single-product .acipc-epg__main-image,
	.single-product .acipc-epg__main-image.is-changing {
		transform: scale(var(--acipc-media-scale)) !important;
	}
}


/* ==========================================================
 * 1.5.1.1 – lightbox cleanup
 * Vychází přímo z verze 1.5.1.
 * ========================================================== */

/*
 * Techone3 / addon styly přidávaly k navigačním tlačítkům vlastní
 * pseudo-prvky / overflow, které vizuálně vypadaly jako malé scrollbary.
 * Kompletně je neutralizujeme jen uvnitř našeho lightboxu.
 */
.single-product .acipc-epg__lightbox-arrow,
.single-product .acipc-epg__lightbox-arrow:hover,
.single-product .acipc-epg__lightbox-arrow:focus,
.single-product .acipc-epg__lightbox-arrow:focus-visible,
.single-product .acipc-epg__lightbox-arrow:active {
	-webkit-appearance: none !important;
	appearance: none !important;
	overflow: hidden !important;
	overflow-x: hidden !important;
	overflow-y: hidden !important;
	padding: 0 !important;
	text-indent: 0 !important;
	white-space: nowrap !important;
}

/* Odstranění theme pseudo-elementů vedle šipek. */
.single-product .acipc-epg__lightbox-arrow::before,
.single-product .acipc-epg__lightbox-arrow::after,
.single-product .acipc-epg__lightbox-arrow:hover::before,
.single-product .acipc-epg__lightbox-arrow:hover::after,
.single-product .acipc-epg__lightbox-arrow:focus::before,
.single-product .acipc-epg__lightbox-arrow:focus::after,
.single-product .acipc-epg__lightbox-arrow:active::before,
.single-product .acipc-epg__lightbox-arrow:active::after {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

/* Samotný znak šipky je přesně vystředěný a nic dalšího se nevykresluje. */
.single-product .acipc-epg__lightbox-arrow > span {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	transform: none !important;
}

/*
 * Odstranění animované linky / progress baru pod hlavním obrázkem.
 * Autoplay i přepínání obrázků zůstává beze změny.
 */
.single-product .acipc-epg__lightbox-progress {
	display: none !important;
}

/* Po skrytí progress baru nechceme zbytečnou mezeru mezi obrazem a miniaturami. */
.single-product .acipc-epg__lightbox-shell {
	grid-template-rows: auto minmax(0, 1fr) auto !important;
}

/* Pro jistotu neutralizujeme i případné theme pseudo-prvky na close buttonu. */
.single-product .acipc-epg__lightbox-close::before,
.single-product .acipc-epg__lightbox-close::after {
	content: none !important;
	display: none !important;
}
