/* One photograph rule across the site. Keep logos and interface icons intact. */
:where(body.pg-site-photos) img:where(:not(.custom-logo, .wordmark-lettering, .pg-brand-emblem, .avatar, .emoji, .wp-smiley, .icon, [src$=".svg"], [src*=".svg?"])) {
 width:auto;max-width:100%;height:auto;
 object-fit:scale-down !important;object-position:center !important;transform:none !important;
 scale:none !important;translate:none !important;
}
/* Preserve each existing frame; display the entire photograph inside it. */
body.pg-site-photos .pg-homepage .category-tile .category-image {position:relative;}
body.pg-site-photos .pg-homepage .hero .hero-visual > img,
body.pg-site-photos .pg-homepage .category-grid .category-tile .category-image > img,
body.pg-site-photos .pg-homepage .brand-story .story-image > img {
 position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;
 max-width:100%;max-height:100%;margin:0;padding:0;aspect-ratio:auto;
 object-fit:scale-down;object-position:center;translate:none;scale:none;rotate:none;transition:none;
}
/* Core image, gallery and cover blocks use the same rule, including future blocks. */
body.pg-site-photos .wp-block-cover > img.wp-block-cover__image-background,
body.pg-site-photos .wp-block-cover-image > img.wp-block-cover__image-background,
body.pg-site-photos .wp-block-gallery figure.wp-block-image img {
 width:100%;height:100%;max-width:100%;max-height:100%;object-fit:scale-down;
}
/* Older Media & Text blocks hide an image behind a cropped CSS background. */
body.pg-site-photos .wp-block-media-text.is-image-fill > .wp-block-media-text__media {
 position:relative;background-image:none !important;
}
body.pg-site-photos .wp-block-media-text:is(.is-image-fill,.is-image-fill-element) > .wp-block-media-text__media img {
 position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;
 margin:0;padding:0;clip:auto;clip-path:none;object-fit:scale-down;
}

/* Homepage editorial banners fill their frames; collection and category photos retain their existing rules. */
body.pg-site-photos .pg-homepage .hero .hero-visual > img {
 object-fit:cover !important;object-position:center top !important;
}
body.pg-site-photos .pg-homepage .brand-story .story-image > img {
 object-fit:cover !important;object-position:center !important;
}

/* Give the story photograph a landscape frame; keep the complete cover visible. */
body.pg-site-photos .pg-homepage .brand-story .story-image {
 height:auto;min-height:0;aspect-ratio:4 / 3;align-self:center;
}
body.pg-site-photos .pg-homepage .brand-story .story-image::after {
 display:none;
}
@media (max-width:760px) {
 body.pg-site-photos .pg-homepage .brand-story {
  grid-template-columns:minmax(0,1fr);
 }
}
