.bfs-gallery-plus__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
	gap: 16px;
}

.bfs-gallery-plus .bfs-gallery-plus__tile {
	position: relative;
	display: block;
	min-width: 0;
	overflow: hidden;
	border-radius: 6px;
	background: #ece5dc;
	cursor: zoom-in;
}

.bfs-gallery-plus .bfs-gallery-plus__tile > img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--bfs-gallery-plus-ratio, 1 / 1);
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: var(--bfs-gallery-plus-x, var(--bfs-gallery-plus-base-x, 50%))
		var(--bfs-gallery-plus-y, var(--bfs-gallery-plus-base-y, 50%));
}

.bfs-gallery-plus__sign {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(28, 21, 16, .78);
	color: #fff;
	font: 400 21px/1 system-ui, sans-serif;
}

.bfs-gallery-plus__tile:hover .bfs-gallery-plus__sign { background: #211915; }
.bfs-gallery-plus__tile:focus-visible {
	outline: 2px solid #b42133;
	outline-offset: 3px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.bfs-gallery-plus .bfs-gallery-plus__tile > img {
		transform-origin: var(--bfs-gallery-plus-x, var(--bfs-gallery-plus-base-x, 50%))
			var(--bfs-gallery-plus-y, var(--bfs-gallery-plus-base-y, 50%));
		transition: transform 420ms cubic-bezier(.22, .7, .3, 1);
	}
	.bfs-gallery-plus .bfs-gallery-plus__tile:hover > img { transform: scale(1.075); }
}

.bfs-gallery-plus__return {
	position: fixed;
	z-index: 2147483647;
	overflow: hidden;
	pointer-events: none;
	contain: layout paint;
}

.bfs-gallery-plus__return > img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	border-radius: 0;
	object-fit: cover;
}

.bfs-gallery-plus__empty {
	margin: 0;
	padding: 20px;
	border: 1px dashed #b5aaa1;
	border-radius: 6px;
	text-align: center;
}

@media (max-width: 1024px) {
	.bfs-gallery-plus__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.bfs-gallery-plus__grid { gap: 10px; }
	.bfs-gallery-plus__sign { right: 7px; bottom: 7px; width: 26px; height: 26px; }
}
