/* ===================================================================
   ASTYLIO Product Gallery — vertical thumbnails + lightbox
   =================================================================== */

/* ── Gallery Container ─────────────────────────────────────────── */
.aksh-product-gallery {
	display: flex;
	gap: var(--astylio-space-3, 12px);
	align-items: flex-start;
}

/* ── Thumbnails (left side, vertical) ──────────────────────────── */
.aksh-gallery-thumbs {
	display: flex;
	flex-direction: column;
	gap: var(--astylio-space-2, 8px);
	max-height: 500px;
	overflow-y: auto;
	flex-shrink: 0;
	width: 80px;
	/* hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.aksh-gallery-thumbs::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

/* ── Thumbnail Button ──────────────────────────────────────────── */
.aksh-gallery-thumb {
	display: block;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: var(--radius-sm, 4px);
	cursor: pointer;
	background: none;
	opacity: 0.5;
	transition: opacity 0.2s ease;
	overflow: hidden;
}

.aksh-gallery-thumb:hover {
	background: transparent;
	opacity: 0.8;
}

.aksh-gallery-thumb:focus,
.aksh-gallery-thumb:focus-visible {
	outline: none;
	box-shadow: none;
	background: transparent;
}

.aksh-gallery-thumb.is-active {
	opacity: 1;
}

.aksh-gallery-thumb__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* ── Main Image Area ───────────────────────────────────────────── */
.aksh-gallery-main {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	border-radius: var(--radius-sm, 4px);
	background: var(--color-bg-surface, #FCFAF7);
}

.aksh-gallery-main__image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
}

.aksh-gallery-main__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 600px;
	object-fit: contain;
	transition: opacity 200ms var(--astylio-ease-standard, ease);
}

.aksh-gallery-main__image--placeholder .aksh-gallery-main__img {
	max-height: 400px;
	opacity: 0.3;
}

/* ── Fullscreen Trigger Button ─────────────────────────────────── */
.aksh-gallery-main__trigger {
	position: absolute;
	top: var(--astylio-space-3, 12px);
	right: var(--astylio-space-3, 12px);
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: var(--radius-sm, 4px);
	cursor: pointer;
	color: var(--color-text-primary);
	transition: background 0.2s ease, opacity 0.2s ease;
	opacity: 0.7;
}

.aksh-gallery-main:hover .aksh-gallery-main__trigger {
	opacity: 1;
}

.aksh-gallery-main__trigger:hover {
	background: var(--color-bg-surface, #FCFAF7);
	color: var(--color-text-primary);
}

/* ===================================================================
   Lightbox
   =================================================================== */
.aksh-lightbox {
	position: fixed;
	inset: 0;
	z-index: var(--astylio-z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
}

.aksh-lightbox[hidden] {
	display: none;
}

.aksh-lightbox__overlay {
	position: absolute;
	inset: 0;
}

.aksh-lightbox__content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: 90vw;
	max-height: 90vh;
	padding: 60px;
}

.aksh-lightbox__image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	max-width: 80vw;
	max-height: 85vh;
}

.aksh-lightbox__img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	border-radius: var(--radius-sm, 4px);
}

/* ── Lightbox Controls ─────────────────────────────────────────── */
.aksh-lightbox__close {
	position: absolute;
	top: var(--astylio-space-3, 12px);
	right: var(--astylio-space-3, 12px);
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	border-radius: var(--radius-sm, 4px);
	cursor: pointer;
	color: var(--color-text-inverse, #fff);
	transition: background 0.2s ease;
	z-index: 10;
}

.aksh-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.25);
}

.aksh-lightbox__prev,
.aksh-lightbox__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	border-radius: var(--radius-sm, 4px);
	cursor: pointer;
	color: var(--color-text-inverse, #fff);
	transition: background 0.2s ease;
	z-index: 10;
}

.aksh-lightbox__prev { left: var(--astylio-space-3, 12px); }
.aksh-lightbox__next { right: var(--astylio-space-3, 12px); }

.aksh-lightbox__prev:hover,
.aksh-lightbox__next:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* ===================================================================
   Responsive — Mobile
   =================================================================== */
@media (max-width: 768px) {
	.aksh-product-gallery {
		flex-direction: column;
		gap: var(--astylio-space-2, 8px);
	}

	.aksh-gallery-thumbs {
		flex-direction: row;
		max-height: none;
		max-width: none;
		width: auto;
		overflow-x: auto;
		overflow-y: hidden;
		gap: var(--astylio-space-1, 4px);
	}

	.aksh-gallery-thumb {
		width: 60px;
		height: 60px;
		flex-shrink: 0;
	}

	.aksh-gallery-main {
		min-height: 300px;
	}

	.aksh-gallery-main__img {
		max-height: 400px;
	}

	.aksh-lightbox__content {
		padding: 16px;
	}

	.aksh-lightbox__img {
		max-height: 70vh;
	}
}

/* ===================================================================
   Reduced Motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
	.aksh-gallery-main__img {
		transition: none;
	}
}
