/* Image framing (2026-10-18). Loaded after ry-design.css; same selectors where it overrides a design rule.
   Product photos: "contain" in the component's usual frame, on a neutral panel, so the whole product shows.
   Photos of setups (Our Events & Setups): uniform frames, whole photo shown. Shape classes: inc/ry-image-fit.php. */

/* 1. Flower-wall boxes (ServiceBox, flower-wall city pages): the 730:500 frame stays; each wall is shown whole.
      Images already 730x500 look exactly as before. */
body.ry-design .site-main .service-block .tt-feature-box-icon img {
	object-fit: contain;
	object-position: 50% 50%;
	background: var(--ry-c-surface, #171614);
}

/* 2. Services carousel (3:4 product cards): portrait photos keep "cover" (unchanged); a square or landscape photo,
      which "cover" would cut at the sides, is shown whole. */
body.ry-design .site-main .tt-services-thumbnail .tt-service-img img.ry-shape-square,
body.ry-design .site-main .tt-services-thumbnail .tt-service-img img.ry-shape-landscape {
	object-fit: contain;
	background: var(--ry-c-surface, #171614);
}

/* 3. Our Events & Setups gallery: an even grid of 4:5 frames (3 columns, 2 on tablets and phones), each photo
      whole; the caption stays on the frame. Overrides the core gallery's cropping ("is-cropped") and row stretching. */
body.ry-design .site-main .wp-block-gallery.has-nested-images.ry-u3-recent-setups {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	align-items: start;
}

body.ry-design .site-main .wp-block-gallery.has-nested-images.ry-u3-recent-setups figure.wp-block-image:not(#ry-fit) {
	width: auto;
	max-width: none;
	margin: 0;
	aspect-ratio: 4 / 5;
	flex: none;
	background: var(--ry-c-surface, #171614);
	border-radius: var(--ry-radius, 6px);
	overflow: hidden;
}

body.ry-design .site-main .wp-block-gallery.has-nested-images.ry-u3-recent-setups figure.wp-block-image:not(#ry-fit) img {
	width: 100%;
	height: 100%;
	flex: none;
	object-fit: contain;
	object-position: 50% 50%;
	border-radius: 0;
}

@media (max-width: 781px) {
	body.ry-design .site-main .wp-block-gallery.has-nested-images.ry-u3-recent-setups {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
}

/* 4. Articles: a tall U3 photo is capped near the screen height (proportions kept, centred) instead of filling
      more than a screen. */
body.ry-design.single-post .site-main .elementor-widget-image img.ry-u3-photo.ry-shape-portrait {
	width: auto;
	max-height: min(80vh, 720px);
	margin-inline: auto;
}
