/* Keep complete product and factory photos visible at every breakpoint. */
.product-card .product-img{height:auto;aspect-ratio:4/3;background:#f8fafc}
.product-card .product-img img{display:block;box-sizing:border-box;width:100%;height:100%;object-fit:contain;object-position:center;padding:12px;background:#f8fafc}
.top-visual-banner-frame img,.about-image img,.story-image img,.factory-card-img img,.category-factory-image img,.category-factory-card img,.custom-hero-media img,.custom-process-gallery img{object-fit:contain;object-position:center;background:#f8fafc}
@media(min-width:641px) and (max-width:980px){.grid.grid-4:has(>.product-card){grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Place the factory caption below the full photo instead of over its lower edge. */
.category-factory-image{min-height:0;aspect-ratio:auto;align-self:start;background:#f8fafc}
.category-factory-image img{width:100%;height:auto;aspect-ratio:3/2;object-fit:contain}
.category-factory-image span{position:static;inset:auto;display:block;margin:0;border-radius:0}

/* The image must fit inside the card frame, including portrait source photos. */
.category-visual-image{position:relative}
.category-visual-image>img{position:absolute;inset:0;display:block;box-sizing:border-box;width:100%;height:100%;max-height:100%;object-fit:contain;object-position:center}

.category-visual-card:hover .category-visual-image>img,.product-card:hover .product-img img{transform:none}

/* Tubular overview: a compact photo frame independent of the text column height. */
.category-overview-grid.pg-compact-overview{align-items:start}
.category-overview-grid.pg-compact-overview .product-img-box{position:relative;align-self:start;min-height:0;height:auto;aspect-ratio:4/3;padding:20px}
.category-overview-grid.pg-compact-overview .product-img-box img{position:absolute;inset:20px;display:block;width:calc(100% - 40px);height:calc(100% - 40px);max-height:none;object-fit:contain}
.category-overview-grid.pg-compact-overview .content-box{height:auto;min-height:0}
