/* ============================================================
   lakasg Product Gallery Widget
   ============================================================ */

.lakasg-gallery-wrap {
	box-sizing: border-box;
	font-family: inherit;
	width: 100%;
	user-select: none;
}

/* Alignment — driven by prefix_class on the Elementor widget wrapper */
.lakasg-gallery-align-center .lakasg-gallery-wrap { margin-left: auto; margin-right: auto; }
.lakasg-gallery-align-right  .lakasg-gallery-wrap { margin-left: auto; margin-right: 0; }
.lakasg-gallery-align-left   .lakasg-gallery-wrap { margin-left: 0; margin-right: auto; }

/* ── Main Slider ───────────────────────────────────────────── */
.lakasg-gallery-main { position: relative; width: 100%; }

.lakasg-gallery-main-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 8px;
}

/* ── Fixed height mode ─────────────────────────────────────── */
.lakasg-gallery-mode-fixed {
	display: flex;
	align-items: center;
	justify-content: center;
}

.lakasg-gallery-mode-fixed .lakasg-gallery-track {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.lakasg-gallery-mode-fixed .lakasg-gallery-slide {
	flex: 0 0 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.lakasg-gallery-mode-fixed .lakasg-gallery-zoom-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* ── Fit to image mode ─────────────────────────────────────── */
.lakasg-gallery-mode-fit {
	/* height is determined by the image — no fixed height set */
}

.lakasg-gallery-mode-fit .lakasg-gallery-track {
	display: flex;
	width: 100%;
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.lakasg-gallery-mode-fit .lakasg-gallery-slide {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lakasg-gallery-mode-fit .lakasg-gallery-zoom-wrap {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Shared image styles ───────────────────────────────────── */
.lakasg-gallery-img {
	display: block;
	transform-origin: center center;
	transition: transform 0.25s ease;
	pointer-events: none;
}

/* Zoom wrap base */
.lakasg-gallery-zoom-wrap {
	overflow: hidden;
}

/* While zooming, disable the CSS transition for instant tracking */
.lakasg-gallery-zoom-wrap.is-zooming .lakasg-gallery-img {
	transition: none;
}

/* When lightbox is enabled, show pointer cursor */
.lakasg-gallery-wrap[data-lb-images] .lakasg-gallery-zoom-wrap {
	cursor: zoom-in;
}

/* ── Arrows ────────────────────────────────────────────────── */
.lakasg-gallery-arr {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	border: none;
	background: rgba(255,255,255,0.88);
	color: #111;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	transition: background 0.18s, color 0.18s, opacity 0.18s;
	padding: 0;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lakasg-gallery-arr svg {
	width: 55%;
	height: 55%;
	display: block;
}

.lakasg-gallery-arr:hover { background: #111; color: #fff; }
.lakasg-gallery-arr:disabled { opacity: 0.3; pointer-events: none; }

.lakasg-gallery-prev { left: 12px; }
.lakasg-gallery-next { right: 12px; }

/* ── Dots ──────────────────────────────────────────────────── */
.lakasg-gallery-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	z-index: 5;
}

.lakasg-gallery-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: rgba(0,0,0,0.3);
	cursor: pointer;
	padding: 0;
	transition: background 0.18s, transform 0.18s;
}

.lakasg-gallery-dot.is-active {
	background: #111;
	transform: scale(1.3);
}

/* ── Thumbnail Strip ───────────────────────────────────────── */
.lakasg-gallery-thumbs {
	margin-top: 12px;
	overflow: hidden;
}

.lakasg-gallery-thumbs-track {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	padding-bottom: 2px; /* space for active border */
}

.lakasg-gallery-thumbs-track::-webkit-scrollbar { display: none; }

.lakasg-gallery-thumb {
	flex: 0 0 auto;
	height: 80px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 4px;
	cursor: pointer;
	padding: 0;
	border: 2px solid transparent;
	opacity: 0.55;
	transition: opacity 0.18s, border-color 0.18s;
	background: #f5f5f5;
}

.lakasg-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lakasg-gallery-thumb:hover { opacity: 0.85; }

.lakasg-gallery-thumb.is-active {
	opacity: 1;
	border-color: #111;
}

/* ── Lightbox ──────────────────────────────────────────────── */
#lakasg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

#lakasg-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

/* Lightbox top bar */
.lakasg-lb-bar {
	position: absolute;
	top: 0; left: 0; right: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	z-index: 2;
}

.lakasg-lb-counter {
	color: rgba(255,255,255,0.7);
	font-size: 0.875rem;
	font-family: inherit;
}

.lakasg-lb-close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.15s;
	padding: 0;
}

.lakasg-lb-close:hover { background: rgba(255,255,255,0.15); }

.lakasg-lb-close svg,
.lakasg-lb-arr svg { width: 22px; height: 22px; display: block; }

/* Lightbox image area */
.lakasg-lb-img-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 60px 80px;
	box-sizing: border-box;
}

.lakasg-lb-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	border-radius: 4px;
	transition: opacity 0.2s ease;
}

.lakasg-lb-img.is-fading { opacity: 0; }

/* Lightbox arrows */
.lakasg-lb-arr {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.12);
	border: none;
	color: #fff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	padding: 0;
	z-index: 2;
}

.lakasg-lb-arr:hover { background: rgba(255,255,255,0.25); }
.lakasg-lb-prev { left: 16px; }
.lakasg-lb-next { right: 16px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
	.lakasg-gallery-main-viewport { height: 280px; }
	.lakasg-gallery-thumb         { height: 56px; }
	.lakasg-lb-img-wrap           { padding: 50px 16px; }
	.lakasg-lb-arr                { width: 36px; height: 36px; }
	.lakasg-lb-prev               { left: 4px; }
	.lakasg-lb-next               { right: 4px; }
}
