/* HashOne Product Gallery
-------------------------------------------------- */

.hpg-gallery {
	display: flex;
	gap: var(--hpg-space, 10px);
	align-items: flex-start;
	width: 100%;
	box-sizing: border-box;
}

/* ---- Position modifiers ---- */
.hpg-gallery--bottom { flex-direction: column; }
.hpg-gallery--top    { flex-direction: column; }
.hpg-gallery--top .hpg-thumbs { order: -1; }

.hpg-gallery--left,
.hpg-gallery--right { flex-direction: row; }
.hpg-gallery--left .hpg-thumbs { order: -1; }

/* ---- Main image ---- */
.hpg-main {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}
.hpg-gallery--left .hpg-main,
.hpg-gallery--right .hpg-main {
	max-width: var(--hpg-main-w, none);
}
.hpg-gallery--top .hpg-main,
.hpg-gallery--bottom .hpg-main {
	max-width: var(--hpg-main-w, 100%);
	margin-inline: auto;
}

.hpg-main .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}
.hpg-main .swiper-slide img,
.hpg-main .swiper-slide a {
	display: block;
	width: 100%;
	height: auto;
}
.hpg-main .swiper-slide a.hpg-glightbox {
	cursor: zoom-in;
}
.hpg-main .swiper-slide img {
	object-fit: contain;
}

/* ---- Thumbnails ---- */
.hpg-thumbs {
	box-sizing: border-box;
}
.hpg-gallery--left .hpg-thumbs,
.hpg-gallery--right .hpg-thumbs {
	width: var(--hpg-thumb-w, 90px);
	height: var(--hpg-thumbs-box, auto);
	flex: 0 0 auto;
}
.hpg-gallery--top .hpg-thumbs,
.hpg-gallery--bottom .hpg-thumbs {
	width: 100%;
}

.hpg-thumbs .swiper-slide {
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s ease, border-color 0.2s ease;
	border: 1px solid transparent;
	box-sizing: border-box;
	overflow: hidden;
}
.hpg-gallery--top .hpg-thumbs .swiper-slide,
.hpg-gallery--bottom .hpg-thumbs .swiper-slide {
	height: var(--hpg-thumb-h, 90px);
}
.hpg-thumbs .swiper-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hpg-thumbs .swiper-slide-thumb-active {
	opacity: 1;
	border-color: var(--hpg-active-border, #111);
}
.hpg-thumbs .swiper-slide:hover {
	opacity: 0.85;
}

/* ---- Arrows ---- */
.hpg-main .swiper-button-prev,
.hpg-main .swiper-button-next {
	color: #111;
	background: rgba(255, 255, 255, 0.85);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}
.hpg-main .swiper-button-prev:after,
.hpg-main .swiper-button-next:after {
	font-size: 16px;
	font-weight: 700;
}

/* ---- Responsive: collapse vertical to bottom on small screens ---- */
@media (max-width: 768px) {
	.hpg-gallery--left,
	.hpg-gallery--right {
		flex-direction: column;
	}
	.hpg-gallery--left .hpg-thumbs,
	.hpg-gallery--right .hpg-thumbs {
		order: 0;
		width: 100%;
		height: auto;
	}
}
