/* Larger product photos in home rails, shop results and category results.
   Constrain the grid cell as well as the image so tall/wide photos fit fully. */
:is(#grid-new, #grid-featured, #trend-grid, #rail-deals, #results) .card__media {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  padding: clamp(6px, .5vw, 10px);
  flex: none;
  min-width: 0;
  min-height: 0;
}
:is(#grid-new, #grid-featured, #trend-grid, #rail-deals, #results) .card__media img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}
:is(#grid-new, #grid-featured, #trend-grid, #rail-deals, #results) .card:hover .card__media img {
  transform: none;
}
