.wp-block-qemetica-products-bbch-scale {
	position: relative;
}

.qemetica-bbch-scale {
	--qemetica-bbch-scale-radius: 8px;
	--qemetica-bbch-scale-shadow-size: 52px;
	--qemetica-bbch-scale-arrow-size: 44px;
	--qemetica-bbch-scale-surface: #ffffff;
	--qemetica-bbch-scale-border: rgba(13, 28, 65, 0.12);
	--qemetica-bbch-scale-shadow: 0 12px 34px rgba(10, 25, 58, 0.12);
	--qemetica-bbch-scale-desktop-width: min(100%, var(--qemetica-bbch-desktop-max-width, 1440px), var(--qemetica-bbch-scale-width, 1600px));
	--qemetica-bbch-scale-mobile-width: max(100%, min(var(--qemetica-bbch-mobile-max-width, 768px), var(--qemetica-bbch-scale-width, 1600px)));
	position: relative;
	container-type: inline-size;
}

.qemetica-bbch-scale--empty {
	padding: 20px;
	border: 1px dashed var(--qemetica-bbch-scale-border);
	border-radius: var(--qemetica-bbch-scale-radius);
	background: #f8fafc;
}

.qemetica-bbch-scale__viewport {
	position: relative;
}

.qemetica-bbch-scale__scroller {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.qemetica-bbch-scale__canvas {
	position: relative;
	width: var(--qemetica-bbch-scale-desktop-width);
	aspect-ratio: var(--qemetica-bbch-scale-width, 1600) / var(--qemetica-bbch-scale-height, 900);
	max-width: none;
	cursor: zoom-in;
}

.qemetica-bbch-scale__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-select: none;
}

.qemetica-bbch-scale__hotspots {
	position: absolute;
	inset: 0;
}

.qemetica-bbch-scale__hotspot {
	position: absolute;
	display: block;
	border-radius: 0;
	background: rgb(255 255 255 / 35%);
	outline: none;
	cursor: pointer;
	transition: all 300ms;
}

.qemetica-bbch-scale__hotspot:hover {
	opacity: 0;
}

.qemetica-bbch-scale__hotspot:focus-visible {
	box-shadow: inset 0 0 0 2px #0ea5e9, 0 0 0 3px rgba(14, 165, 233, 0.22);
}

.qemetica-bbch-scale__shadow {
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--qemetica-bbch-scale-shadow-size);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
	z-index: 4;
}

.qemetica-bbch-scale__shadow--start {
	left: 0;
	background: linear-gradient(90deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0));
}

.qemetica-bbch-scale__shadow--end {
	right: 0;
	background: linear-gradient(270deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0));
}

.qemetica-bbch-scale.is-scrollable:not(.is-at-start) .qemetica-bbch-scale__shadow--start,
.qemetica-bbch-scale.is-scrollable:not(.is-at-end) .qemetica-bbch-scale__shadow--end {
	opacity: 1;
}

.qemetica-bbch-scale__controls {
	display: flex;
	gap: var(--wp--style--block-gap, 1rem);
	margin-top: 16px;
}

.qemetica-bbch-scale__controls:has(.qemetica-carousel-controls__btn--prev:disabled):has(.qemetica-carousel-controls__btn--next:disabled) {
	display: none;
}

.qemetica-bbch-scale .qemetica-carousel-controls__btn {
	align-items: center;
	background-color: var(--qemetica-carousel-control-bg, unset);
	border: var(--qemetica-carousel-control-border, 1.25px solid rgba(28, 28, 28, 0.3));
	border-radius: var(--qemetica-carousel-control-radius, 50%);
	color: var(--qemetica-carousel-control-color, inherit);
	cursor: pointer;
	display: flex;
	gap: 0.5rem;
	height: var(--qemetica-carousel-control-size, 2.5rem);
	justify-content: center;
	padding: var(--qemetica-carousel-control-padding, 0.5rem);
	transition: all 0.125s ease-in-out;
	width: var(--qemetica-carousel-control-size, 2.5rem);
}

