.acf-product-gallery-container {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	width: 100%;
	margin: 0 auto;
	position: relative;
	flex-direction: column-reverse;
}

.acf-pg-main-image {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 12px;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: top;
	justify-content: center;
}

.acf-pg-main-img-wrapper {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border: solid 1.5px #ccc;
	border-radius: 10px;
}

.acf-pg-main-img {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: none;
	border-radius: 10px;
	background: #fff;
	aspect-ratio: 1;
}

.acf-pg-main-img img {
	aspect-ratio: 1;
	object-position: center;
	border-radius: 10px !important;
}

.acf-pg-main-img.active {
	display: block;
	z-index: 1;
}

.acf-pg-main-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	background: rgba(255, 255, 255, 0.97);
	border: none;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.09);
	padding: 0;
	width: 35px;
	height: 35px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0.93;
	transition: opacity 0.18s;
}

.acf-pg-arrow-left {
	left: 8px;
}

.acf-pg-arrow-right {
	right: 8px;
}

.acf-pg-main-arrow:disabled {
	opacity: 0.25;
	pointer-events: none;
}

.acf-pg-main-arrow svg {
	display: block;
}

.acf-pg-zoom-btn {
	position: absolute;
	right: 18px;
	bottom: 18px;
	background: rgba(255, 255, 255, 0.75);
	border: none;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.88;
	transition: opacity 0.2s, box-shadow 0.2s, background 0.2s;
	z-index: 3;
	backdrop-filter:blur(10px);
}

.acf-pg-zoom-btn:hover {
	opacity: 1;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
	background: rgba(255, 255, 255, 1);
}

/* Thumbnails: vertical (desktop), horizontal (mobile) */
.acf-pg-thumbnails-scroll {
	width: 100%;
	height: 100px;
	overflow-x: auto;
	overflow-y: hidden;
	display: flex;
	flex-direction: row;
	gap: 7px;
	scrollbar-width: thin;
	scrollbar-color: #d2dbe7 #fff;
	padding-right: 4px;
}

.acf-pg-thumb {
	width: 95px;
	height: 95px;
	border: 2px solid transparent;
	border-radius: 8px;
	background: #f7f7f7;
	cursor: pointer;
	transition: border-color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.acf-pg-thumb.active {
	border-color: #0052cc;
	background: #e9f0fb;
}

.acf-pg-thumb img {
	width: 90px;
	height: 90px;
	object-fit: cover;
	border-radius: 6px !important;
	display: block;
}

.acf-pg-thumbnails-scroll::-webkit-scrollbar {
	width: 7px;
}

.acf-pg-thumbnails-scroll::-webkit-scrollbar-thumb {
	background: #d2dbe7;
	border-radius: 5px;
}

.acf-pg-thumbnails-scroll::-webkit-scrollbar-track {
	background: #fff;
	border-radius: 5px;
}

/* Responsive: horizontal thumbs below main image, arrows stay overlay */
@media (max-width: 768px) {
	.acf-product-gallery-container {
		flex-direction: column-reverse;
		align-items: center;
		max-width: 100%;
	}

/* 	.acf-pg-main-image {
		width: 98vw;
		max-width: 400px;
		height: 98vw;
		max-height: 400px;
	}
 */
	.acf-pg-thumbnails-scroll {
/* 		width: 98vw;
		max-width: 400px;
		height: 100px;
		min-height: 80px; */
		flex-direction: row;
		overflow-x: auto;
		overflow-y: hidden;
		gap: 8px;
		padding-right: 0;
	}

	.acf-pg-thumb {
		width: 75px;
		height: 75px;
	}
}

@media (max-width: 440px) {

	.acf-pg-main-image,
	.acf-pg-main-img-wrapper {
		aspect-ratio: 1;
		width: 100%;
		height: 100%;
		/*         max-width: 98vw;
        max-height: 98vw; */
	}

	.acf-pg-main-image img {
		object-fit: cover;
	}

	.acf-pg-thumbnails-scroll {
		width: 100%;
		height: 80px;
	}

	.acf-pg-thumb,
	.acf-pg-thumb img {
		width: 75px;
		height: 75px;
	}
}