/* Screenshot galleries: the shot-grid / shot / shot-hero / shot-caption blocks
   on product.html, loader.html and the guide pages. Those pages carry a small
   inline fallback; this file is the real treatment and loads after it. Nothing
   here matches outside those class names, so pages without a gallery are
   untouched. */

.shot-grid,
.shot {
  --shot-radius: 12px; /* same tile radius as .product-tile in pages.css */
  --shot-border: var(--site-border, 1px solid rgba(255, 255, 255, .08));
  --shot-border-hover: 1px solid var(--border-muted, rgba(255, 255, 255, .12));
  --shot-shadow-hover: var(--site-shadow-md, 0 4px 16px rgba(0, 0, 0, .4));
}

/* ---- grid ---- */
/* 420px minimum keeps the tiles two-up on the widest page shell (1240px) and
   never leaves an empty third track for the two-shot rows these pages use. */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--sp-4, 16px);
  align-items: start;
  width: 100%;
  margin: 0;
}

@media (min-width: 641px) {
  .shot-grid { gap: var(--sp-5, 20px); }
}

@media (min-width: 1025px) {
  .shot-grid { gap: var(--sp-6, 24px); }
}

@media (max-width: 700px) {
  .shot-grid { grid-template-columns: 1fr; gap: var(--sp-4, 16px); }
}

/* ---- tile ---- */
.shot {
  margin: 0;
  min-width: 0;
  transition: transform .18s ease;
}

.shot img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: var(--shot-border);
  border-radius: var(--shot-radius);
  background: var(--bg-card, #0c1022);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.shot-hero {
  grid-column: 1 / -1;
}

/* The hero runs the full grid width; its height is capped so a tall menu shot
   cannot push the rest of the gallery off screen. */
.shot-hero img {
  max-height: min(560px, 72vh);
  object-fit: cover;
  object-position: top center;
}

/* A single trailing shot (hero plus one) takes the whole row instead of
   leaving half the grid empty. */
.shot-grid > .shot:not(.shot-hero):nth-of-type(2):last-of-type {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .shot-hero img { max-height: none; }
}

/* Same lift and border brighten as .product-tile, only where a pointer hovers. */
@media (hover: hover) and (pointer: fine) {
  .shot:hover { transform: translateY(-2px); }
  .shot:hover img {
    border: var(--shot-border-hover);
    box-shadow: var(--shot-shadow-hover);
  }
}

/* ---- caption ---- */
.shot-caption {
  display: block;
  margin-top: 10px;
  color: var(--color-muted, #9aa2b1);
  font-size: var(--fs-sm, 13px);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .shot,
  .shot img { transition: none; }
  .shot:hover { transform: none; }
}
