/* One opaque folio is the moving page. It occupies the original main/footer
   grid tracks, so adding the track never creates another screen of content. */
#product-dialog .dialog-product-viewport {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2 / 4;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  contain: layout paint;
}
#product-dialog .dialog-product-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--folio-bg, #0b100d);
}
#product-dialog .dialog-product-preview { z-index: 1; }
/* The image stage keeps its more specific pan-y / glaze:none touch policy. */
@media (max-width: 760px), (max-width: 1100px) and (max-height: 500px) {
  #product-dialog { touch-action: pan-y; }
  #product-dialog.is-exterior-swiping { user-select: none; -webkit-user-select: none; }
  #product-dialog.is-exterior-swiping .dialog-product-page,
  #product-dialog.is-exterior-settling .dialog-product-page { will-change: transform; }
}
