/* Fixed frames prevent portrait photos from overflowing a grid cell. */
.fv-lost-catalog .wrap.layout-grid .grid {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}
.fv-lost-catalog .results .image,
.fv-lost-catalog .wrap .img,
.fv-lost-catalog .lost-detail-image {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f3f5;
}
.fv-lost-catalog .lost-detail-image { align-self: start; }
.fv-lost-catalog .results .image > img,
.fv-lost-catalog .wrap .img > img,
.fv-lost-catalog .lost-detail-image > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
  object-position: center;
}
.fv-lost-catalog .results .card:hover .image > img:not(.lost-image-is-blurred) {
  transform: none;
}
.fv-lost-catalog .results .image > img.finnvibe-fallback-logo,
.fv-lost-catalog .wrap .img > img.finnvibe-fallback-logo,
.fv-lost-catalog .lost-detail-image > img.finnvibe-fallback-logo {
  width: 62%;
  height: 62%;
  padding: 12px;
}
.fv-lost-catalog .wrap.layout-list .img,
.fv-lost-catalog .wrap.layout-compact .img {
  aspect-ratio: 1;
  align-self: start;
}

/* Five cards per row on desktop; retain mobile and list layouts. */
@media (min-width: 1100px) {
  .fv-lost-catalog .results .grid,
  .fv-lost-catalog .wrap.layout-grid .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .fv-lost-catalog .results .grid > *,
  .fv-lost-catalog .wrap.layout-grid .grid > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
