/* Immersive mobile 3D gallery with the angle thumbnails kept within reach. */
@media (max-width: 760px) {
  body.product-page.pdp-mobile-3d-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body.product-page.pdp-mobile-3d-open .pdp-gallery-sticky {
    position: static;
  }

  body.product-page.pdp-mobile-3d-open .gallery-main {
    position: fixed !important;
    z-index: 1000 !important;
    inset: env(safe-area-inset-top) 0 calc(86px + env(safe-area-inset-bottom)) !important;
    width: 100vw !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 62px 10px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    isolation: isolate;
  }

  body.product-page.pdp-mobile-3d-open .gallery-main > iframe,
  body.product-page.pdp-mobile-3d-open .gallery-main > [data-binkies-content="root"] {
    border-radius: 0 !important;
  }

  body.product-page.pdp-mobile-3d-open .gallery-main > .pdp-gallery-navigation,
  body.product-page.pdp-mobile-3d-open .gallery-main > #gallery-zoom-button,
  body.product-page.pdp-mobile-3d-open .gallery-main > .pdp-gallery-fullscreen,
  body.product-page.pdp-mobile-3d-open .pdp-gallery-toolbar .pdp-gallery-fullscreen {
    display: none !important;
  }

  body.product-page.pdp-mobile-3d-open .gallery-main > .pdp-gallery-toolbar {
    position: absolute !important;
    z-index: 30 !important;
    inset: 7px 12px auto !important;
    display: flex !important;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
  }

  body.product-page.pdp-mobile-3d-open .pdp-gallery-counter {
    order: -1;
    color: #566174;
    font-size: 12px;
    font-weight: 600;
  }

  body.product-page.pdp-mobile-3d-open .pdp-gallery-exit {
    display: grid !important;
    width: 46px;
    height: 46px;
    min-height: 46px;
    margin-left: auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f2f4f8;
    color: transparent;
    pointer-events: auto;
  }

  body.product-page.pdp-mobile-3d-open .pdp-gallery-exit span {
    color: #273043;
    font-size: 33px;
    font-weight: 400;
    line-height: 1;
  }

  body.product-page.pdp-mobile-3d-open .gallery-thumbs {
    position: fixed !important;
    z-index: 1001 !important;
    inset: auto 0 0 !important;
    display: flex !important;
    width: 100vw !important;
    max-width: none !important;
    height: calc(86px + env(safe-area-inset-bottom));
    margin: 0 !important;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom)) !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    border-top: 1px solid #e7eaf0;
    background: rgb(255 255 255 / 97%);
    box-shadow: 0 -8px 24px rgb(24 34 53 / 7%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  body.product-page.pdp-mobile-3d-open .gallery-thumbs::-webkit-scrollbar {
    display: none;
  }

  body.product-page.pdp-mobile-3d-open .gallery-thumb,
  body.product-page.pdp-mobile-3d-open .gallery-thumb--360-slot {
    flex: 0 0 62px !important;
    width: 62px !important;
    height: 62px !important;
    border: 1px solid #e0e4eb;
    border-radius: 8px;
    background: #fff;
  }

  body.product-page.pdp-mobile-3d-open .gallery-thumb.active {
    border-color: #4c5be8;
    box-shadow: 0 0 0 1px #4c5be8;
  }

  body.product-page.pdp-mobile-3d-open .gallery-thumb img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
}
