/* Only loaded on the UVC module and waterproof lamp detail pages. */
.product-hero-grid:has(.uvc-demo--module) .touch-hero-photo > a {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  container-type: size;
  box-sizing: content-box;
  height: clamp(240px, 20vw, 290px);
}

/* Swap the available axes before turning the photo, so contain keeps every edge. */
.product-hero-grid:has(.uvc-demo--module) .touch-hero-photo > a > img {
  width: 100cqh;
  height: 100cqw;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform: rotate(90deg);
}

/* The new lamp photograph is already horizontal, with the leads on the left. */
.product-hero-grid:has(.uvc-demo--lamp) .touch-hero-photo img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
}

:is(.uvc-demo--module, .uvc-demo--lamp) .uvc-demo-enclosure {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  container-type: inline-size;
  padding: 38px 12px 20px;
  height: 252px;
}

.uvc-demo--lamp .uvc-demo-enclosure { height: 150px; }

/* Rotate the assembly as one piece, including emitters, glows, base and cable. */
:is(.uvc-demo--module, .uvc-demo--lamp) .uvc-demo-assembly {
  width: max-content;
  height: min(234px, calc(100cqw - 12px));
  transform: rotate(90deg);
}
