/**
 * WooCommerce Katalog: kleine Produkt-Banner nicht auf volle Spalten-/Tabellenbreite strecken.
 * Shop (body.woocommerce) + Jobeintrag/WPJM — inkl. VC-Tabellen, div.products, reine Thumbnail-Klasse.
 */
html body.woocommerce ul.products li.product .woocommerce-loop-product__link,
html body.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
html body.spn26-jobeintrag-page ul.products li.product .woocommerce-loop-product__link,
html body.spn26-jobeintrag-page ul.products li.product a.woocommerce-LoopProduct-link,
html body.single-job_listing ul.products li.product .woocommerce-loop-product__link,
html body.single-job_listing ul.products li.product a.woocommerce-LoopProduct-link,
html body.post-type-archive-job_listing ul.products li.product .woocommerce-loop-product__link,
html body.post-type-archive-job_listing ul.products li.product a.woocommerce-LoopProduct-link,
html body.spn26-jobeintrag-page div.products div.product > a:first-child,
html body.single-job_listing div.products div.product > a:first-child,
html body.post-type-archive-job_listing div.products div.product > a:first-child {
	display: block;
	max-width: min(100%, 28rem);
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/* Standard-Loop + div.products + WC-Blocks */
html body.woocommerce ul.products li.product img,
html body.woocommerce ul.products li.product .woocommerce-loop-product__link img,
html body.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img,
html body.woocommerce ul.products li.product a img,
html body.woocommerce ul.products li.product .attachment-woocommerce_thumbnail,
html body.woocommerce .wc-block-grid__product-image img,
html body.woocommerce .wc-block-grid__product-image .wc-block-components-product-image__image,
html body.spn26-jobeintrag-page ul.products li.product img,
html body.spn26-jobeintrag-page ul.products li.product .woocommerce-loop-product__link img,
html body.spn26-jobeintrag-page ul.products li.product a.woocommerce-LoopProduct-link img,
html body.spn26-jobeintrag-page ul.products li.product a img,
html body.spn26-jobeintrag-page ul.products li.product .attachment-woocommerce_thumbnail,
html body.spn26-jobeintrag-page .wc-block-grid__product-image img,
html body.spn26-jobeintrag-page .wc-block-grid__product-image .wc-block-components-product-image__image,
html body.spn26-jobeintrag-page div.products div.product img,
html body.spn26-jobeintrag-page div.products div.product a img,
html body.spn26-jobeintrag-page ul.wc-block-grid__products li img,
html body.single-job_listing ul.products li.product img,
html body.single-job_listing ul.products li.product .woocommerce-loop-product__link img,
html body.single-job_listing ul.products li.product a img,
html body.single-job_listing ul.products li.product .attachment-woocommerce_thumbnail,
html body.single-job_listing .wc-block-grid__product-image img,
html body.single-job_listing .wc-block-grid__product-image .wc-block-components-product-image__image,
html body.single-job_listing div.products div.product img,
html body.single-job_listing div.products div.product a img,
html body.single-job_listing ul.wc-block-grid__products li img,
html body.post-type-archive-job_listing ul.products li.product img,
html body.post-type-archive-job_listing ul.products li.product .woocommerce-loop-product__link img,
html body.post-type-archive-job_listing ul.products li.product a img,
html body.post-type-archive-job_listing ul.products li.product .attachment-woocommerce_thumbnail,
html body.post-type-archive-job_listing .wc-block-grid__product-image img,
html body.post-type-archive-job_listing .wc-block-grid__product-image .wc-block-components-product-image__image,
html body.post-type-archive-job_listing div.products div.product img,
html body.post-type-archive-job_listing div.products div.product a img,
html body.post-type-archive-job_listing ul.wc-block-grid__products li img {
	width: auto !important;
	max-width: min(100%, 28rem) !important;
	height: auto !important;
	max-height: min(18rem, 46vw) !important;
	object-fit: contain !important;
	object-position: center top !important;
	margin-left: auto !important;
	margin-right: auto !important;
	display: block !important;
	box-sizing: border-box !important;
}

/* Thumbnail-Klasse überall im Inhaltsbereich (ohne ul.products), z. B. Tabellen/VC */
html body.spn26-jobeintrag-page #wrapper img.attachment-woocommerce_thumbnail,
html body.single-job_listing:not(.single-product) #wrapper img.attachment-woocommerce_thumbnail,
html body.post-type-archive-job_listing #wrapper img.attachment-woocommerce_thumbnail {
	width: auto !important;
	max-width: min(100%, 28rem) !important;
	height: auto !important;
	max-height: min(18rem, 46vw) !important;
	object-fit: contain !important;
	object-position: center top !important;
}

