.prime73-gallery {
	--prime73-gallery-gap: clamp(0.75rem, 1.8vw, 1.5rem);
	--prime73-gallery-surface: #171512;
	--prime73-gallery-text: #f7f2e8;
	color: inherit;
}

.prime73-gallery__grid {
	display: grid;
	gap: var(--prime73-gallery-gap);
	grid-auto-flow: dense;
	grid-template-columns: repeat(var(--prime73-gallery-columns, 3), minmax(0, 1fr));
}

.prime73-gallery__item {
	margin: 0;
	min-width: 0;
}

.prime73-gallery__link {
	background: var(--prime73-gallery-surface);
	display: block;
	overflow: hidden;
	position: relative;
}

.prime73-gallery__link img {
	aspect-ratio: 4 / 5;
	display: block;
	height: 100%;
	object-fit: cover;
	transition: filter 260ms ease, transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
	width: 100%;
}

.prime73-gallery__link:hover img,
.prime73-gallery__link:focus-visible img {
	filter: saturate(1.08) contrast(1.03);
	transform: scale(1.025);
}

.prime73-gallery__item > figcaption {
	font-size: 0.83rem;
	line-height: 1.45;
	margin-top: 0.65rem;
	opacity: 0.72;
}

.prime73-gallery__carousel-header {
	align-items: end;
	display: flex;
	gap: 1.5rem;
	justify-content: space-between;
	margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.prime73-gallery__carousel-title {
	font-size: clamp(0.72rem, 1vw, 0.82rem);
	font-weight: 600;
	letter-spacing: 0.14em;
	margin: 0;
	opacity: 0.66;
	text-transform: uppercase;
}

.prime73-gallery__carousel-controls {
	align-items: center;
	display: flex;
	gap: 0.65rem;
}

.prime73-gallery__carousel-controls output {
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	min-width: 6.5rem;
	opacity: 0.68;
	text-align: center;
}

.prime73-gallery__carousel-controls button {
	align-items: center;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 50%;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font-size: 1.1rem;
	height: 2.65rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease;
	width: 2.65rem;
}

.prime73-gallery__carousel-controls button:hover,
.prime73-gallery__carousel-controls button:focus-visible {
	background: #26231f;
	color: #fff;
}

.prime73-gallery__carousel-controls button:disabled {
	cursor: default;
	opacity: 0.25;
}

.prime73-gallery__viewport {
	overflow: hidden;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__grid {
	display: flex;
	gap: clamp(0.45rem, 0.8vw, 0.75rem);
	grid-auto-flow: unset;
	grid-template-columns: none;
	height: clamp(22rem, 34vw, 30rem);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__grid::-webkit-scrollbar {
	display: none;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__item {
	display: flex;
	flex: 0 0 clamp(11rem, 17vw, 16rem);
	min-width: 0;
	position: relative;
	scroll-snap-align: start;
}

.prime73-gallery[data-layout="carousel"].is-carousel-ready .prime73-gallery__item {
	flex: 1 1 0;
	transition: flex-grow 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.prime73-gallery[data-layout="carousel"].is-carousel-ready .prime73-gallery__item:hover,
.prime73-gallery[data-layout="carousel"].is-carousel-ready .prime73-gallery__item:focus-within {
	flex-grow: 2.15;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__link,
.prime73-gallery[data-layout="carousel"] .prime73-gallery__link img {
	height: 100%;
	width: 100%;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__link img {
	aspect-ratio: auto;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__item > figcaption {
	background: linear-gradient(transparent, rgba(14, 12, 10, 0.88));
	bottom: 0;
	color: #fff;
	font-size: 0.76rem;
	left: 0;
	margin: 0;
	opacity: 0;
	padding: 3.5rem 0.9rem 0.8rem;
	pointer-events: none;
	position: absolute;
	right: 0;
	transform: translateY(0.4rem);
	transition: opacity 220ms ease, transform 220ms ease;
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__item:hover > figcaption,
.prime73-gallery[data-layout="carousel"] .prime73-gallery__item:focus-within > figcaption {
	opacity: 1;
	transform: translateY(0);
}

.prime73-gallery[data-layout="carousel"] .prime73-gallery__item[hidden] {
	display: none;
}

@media (min-width: 760px) {
	.prime73-gallery[data-layout="editorial"] .prime73-gallery__item:nth-child(9n + 1) {
		grid-column: span 2;
		grid-row: span 2;
	}

	.prime73-gallery[data-layout="editorial"] .prime73-gallery__item:nth-child(9n + 1) .prime73-gallery__link,
	.prime73-gallery[data-layout="editorial"] .prime73-gallery__item:nth-child(9n + 1) img {
		height: 100%;
	}
}

.prime73-gallery-lightbox {
	background: transparent;
	border: 0;
	color: var(--prime73-gallery-text);
	height: 100%;
	margin: auto;
	max-height: none;
	max-width: none;
	padding: 0;
	width: 100%;
}

.prime73-gallery-lightbox::backdrop {
	background: rgba(15, 13, 11, 0.94);
	backdrop-filter: blur(10px);
}

.prime73-gallery-lightbox__frame {
	align-items: center;
	display: grid;
	grid-template-columns: minmax(3.2rem, 8vw) minmax(0, 1fr) minmax(3.2rem, 8vw);
	height: 100%;
	padding: clamp(1rem, 3vw, 2.5rem);
	position: relative;
}

.prime73-gallery-lightbox figure {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	height: min(86vh, 960px);
	margin: 0;
	min-width: 0;
}

.prime73-gallery-lightbox img {
	height: 100%;
	margin: auto;
	max-height: 80vh;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.prime73-gallery-lightbox figcaption {
	font-size: 0.9rem;
	line-height: 1.45;
	margin: 0.8rem auto 0;
	max-width: 70ch;
	text-align: center;
}

.prime73-gallery-lightbox button {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	font-size: 1.4rem;
	height: 3rem;
	justify-self: center;
	line-height: 1;
	padding: 0;
	width: 3rem;
}

.prime73-gallery-lightbox button:hover,
.prime73-gallery-lightbox button:focus-visible {
	background: #fff;
	color: #171512;
}

.prime73-gallery-lightbox__close {
	position: absolute;
	right: clamp(1rem, 3vw, 2.5rem);
	top: clamp(1rem, 3vw, 2.5rem);
	z-index: 2;
}

.prime73-gallery-lightbox__status {
	bottom: 1rem;
	font-variant-numeric: tabular-nums;
	grid-column: 2;
	margin: 0;
	position: absolute;
	right: 0;
}

@media (max-width: 759px) {
	.prime73-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.prime73-gallery-lightbox__frame {
		grid-template-columns: 3rem minmax(0, 1fr) 3rem;
		padding-inline: 0.25rem;
	}

	.prime73-gallery__carousel-header {
		align-items: center;
		justify-content: flex-end;
	}

	.prime73-gallery__carousel-title {
		display: none;
	}

	.prime73-gallery[data-layout="carousel"] .prime73-gallery__grid {
		height: clamp(23rem, 112vw, 34rem);
	}

	.prime73-gallery[data-layout="carousel"].is-carousel-ready .prime73-gallery__item:hover,
	.prime73-gallery[data-layout="carousel"].is-carousel-ready .prime73-gallery__item:focus-within {
		flex-grow: 1;
	}

	.prime73-gallery[data-layout="carousel"] .prime73-gallery__item > figcaption {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 460px) {
	.prime73-gallery__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.prime73-gallery__link img,
	.prime73-gallery[data-layout="carousel"].is-carousel-ready .prime73-gallery__item,
	.prime73-gallery[data-layout="carousel"] .prime73-gallery__item > figcaption {
		transition: none;
	}
}
