.amazon-product-zoom-shell {
  position: relative;
  width: 100%;
}

.amazon-product-zoom-stage {
  cursor: default;
}

.amazon-product-zoom-lens,
.amazon-product-zoom-preview {
  display: none;
}

.amazon-image-popup-layout {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.amazon-image-popup-viewport {
  min-width: 0;
  min-height: 0;
  flex-shrink: 0;
}

.amazon-image-popup-thumbnails {
  width: 96px;
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 58px 10px 12px;
  border-left: 1px solid #e5e7eb;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.amazon-image-popup-thumbnails button img {
  display: block;
}

@media (max-width: 640px) {
  .amazon-image-popup-layout {
    flex-direction: column;
  }

  .amazon-image-popup-viewport {
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .amazon-image-popup-thumbnails {
    width: 100%;
    height: 92px;
    flex: 0 0 92px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 8px 12px;
    border-left: 0;
    border-top: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
  }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .amazon-product-zoom-stage {
    cursor: crosshair;
  }

  .amazon-product-zoom-lens {
    display: block;
    position: absolute;
    width: 28%;
    height: 28%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(60, 60, 60, .55);
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .7);
    pointer-events: none;
  }

  .amazon-product-zoom-preview {
    display: block;
    position: absolute;
    top: 0;
    left: calc(100% + 16px);
    width: min(520px, calc(100vw - 48px));
    height: min(520px, calc(100vh - 80px));
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
    pointer-events: auto;
  }
}
