@media (max-width: 767px) {
  /* Product page thumbs: fewer columns = bigger thumbnails on mobile. */
  .ProductGalleryThumbs.product-gallery-thumbs {
    margin-top: 0.85rem !important;
  }

  /* On mobile, use a horizontal strip so thumbs can be large without forcing tall grids. */
  .ProductGalleryThumbs .ProductTinyImageList.product-thumb-list {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .ProductGalleryThumbs .ProductTinyImageList.product-thumb-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .ProductGalleryThumbs .ProductTinyImageList.product-thumb-list ul {
    display: flex !important;
    align-items: center;
    gap: 0.85rem !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .ProductGalleryThumbs .product-thumb-tiny-item {
    flex: 0 0 auto !important;
    width: 5.75rem !important;
    margin: 0 !important;
  }

  .ProductGalleryThumbs .product-thumb-tiny-inner {
    width: 100% !important;
    height: 5.75rem !important;
    border-radius: 1rem;
    overflow: hidden;
  }

  .ProductGalleryThumbs .product-thumb-tiny-link {
    width: 100% !important;
    height: 100% !important;
    padding: 0.35rem !important;
    border-radius: 1rem;
  }

  /* Override the HTML width/height attributes on the <img>. */
  .ProductGalleryThumbs .product-thumb-tiny-image {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    display: block;
  }
}
