/* ---------------------------------------------------------------
   RARE SIGHT — product imagery

   Every garment is shown the same way: flat-laid, centred, on a clean
   white ground, contained rather than cropped so nothing gets cut off.
   Consistency is what makes a grid of very different pieces — a
   tracksuit next to a tee next to shorts — read as one line.

   `contain` means the garment never crops, but it also means the shot
   only fills the frame if it was taken to the spec in
   assets/products/README.txt. Off-spec shots will float in white.

   Until a file is dropped in, the image errors and .is-missing reveals
   a labelled fallback so the grid never shows a broken icon.
   --------------------------------------------------------------- */

.shot {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f4f4f4;
  overflow: hidden;
  cursor: zoom-in;
}

/* Every shot with a real image opens the full-size zoom viewer (zoom.js)
   on click — this magnifier hint is the only visual cue, so it needs to
   read clearly on hover. Hidden on the missing-image fallback, since
   there is nothing to zoom into yet. */
.shot::before,
.slot[data-slot="spotlight-main"]:has(> img)::before {
  content: '';
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 1;
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    #ffffff
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23111111" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="6.5"/><line x1="14.7" y1="14.7" x2="20" y2="20"/></svg>')
    center / 16px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}
.shot:hover::before,
.slot[data-slot="spotlight-main"]:hover::before { opacity: 1; transform: scale(1); }
.shot.is-missing::before { display: none; }

.slot[data-slot="spotlight-main"]:has(> img) { cursor: zoom-in; }

.shot__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6%;
  display: block;
  transition: opacity 0.35s ease;
}

/* Second angle, revealed on hover where the product has one. */
.shot__img--back { opacity: 0; }
.shot.has-back:hover .shot__img--back { opacity: 1; }
.shot.has-back:hover .shot__img:not(.shot__img--back) { opacity: 0; }

/* --- fallback -------------------------------------------------------
   Shown only when the file is not there yet.
   -------------------------------------------------------------------- */

.shot__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9a9a9a;
  background: repeating-linear-gradient(
    45deg,
    #f0f0f0 0 10px,
    #e9e9e9 10px 20px
  );
}
.shot.is-missing .shot__fallback { display: grid; }
.shot.is-missing .shot__img { display: none; }

@media (prefers-reduced-motion: reduce) {
  .shot__img { transition: none; }
}
