/* Zone3Dplus v35.4 — ONE stage-0 thumbnail presentation layer.
   Restores Phase 2E's 120px desktop sizing, Phases 2F+2G's fit and neutral
   contrast, and Phase 2H's overlay positioning, without layering flashes.
   The original interactive image and View 3D button stay in place. */
@media (min-width:1201px) {
  #m3dreader.step-0 .m3dreader__mini-cart--model-list > .m3dreader__model-item:not(.loading) .m3dreader__model-item--wrap {
    grid-template-columns:120px minmax(0,1fr) !important;
    grid-template-rows:minmax(36px,auto) minmax(25px,auto) minmax(33px,auto) minmax(42px,1fr) !important;
    gap:5px 12px !important;
    min-height:0 !important;
    padding:12px !important;
  }
  #m3dreader.step-0 .m3dreader__mini-cart--model-list > .m3dreader__model-item:not(.loading) .m3dreader__model-icon {
    width:120px !important;flex-basis:120px !important;
  }
  #m3dreader.step-0 .m3dreader__mini-cart--model-list > .m3dreader__model-item:not(.loading) .m3dreader__model-icon--img {
    width:120px !important;height:120px !important;object-fit:contain !important;
  }
}
#m3dreader.step-0 #m3dreader__model--uploaded .z3d2c-thumb-shell {
  position:relative !important;isolation:isolate;
}
/* The native thumbnail is ALWAYS visible while the crop is loading or fails.
   Only swap it visually after the fitted layer has actually been inserted. */
#m3dreader.step-0 #m3dreader__model--uploaded
  .m3dreader__model-item:not(.loading) .z3d2c-thumb-shell:has(> .z3d36-fit-layer) > img.m3dreader__model-preview[data-file_id] {
  opacity: 0 !important;
}
#m3dreader.step-0 #m3dreader__model--uploaded .z3d2c-thumb-shell > .z3d36-fit-layer {
  position:absolute !important;display:block !important;left:0 !important;top:0 !important;
  width:100% !important;height:auto !important;aspect-ratio:1/1 !important;
  object-fit:contain !important;border-radius:12px !important;
  box-sizing:border-box !important;pointer-events:none !important;
  user-select:none !important;z-index:2 !important;
}
#m3dreader.step-0 #m3dreader__model--uploaded .z3d2c-thumb-shell > .z3d2c-viewer-trigger {
  position:relative !important;z-index:3 !important;
}
/* Outside Upload, the native model thumbnails remain the original source;
   no secondary copied previews appear on Material/Finishing/Color/Quote. */
#m3dreader:not(.step-0) .z3d36-fit-layer {display:none !important;}
