.pa-gallery {
	position: relative;
	width: 100%;
	margin-block: 28px;
}

.pa-gallery__viewport {
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
}

.pa-gallery__track {
	display: flex;
	scroll-snap-type: x mandatory;
}

.pa-gallery__viewport::-webkit-scrollbar {
	display: none;
}

.pa-gallery__slide {
	position: relative;
	flex: 0 0 calc(100% / var(--pa-gallery-columns, var(--pa-gallery-columns-desktop, 1)));
	min-width: 0;
	margin: 0;
	padding: 6px;
	scroll-snap-align: start;
}

.pa-gallery--slider .pa-gallery__slide {
	padding: 0;
}

.pa-gallery__open {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	padding: 0;
	border: 0;
	background: #f3f3f0;
	cursor: zoom-in;
}

.pa-gallery--carousel .pa-gallery__open {
	aspect-ratio: 4 / 3;
}

.pa-gallery__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 350ms ease;
}

.pa-gallery__open:hover .pa-gallery__image {
	transform: scale(1.025);
}

.pa-gallery__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: grid;
	gap: 3px;
	padding: 36px 24px 20px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
	color: #fff;
	pointer-events: none;
}

.pa-gallery__caption strong {
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 2vw, 2rem);
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
}

.pa-gallery__caption span {
	font-size: 0.88rem;
}

.pa-gallery__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 16px;
}

.pa-gallery__arrow {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	padding: 0;
	border: 1px solid #d9d9d5;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 20px;
	cursor: pointer;
}

.pa-gallery__arrow:hover,
.pa-gallery__arrow:focus-visible {
	border-color: #ffc700;
	background: #ffc700;
}

.pa-gallery__dots {
	display: flex;
	gap: 7px;
}

.pa-gallery__dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c7c7c2;
	cursor: pointer;
}

.pa-gallery__dots button.is-active {
	width: 24px;
	border-radius: 8px;
	background: #d9003f;
}

.pa-gallery-lightbox {
	width: min(94vw, 1500px);
	max-width: none;
	height: min(92vh, 1000px);
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
}

.pa-gallery-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.9);
}

.pa-gallery-lightbox img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.pa-gallery-lightbox button {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 28px;
	cursor: pointer;
}

@media (max-width: 900px) {
	.pa-gallery--carousel {
		--pa-gallery-columns: 2;
	}
}

@media (max-width: 600px) {
	.pa-gallery--carousel {
		--pa-gallery-columns: 1;
	}

	.pa-gallery__open,
	.pa-gallery--carousel .pa-gallery__open {
		aspect-ratio: 4 / 3;
	}

	.pa-gallery__caption {
		padding: 30px 16px 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pa-gallery__image {
		transition: none;
	}
}
