.section--factory-gallery {
	padding: 105px 0 120px;
	background: #fffaf0;
}

.section--factory-gallery .section-heading {
	margin-bottom: 48px;
}

.factory-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.factory-gallery__item {
	min-width: 0;
}

.factory-gallery__trigger {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 18px;
	overflow: hidden;
	cursor: zoom-in;
	background: var(--soft);
	transition: transform .35s ease, box-shadow .35s ease;
}

.factory-gallery__trigger:hover,
.factory-gallery__trigger:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(23, 53, 33, .14);
}

.factory-gallery__trigger img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: center;
}

.factory-gallery-lightbox {
	position: relative;
	width: min(96vw, 1100px);
	max-width: none;
	max-height: 92vh;
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: #102c16;
	color: #fff;
}

.factory-gallery-lightbox::backdrop {
	background: rgba(16, 44, 22, .82);
}

.factory-gallery-lightbox__close {
	position: absolute;
	z-index: 2;
	top: 12px;
	inset-inline-end: 12px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.factory-gallery-lightbox__nav {
	position: absolute;
	z-index: 2;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.factory-gallery-lightbox__nav:hover,
.factory-gallery-lightbox__nav:focus-visible {
	background: rgba(255, 255, 255, 0.24);
}

.factory-gallery-lightbox__nav--prev {
	inset-inline-start: 12px;
}

.factory-gallery-lightbox__nav--next {
	inset-inline-end: 12px;
}

.factory-gallery-lightbox__counter {
	position: absolute;
	z-index: 2;
	inset-inline: 0;
	bottom: 14px;
	margin: 0;
	text-align: center;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	opacity: 0.85;
}

.factory-gallery-lightbox__figure {
	margin: 0;
	padding: 20px 64px 44px;
}

.factory-gallery-lightbox__figure img {
	display: block;
	width: 100%;
	max-height: calc(92vh - 40px);
	margin-inline: auto;
	object-fit: contain;
}

@media (max-width: 1050px) {
	.factory-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.section--factory-gallery {
		padding: 72px 0 90px;
	}

	.factory-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.factory-gallery-lightbox__figure {
		padding: 16px 12px 40px;
	}

	.factory-gallery-lightbox__nav {
		top: auto;
		bottom: 52px;
		transform: none;
		width: 44px;
		height: 44px;
	}

	.factory-gallery-lightbox__nav--prev {
		inset-inline-start: 16px;
	}

	.factory-gallery-lightbox__nav--next {
		inset-inline-end: 16px;
	}
}
