/* Product and order archive galleries: keep thumbnails inside the mobile column. */
@media (max-width: 767.98px) {
  .item.ml-item-gallery, .item.ml-item-gallery .block {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }
  .item.ml-item-gallery .block { width: 100%; }
  .item.ml-item-gallery .mainItemImage { max-width: 100%; box-sizing: border-box; }
  .item.ml-item-gallery .block .thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    margin: 0;
    padding: 12px 0;
    white-space: normal;
  }
  .item.ml-item-gallery .block .thumbs .it {
    box-sizing: border-box;
    flex: 0 0 72px;
    width: 72px !important;
    height: 72px !important;
    min-width: 0;
    max-width: 100%;
    float: none;
    margin: 0 !important;
    padding: 0;
  }
  .item.ml-item-gallery .block .thumbs .it a {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
  }
  .item.ml-item-gallery .block .thumbs .it img {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    margin: 0 !important;
    object-fit: contain;
  }
  .item.ml-item-gallery .block .thumbs > .clr { display: none; }
}
