/* ==========================================================================
   Flatsome Lightbox Zoom
   ========================================================================== */

/* Зображення в лайтбоксі ------------------------------------------------- */

img.flz-zoomable {
	transform-origin: 50% 50%;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
	cursor: zoom-in !important;
}

img.flz-zoomable.flz-zoomed {
	cursor: grab !important;
}

/* will-change лише під час жесту: постійний шар робить збільшене фото розмитим */
img.flz-zoomable.flz-dragging {
	cursor: grabbing !important;
	will-change: transform;
	transition: none !important;
}

img.flz-zoomable.flz-animate {
	transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) !important;
}

.flz-loupe-mode img.flz-zoomable {
	cursor: crosshair !important;
}

/* Коли фото збільшене: без прокрутки, без тіні-підкладки і без підпису під ним */
.mfp-wrap.flz-is-zoomed {
	overflow: hidden !important;
}

.flz-is-zoomed .mfp-figure::after {
	opacity: 0;
}

.mfp-bottom-bar {
	transition: opacity 0.2s ease;
}

.flz-is-zoomed .mfp-bottom-bar {
	opacity: 0;
	pointer-events: none;
}

/* Панель кнопок -------------------------------------------------------- */

.flz-toolbar {
	position: fixed;
	top: max(12px, env(safe-area-inset-top));
	left: 50%;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 4px;
	transform: translateX(-50%);
	background: rgba(24, 24, 24, 0.78);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	color: #fff;
	font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-user-select: none;
	user-select: none;
	touch-action: manipulation;
}

.flz-toolbar[hidden] {
	display: none !important;
}

/* Скидання стилів кнопок Flatsome */
.flz-toolbar .flz-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: inherit;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.flz-toolbar .flz-btn:hover {
	background: rgba(255, 255, 255, 0.16);
}

.flz-toolbar .flz-btn:focus {
	outline: none;
}

.flz-toolbar .flz-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -3px;
}

.flz-toolbar .flz-btn[aria-disabled="true"] {
	opacity: 0.35;
	cursor: default;
	background: transparent;
}

.flz-toolbar .flz-btn[aria-pressed="true"] {
	background: #fff;
	color: #1a1a1a;
}

.flz-toolbar .flz-btn svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.flz-toolbar .flz-btn-reset {
	margin-left: 4px;
}

.flz-toolbar .flz-percent {
	min-width: 48px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	opacity: 0.9;
}

@media (max-width: 480px) {
	.flz-toolbar .flz-btn {
		width: 36px;
		height: 36px;
	}

	.flz-toolbar .flz-percent {
		min-width: 42px;
		font-size: 12px;
	}
}

/* Лупа ------------------------------------------------------------------ */

.flz-lens {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483001;
	border-radius: 50%;
	background-color: #fff;
	background-repeat: no-repeat;
	/* кільце через box-shadow, щоб border не зсував фон усередині лупи */
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 8px 28px rgba(0, 0, 0, 0.45);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}

.flz-lens.flz-lens-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
	img.flz-zoomable.flz-animate,
	.flz-toolbar .flz-btn,
	.flz-lens,
	.mfp-bottom-bar {
		transition: none !important;
	}
}
