/* Product Gallery — thumbs + main + lightbox */

.bww-product-gallery {
	display: flex;
	flex-direction: column-reverse;
	gap: 1rem;
	width: 100%;
	margin-bottom: 2rem;
}

@media (min-width: 1024px) {
	.bww-product-gallery {
		flex-direction: row;
		margin-bottom: 0;
		align-items: flex-start;
	}
}

.bww-product-gallery__thumbs {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.bww-product-gallery__thumbs::-webkit-scrollbar {
	display: none;
}

@media (min-width: 1024px) {
	.bww-product-gallery__thumbs {
		flex-direction: column;
		width: 5.5rem;
		flex-shrink: 0;
		max-height: 42rem;
		overflow-x: hidden;
		overflow-y: auto;
	}
}

.bww-product-gallery__thumb {
	flex: 0 0 auto;
	width: 4.5rem;
	aspect-ratio: 4 / 5;
	padding: 0;
	border: 1px solid #e5e5e5;
	background: #f8f8f8;
	cursor: pointer;
	overflow: hidden;
	border-radius: 0;
	transition: border-color 0.25s ease, opacity 0.25s ease;
	opacity: 0.7;
}

@media (min-width: 1024px) {
	.bww-product-gallery__thumb {
		width: 100%;
	}
}

.bww-product-gallery__thumb.is-active,
.bww-product-gallery__thumb:hover,
.bww-product-gallery__thumb:focus-visible {
	opacity: 1;
	border-color: #000;
	outline: none;
}

.bww-product-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.bww-product-gallery__stage {
	position: relative;
	flex: 1;
	min-width: 0;
	aspect-ratio: 4 / 5;
	background: #f8f8f8;
	overflow: hidden;
	touch-action: pan-y;
}

@media (min-width: 1024px) {
	.bww-product-gallery__stage {
		aspect-ratio: auto;
		height: 42rem;
	}
}

.bww-product-gallery__main {
	margin: 0;
	width: 100%;
	height: 100%;
}

.bww-product-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: 0;
	cursor: zoom-in;
	user-select: none;
	-webkit-user-drag: none;
}

.bww-product-gallery__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 4 / 5;
	background: #f8f8f8;
	color: #c9a227;
}

.bww-product-gallery__placeholder .material-symbols-outlined {
	font-size: 4rem;
}

.bww-product-gallery__arrow,
.bww-product-gallery__zoom {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: #fff;
	border: 1px solid #e5e5e5;
	color: #1a1a1a;
	cursor: pointer;
	border-radius: 0;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.bww-product-gallery__arrow:hover,
.bww-product-gallery__zoom:hover {
	background: #000;
	color: #fff;
	border-color: #000;
}

.bww-product-gallery__arrow--prev {
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
}

.bww-product-gallery__arrow--next {
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
}

.bww-product-gallery__zoom {
	right: 0.75rem;
	bottom: 0.75rem;
}

/* Lightbox */
.bww-lightbox {
	position: fixed;
	inset: 0;
	z-index: 400;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.94);
	padding: 1.5rem;
	cursor: zoom-out;
}

.bww-lightbox[hidden] {
	display: none !important;
}

.bww-lightbox__image {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 0;
	cursor: zoom-in;
	transition: transform 0.25s ease;
	user-select: none;
}

.bww-lightbox__image.is-zoomed {
	transform: scale(1.75);
	cursor: grab;
}

.bww-lightbox__close {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	width: 2.5rem;
	height: 2.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #fff;
	cursor: pointer;
	border-radius: 0;
}

.bww-lightbox__close:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.bww-lightbox__hint {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.75rem;
	font-family: 'Poppins', sans-serif;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.bww-product-gallery__image,
	.bww-lightbox__image {
		transition: none;
	}
}