/* Tabellen: Zelle nicht zur vollen Layoutbreite aufblasen */
html body.spn26-jobeintrag-page #wrapper table img.attachment-woocommerce_thumbnail,
html body.single-job_listing:not(.single-product) #wrapper table img.attachment-woocommerce_thumbnail,
html body.post-type-archive-job_listing #wrapper table img.attachment-woocommerce_thumbnail {
	max-width: min(100%, 14rem) !important;
	max-height: min(12rem, 40vw) !important;
}

html body.spn26-jobeintrag-page #wrapper table td.product-thumbnail,
html body.single-job_listing:not(.single-product) #wrapper table td.product-thumbnail,
html body.post-type-archive-job_listing #wrapper table td.product-thumbnail {
	width: 1%;
	vertical-align: middle;
	text-align: center;
}

html body.woocommerce .wc-block-grid__product-image,
html body.spn26-jobeintrag-page .wc-block-grid__product-image,
html body.single-job_listing .wc-block-grid__product-image,
html body.post-type-archive-job_listing .wc-block-grid__product-image {
	text-align: center;
}

/* Haupt-Galerie auf der Produktseite nicht anfassen */
html body.single-product div.product div.images .woocommerce-product-gallery__wrapper img,
html body.single-product div.product div.images .flex-control-thumbs img {
	max-width: none !important;
	width: auto !important;
	max-height: none !important;
}

/**
 * Zusatz-Scope: body.spn26-woo-catalog-img-tame (wird nur gesetzt, wenn dieses Stylesheet geladen wird).
 * Gilt auch ohne #wrapper, für VC-Tabellen und volle td-Breite (Link + Bild).
 * Block steht am Ende → gewinnt gegen viele Theme-Regeln mit width:100%.
 */
html body.spn26-woo-catalog-img-tame:not(.single-product) .woocommerce table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .woocommerce table td img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wpb_wrapper table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wpb_wrapper table td img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wpb_text_column table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) main table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) #content table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) #main table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .site-content table img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .woocommerce table picture img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wpb_wrapper table picture img {
	width: auto !important;
	max-width: min(100%, 14rem) !important;
	height: auto !important;
	max-height: min(12rem, 42vw) !important;
	object-fit: contain !important;
	vertical-align: middle !important;
}

html body.spn26-woo-catalog-img-tame:not(.single-product) .woocommerce table td > a,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wpb_wrapper table td > a {
	display: inline-block !important;
	max-width: min(100%, 16rem) !important;
}

html body.spn26-woo-catalog-img-tame:not(.single-product) img.attachment-woocommerce_thumbnail,
html body.spn26-woo-catalog-img-tame:not(.single-product) img[class*="woocommerce_thumbnail"] {
	width: auto !important;
	max-width: min(100%, 28rem) !important;
	height: auto !important;
	max-height: min(18rem, 46vw) !important;
	object-fit: contain !important;
}

html body.spn26-woo-catalog-img-tame:not(.single-product) ul.products li.product img,
html body.spn26-woo-catalog-img-tame:not(.single-product) div.products div.product img,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wc-block-grid__product-image img {
	width: auto !important;
	max-width: min(100%, 28rem) !important;
	height: auto !important;
	max-height: min(18rem, 46vw) !important;
	object-fit: contain !important;
}

/* Medienbilder mit .size-full (z. B. Paket-Banner in Tabellen) — nicht auf Zellenbreite strecken */
html body.spn26-woo-catalog-img-tame:not(.single-product) #wrapper img.size-full,
html body.spn26-woo-catalog-img-tame:not(.single-product) main#spn26-main-content img.size-full,
html body.spn26-woo-catalog-img-tame:not(.single-product) .site-content img.size-full,
html body.spn26-woo-catalog-img-tame:not(.single-product) .wpb_wrapper img.size-full,
html body.spn26-jobeintrag-page:not(.single-product) #wrapper img.size-full,
html body.spn26-jobeintrag-page:not(.single-product) main#spn26-main-content img.size-full {
	max-width: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain !important;
}
