/* Products category photo collages only; existing homepage cards are unchanged. */
.kt-products-categories .kt-category-collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .35rem; width: 100%; aspect-ratio: 4 / 3; padding: .35rem; border-radius: .9rem; overflow: hidden; background: #FFFFFF; }
.kt-products-categories .kt-category-collage > .wp-block-image { min-width: 0; min-height: 0; margin: 0; aspect-ratio: auto; border-radius: .4rem; background: #FFFFFF; }
.kt-products-categories .kt-category-collage > .wp-block-image img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
/* One representative Image block fills the former collage without changing
   multi-image collages or category cards elsewhere on the site. */
.kt-products-categories .kt-category-collage:has(> .wp-block-image:only-child) {
 grid-template-columns: minmax(0, 1fr);
 grid-template-rows: minmax(0, 1fr);
 gap: 0;
 padding: 0;
}
.kt-products-categories .kt-category-collage > .wp-block-image:only-child {
 width: 100%;
 height: 100%;
 grid-column: 1 / -1;
 grid-row: 1 / -1;
 justify-self: stretch;
 align-self: stretch;
 aspect-ratio: 4 / 3;
 border-radius: .9rem;
}
/* Saved resized Image blocks can retain an inline pixel width. Override only
   the sole representative image, leaving its saved markup/source untouched. */
.kt-products-categories .kt-category-collage > .wp-block-image.kt-category-image:only-child > img {
 width: 100% !important;
 height: 100% !important;
 max-width: 100%;
 object-fit: contain;
}
/* Consistent representative-image frames, including saved single-image collages. */
.kt-products-categories > .kt-category > .kt-category-image,
.kt-products-categories > .kt-category > .kt-category-collage:has(> .kt-category-image:only-child),
.kt-products-categories .kt-category-collage > .kt-category-image:only-child {
 width: 100%;
 margin: 0;
 padding: 0;
 box-sizing: border-box;
 aspect-ratio: 4 / 3;
 border-radius: .9rem;
 background: #D8F3E8;
}
.kt-products-categories > .kt-category > .kt-category-image > img,
.kt-products-categories .kt-category-collage > .kt-category-image:only-child > img {
 display: block;
 width: 100% !important;
 height: 100% !important;
 max-width: 100%;
 aspect-ratio: 4 / 3;
 object-fit: contain;
 transform: none;
}


/* Bind by reviewed category template class, not disposable Page IDs.
Add kt-catalog-category-page to the three new category main blocks only. */
.kt-catalog-category-page.kt-inner-page.kt-section { padding-top:clamp(1.5rem,3vw,2.5rem); margin-block-start:.75rem; }
