/* Image sizing from the supplied RR V2.7 theme, adapted to RITUAL.
   Collection layout, card information and native media controls are unchanged. */

collection-component .card-gallery {
  --gallery-aspect-ratio: 2 / 3 !important;
}

collection-component .card-gallery .product-media__image {
  object-fit: cover !important;
}

/* RR V2.7 main images use 60% of the desktop viewport.
   Let the native thumbnail rail occupy its own width beside the image. */
@media screen and (min-width: 750px) {
  .product-information
  .product-information__grid.product-information--media-left:not(
    .product-information--media-none,
    .product-information__grid--half
  ):has(.media-gallery--carousel) {
    grid-column: 1 / -1;
    grid-template-columns: max-content minmax(0, 1fr);
    width: 100%;
    max-width: none;
    margin-inline: 0;

    > .product-information__media {
      width: max-content;
      min-width: 0;
    }

    .media-gallery--carousel,
    .media-gallery--carousel > slideshow-component {
      width: max-content;
    }

    .media-gallery--carousel > slideshow-component > slideshow-container {
      width: 60vw;
    }
  }
}
