.ppg-gallery {
	display: flex;
	gap: 12px;
	width: 100%;
	margin-bottom: 20px;
}

.ppg-gallery.ppg-position-bottom {
	flex-direction: column;
}

.ppg-gallery.ppg-position-left {
	flex-direction: row;
}

/* Thumbnails */
.ppg-thumbs {
	display: flex;
	gap: 10px;
	overflow: auto;
	scrollbar-width: thin;
}

.ppg-position-left .ppg-thumbs {
	flex-direction: column;
	width: 76px;
	max-height: 520px;
	order: 1;
}

.ppg-position-bottom .ppg-thumbs {
	flex-direction: row;
	order: 2;
	margin-top: 10px;
}

.ppg-thumb {
	flex: 0 0 auto;
	width: 68px;
	height: 68px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	background: #f6f6f6;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.15s ease, opacity 0.15s ease;
	opacity: 0.75;
}

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

.ppg-thumb:hover {
	opacity: 1;
}

.ppg-thumb.is-active {
	border-color: #333;
	opacity: 1;
}

/* Main image */
.ppg-main {
	flex: 1;
	min-width: 0;
	order: 1;
}

.ppg-position-left .ppg-main {
	order: 2;
}

.ppg-main-frame {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ppg-ratio, 1/1);
	background: #f9f9f9;
	border-radius: 8px;
	overflow: hidden;
	cursor: zoom-in;
}

.ppg-main-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
	transform-origin: center center;
}

.ppg-main-frame.is-zoomed .ppg-main-image {
	transform: scale(1.9);
	cursor: zoom-out;
}

.ppg-zoom-hint {
	position: absolute;
	bottom: 10px;
	right: 10px;
	background: rgba(255,255,255,0.85);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	pointer-events: none;
}

/* Lightbox */
.ppg-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.9);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
}

.ppg-lightbox.is-open {
	display: flex;
}

.ppg-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
}

.ppg-lightbox-close,
.ppg-lightbox-prev,
.ppg-lightbox-next {
	position: absolute;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
	padding: 10px 16px;
}

.ppg-lightbox-close {
	top: 16px;
	right: 20px;
	font-size: 34px;
}

.ppg-lightbox-prev {
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
}

.ppg-lightbox-next {
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
}

/* Mobile */
@media (max-width: 600px) {
	.ppg-gallery.ppg-position-left {
		flex-direction: column;
	}
	.ppg-position-left .ppg-thumbs {
		flex-direction: row;
		width: 100%;
		max-height: none;
		order: 2;
		margin-top: 10px;
	}
	.ppg-position-left .ppg-main {
		order: 1;
	}
	.ppg-thumb {
		width: 56px;
		height: 56px;
	}
}
