/* Interactive model and note, scoped to the homepage product showcase. */
.collar-showcase#product-3d {
  position: relative;
  scroll-margin-top: 76px;
  min-height: 560px;
  padding-top: 50px;
  padding-bottom: 50px;
}
.collar-showcase#product-3d .showcase-device { min-height: 360px; }
.collar-showcase#product-3d .showcase-device::before { width: calc(min(520px, 44vw) + 10px); }
.collar-showcase#product-3d .showcase-model-note {
  position: absolute;
  right: 24px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 48px);
  margin: 0;
  color: #687784;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: right;
}
.collar-showcase .showcase-model {
  position: relative;
  z-index: 1;
  width: min(660px, 53vw);
  height: auto;
  aspect-ratio: 760 / 470;
  background: transparent;
  transform: rotate(-7deg);
  filter: drop-shadow(0 32px 22px rgba(32, 83, 119, .18));
}
.collar-showcase .showcase-device .showcase-model__poster,
.collar-showcase .showcase-model model-viewer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: none;
  filter: none;
  object-fit: contain;
  transition: opacity 160ms ease;
}
.collar-showcase .showcase-model__poster { pointer-events: none; }
.collar-showcase .showcase-model model-viewer {
  /* A square render surface fits the long side even at a vertical camera angle.
     Keep it out of layout so the section and poster retain their approved size. */
  inset: 50% 0 auto;
  height: auto;
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0;
  cursor: grab;
  --poster-color: transparent;
}
.collar-showcase .showcase-model model-viewer:active { cursor: grabbing; }
.collar-showcase .showcase-model model-viewer::part(default-progress-bar) { display: none; }
.collar-showcase .showcase-model[data-state="ready"] model-viewer { opacity: 1; }
.collar-showcase .showcase-model[data-state="ready"] .showcase-model__poster { opacity: 0; }
@media (max-width: 720px) {
  .collar-showcase#product-3d {
    scroll-margin-top: 66px;
    min-height: 580px;
    padding-top: 32px;
    padding-bottom: 56px;
  }
  .collar-showcase#product-3d .showcase-device { min-height: 270px; }
  .collar-showcase#product-3d .showcase-device::before { width: 290px; }
  .collar-showcase .showcase-model { width: 110%; }
  .collar-showcase#product-3d .showcase-model-note {
    right: 20px;
    bottom: 10px;
    max-width: calc(100% - 40px);
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .collar-showcase .showcase-model model-viewer,
  .collar-showcase .showcase-model__poster { transition: none; }
}
