.moyas-pg {
	--moyas-pg-ratio: 1 / 1;
	--moyas-pg-gap: 10px;
	position: relative;
	width: 100%;
	min-width: 0;
}

.moyas-pg__viewport {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 92%;
	gap: var(--moyas-pg-gap);
	margin: 0;
	padding: 0 4% 4px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 4%;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	touch-action: pan-x pan-y;
}

.moyas-pg__viewport::-webkit-scrollbar {
	display: none;
}

.moyas-pg__viewport:focus-visible {
	outline: 2px solid #171717;
	outline-offset: 3px;
}

.moyas-pg__slide {
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	margin: 0;
	aspect-ratio: var(--moyas-pg-ratio);
	overflow: hidden;
	border: 1px solid #e7e7e7;
	background: #fff;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.moyas-pg__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

.moyas-pg__counter {
	position: absolute;
	top: 12px;
	right: 8%;
	z-index: 2;
	min-width: 48px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(23, 23, 23, .76);
	color: #fff;
	font: 600 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: center;
	pointer-events: none;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.moyas-pg__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 30px;
	padding: 8px 12px 0;
}

.moyas-pg__dot {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: content-box;
	display: block;
	width: 8px !important;
	height: 8px !important;
	min-width: 8px !important;
	min-height: 8px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: #c8c8c8 !important;
	box-shadow: none !important;
	cursor: pointer;
	line-height: 0;
	transition: background-color .18s ease, transform .18s ease;
}

.moyas-pg__dot:hover,
.moyas-pg__dot:focus,
.moyas-pg__dot[aria-current="true"] {
	background: #171717 !important;
}

.moyas-pg__dot[aria-current="true"] {
	transform: scale(1.35);
}

.moyas-pg__dot:focus-visible {
	outline: 2px solid #171717;
	outline-offset: 1px;
}

.moyas-pg__notice {
	padding: 12px;
	border: 1px dashed #999;
	font-size: 13px;
}

.moyas-pg__thumbs {
	display: none;
}

@media (min-width: 768px) {
	.moyas-pg--mobile-only {
		display: none !important;
	}

	.moyas-pg__viewport {
		grid-auto-columns: 88%;
		padding-inline: 6%;
		scroll-padding-inline: 6%;
	}

	.moyas-pg__counter {
		right: 9%;
	}
}

@media (min-width: 1024px) {
	.moyas-pg__viewport {
		grid-auto-columns: 100%;
		gap: 0;
		padding: 0;
		scroll-padding-inline: 0;
	}

	.moyas-pg__slide {
		scroll-snap-align: start;
	}

	.moyas-pg__counter {
		top: 14px;
		right: 14px;
	}

	.moyas-pg__dots {
		display: none;
	}

	.moyas-pg__thumbs {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 12px;
		padding-top: 14px;
	}

	.moyas-pg__thumb {
		-webkit-appearance: none !important;
		appearance: none !important;
		display: grid;
		place-items: center;
		box-sizing: border-box;
		width: 100% !important;
		min-width: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		aspect-ratio: 1 / 1;
		overflow: hidden;
		border: 1px solid #e7e7e7 !important;
		border-radius: 0 !important;
		background: #fff !important;
		box-shadow: none !important;
		cursor: pointer;
	}

	.moyas-pg__thumb:hover,
	.moyas-pg__thumb:focus-visible,
	.moyas-pg__thumb[aria-current="true"] {
		border-color: #171717 !important;
	}

	.moyas-pg__thumb-image {
		display: block;
		width: 100%;
		height: 100%;
		max-width: none;
		object-fit: contain;
	}
}

@media (prefers-reduced-motion: reduce) {
	.moyas-pg__viewport {
		scroll-behavior: auto;
	}
}
