/* Grid (Imd_ShopContent::library/grid.phtml): one row of photographs in equal 4:5 frames divided by hairline rules.
   The row holds four photographs on a wide screen, then three, two and, at phone width, one: it shows the first that
   fit and draws no others. Each frame crops its photograph to cover and shows it in black and white; a caption, when
   given, sits under its frame. */
.imd-publication .imd-grid{display:grid;grid-template-columns:repeat(4,1fr)}
.imd-publication .imd-grid>.photo{display:flex;flex-direction:column}
.imd-publication .imd-grid>.photo+.photo{border-left:1px solid var(--rule)}
.imd-publication .imd-grid>.photo:nth-child(n+5){display:none}
.imd-publication .imd-grid .photo img{display:block;width:100%;height:auto;aspect-ratio:4/5;filter:grayscale(1)}
.imd-publication .grid-foot{margin:0;padding:18px 35px;border-top:1px solid var(--rule)}
/* A link row emptied in the page editor draws nothing on the page; the editor keeps it to write in again. */
html:not(.imd-ed-active) .imd-publication .grid-foot:not(:has(*)){display:none}

@media(max-width:1300px){
.imd-publication .imd-grid{grid-template-columns:repeat(3,1fr)}
.imd-publication .imd-grid>.photo:nth-child(n+4){display:none}
}
@media(max-width:1000px){
.imd-publication .imd-grid{grid-template-columns:repeat(2,1fr)}
.imd-publication .imd-grid>.photo:nth-child(n+3){display:none}
}
@media(max-width:600px){
.imd-publication .imd-grid{grid-template-columns:1fr}
.imd-publication .imd-grid>.photo:nth-child(n+2){display:none}
.imd-publication .grid-foot{padding:15px 25px}
}
