/* Consistent, uncropped image frames across inner pages. */
.img-frame{aspect-ratio:4/3;justify-content:center;background:#f6f7f9;overflow:hidden}
.img-frame img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
/* Wide factory photos and long product renders use landscape frames. */
.img-frame:has(>img[src*="factory-campus.jpg"]),
.img-frame:has(>img[src*="factory-cylinder-machining.jpg"]),
.img-frame:has(>img[src*="factory-tensioner-test.jpg"]),
.img-frame:has(>img[src*="/factory/"]),
.img-frame:has(>img[src*="p20_img2.jpg"]),
.img-frame:has(>img[src*="p50_img1.jpg"]),
.img-frame:has(>img[src*="tail/martel-tail.jpg"]){aspect-ratio:16/9}
/* Standalone detail images use a fixed landscape frame and remain uncropped. */
.site-figure img{display:block;width:100%;height:clamp(220px,34vw,420px);object-fit:contain;object-position:center;background:#f6f7f9}
/* Gallery thumbnails share one visible frame regardless of source dimensions. */
.strip{grid-template-columns:repeat(3,minmax(0,1fr));justify-content:center}
.strip .shot{min-width:0}
.strip .shot img{display:block;width:100%;height:clamp(180px,22vw,280px);object-fit:contain;object-position:center;background:#fff}
.strip:has(>.shot:only-child){grid-template-columns:minmax(0,360px)}
.strip:has(>.shot:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,360px))}
.strip:has(>.shot:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
.strip:has(>.shot:nth-child(n+4)){grid-template-columns:repeat(4,minmax(0,1fr))}
.shot-grid:has(>.shot:nth-child(3n+1):last-child)>.shot:last-child{grid-column:2}
@media(max-width:960px){
 .strip:has(>.shot:only-child){grid-template-columns:minmax(0,360px)}
 .strip:has(>.shot:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
 .strip:has(>.shot:nth-child(3):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
 .strip:has(>.shot:nth-child(3):last-child)>.shot:last-child{grid-column:1/-1;width:calc((100% - 14px)/2);justify-self:center}
 .strip:has(>.shot:nth-child(n+4)){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
 .strip:has(>.shot:only-child){grid-template-columns:minmax(0,1fr)}
 .strip:has(>.shot:nth-child(2):last-child),
 .strip:has(>.shot:nth-child(3):last-child),
 .strip:has(>.shot:nth-child(n+4)){grid-template-columns:repeat(2,minmax(0,1fr))}
 .strip:has(>.shot)>.shot{grid-column:auto;width:100%;max-width:none;justify-self:stretch}
 .strip:has(>.shot:nth-child(3):last-child)>.shot:last-child{grid-column:1/-1;width:calc((100% - 14px)/2);justify-self:center}
 .strip .shot img{height:180px}
 .site-figure img{height:260px}
 .shot-grid:has(>.shot)>.shot{grid-column:auto}
}