/**
 * Polaris FW Native Gallery
 *
 * Mobile first:
 * - Mobile: single column, full image shown, no crop, no lightbox
 * - Tablet: two-column gallery, square cropped thumbnails, lightbox enabled
 * - Desktop: three-column gallery, square cropped thumbnails, lightbox enabled
 *
 * This file is intentionally lightweight so it can be overridden in the child theme.
 */

.polaris-fw-native-gallery {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.polaris-fw-native-gallery__row {
	row-gap: 1.5rem;
}

.polaris-fw-native-gallery__item {
	height: auto;
	min-height: 0;
}

.polaris-fw-native-gallery__link {
	display: block;
	height: auto;
	min-height: 0;
	text-decoration: none;
}

.polaris-fw-native-gallery__image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
   Mobile
   --------------------------------------------------------------------------
   Show the full image naturally with no crop.
--------------------------------------------------------------------------- */

.polaris-fw-native-gallery__image--mobile {
	aspect-ratio: auto;
	object-fit: contain;
}

/* --------------------------------------------------------------------------
   Tablet and up
   --------------------------------------------------------------------------
   Switch the gallery into cropped thumbnail mode.
--------------------------------------------------------------------------- */
@media (min-width: 768px) {

	.polaris-fw-native-gallery__image--desktop {
		aspect-ratio: 1 / 1;
		object-fit: cover;
	}
}