.qemetica-bbch-scale .qemetica-carousel-controls__btn:not(:disabled):hover {
	background-color: var(--qemetica-carousel-control-bg-hover, #f8f8f8);
	border: var(--qemetica-carousel-control-border-hover, 1.25px solid rgba(28, 28, 28, 0.75));
	color: var(--qemetica-carousel-control-color-hover, inherit);
}

.qemetica-bbch-scale .qemetica-carousel-controls__btn:disabled {
	cursor: not-allowed;
	opacity: 0.25;
}

.qemetica-bbch-scale__lightbox[hidden] {
	display: none;
}

body.qemetica-bbch-scale-lightbox-open {
	overflow: hidden;
}

.qemetica-bbch-scale-pswp {
	--pswp-bg: rgba(0, 0, 0, 0.6);
	--pswp-root-z-index: 99999;
	backdrop-filter: blur(4px);
}

.qemetica-bbch-scale-pswp .pswp__bg {
	backdrop-filter: inherit;
}

.qemetica-bbch-scale-pswp .pswp__button--close:focus-visible {
	outline: 2px solid #dc2626;
	outline-offset: 2px;
}

.qemetica-bbch-scale-pswp .pswp__img {
	user-select: none;
	-webkit-user-select: none;
}

.qemetica-bbch-scale__pswp-slide {
	position: relative;
}

.qemetica-bbch-scale__pswp-hotspots {
	position: absolute;
	inset: 0;
	z-index: 99;
}

.qemetica-bbch-scale__pswp-hotspots .qemetica-bbch-scale__hotspot {
	pointer-events: auto;
}

.qemetica-bbch-scale__lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.qemetica-bbch-scale__lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.74);
	backdrop-filter: blur(6px);
}

.qemetica-bbch-scale__lightbox-dialog {
	position: absolute;
	inset: 5vh 3vw;
	display: flex;
	flex-direction: column;
	padding: 16px;
	border-radius: var(--qemetica-bbch-scale-radius);
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 30px 80px rgba(2, 6, 23, 0.3);
}

.qemetica-bbch-scale__lightbox-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #dc2626;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.qemetica-bbch-scale__lightbox-close:hover {
	color: #b91c1c;
}

.qemetica-bbch-scale__lightbox-close:focus-visible {
	outline: 2px solid #dc2626;
	outline-offset: 2px;
}

.qemetica-bbch-scale__lightbox-scroller {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: auto;
	border-radius: var(--qemetica-bbch-scale-radius);
	background: #f8fafc;
}

.qemetica-bbch-scale__lightbox-canvas {
	position: relative;
	flex: 0 0 auto;
	width: calc((var(--qemetica-bbch-scale-width, 1600) / var(--qemetica-bbch-scale-height, 900)) * var(--qemetica-bbch-lightbox-base-height, 100dvh) * var(--qemetica-bbch-lightbox-zoom, 1));
	height: calc(var(--qemetica-bbch-lightbox-base-height, 100dvh) * var(--qemetica-bbch-lightbox-zoom, 1));
	aspect-ratio: var(--qemetica-bbch-scale-width, 1600) / var(--qemetica-bbch-scale-height, 900);
	margin: 0 auto;
	cursor: default;
	transition: height 0.24s ease;
	touch-action: manipulation;
}

.qemetica-bbch-scale__lightbox-canvas.is-zoomed {
	margin: 0;
	cursor: grab;
}

.qemetica-bbch-scale__lightbox-scroller.is-zoomed {
	display: block;
	touch-action: none;
}

.qemetica-bbch-scale__lightbox-canvas.is-pinching {
	transition: none;
}

.qemetica-bbch-scale__lightbox-scroller.is-grabbing,
.qemetica-bbch-scale__lightbox-scroller.is-grabbing .qemetica-bbch-scale__lightbox-canvas {
	cursor: grabbing;
}

@media (max-width: 768px) {
	.qemetica-bbch-scale__controls {
		display: none;
	}

	.qemetica-bbch-scale__lightbox-dialog {
		inset: 0;
		padding: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.qemetica-bbch-scale__lightbox-scroller {
		display: block;
		border-radius: 0;
		background: transparent;
	}

	.qemetica-bbch-scale__lightbox-canvas {
		height: calc(100dvh * var(--qemetica-bbch-lightbox-zoom, 1));
		width: calc((var(--qemetica-bbch-scale-width, 1600) / var(--qemetica-bbch-scale-height, 900)) * 100dvh * var(--qemetica-bbch-lightbox-zoom, 1));
		margin: 0;
	}
}

@container (max-width: 768px) {
	.qemetica-bbch-scale__canvas {
		width: var(--qemetica-bbch-scale-mobile-width);
	}
}
