/**
 * CategoryPage – featured image width normalisation.
 *
 * Uses only custom properties + logical layout rules so it inherits the
 * theme's content container width (boxed or full width) without overriding
 * theme styling, cropping, lazy loading or srcset behaviour.
 */

:root {
	--categorypage-radius: 0px;
}

/* Common featured-image wrappers across block and classic themes. */
.wp-block-post-featured-image,
.post-thumbnail,
.entry-thumbnail,
.featured-image,
.attachment-post-thumbnail {
	width: 100%;
	max-width: var( --categorypage-width, 100% );
	margin-inline: auto;
}

.wp-block-post-featured-image img,
.post-thumbnail img,
.entry-thumbnail img,
.featured-image img,
img.attachment-post-thumbnail,
img.wp-post-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;            /* preserve aspect ratio, never distort */
	object-fit: cover;
	border-radius: var( --categorypage-radius, 0 );
}

/* Do not fight themes that intentionally use alignfull/alignwide. */
.wp-block-post-featured-image.alignfull,
.wp-block-post-featured-image.alignwide {
	max-width: none;
}
