.product-gallery {
  --thumb-size: clamp(48px, 5vw, 68px);
  --gallery-gap: 8px;
  --gallery-surface: #f5f3f1;
  align-self: start;
  min-width: 0;
  display: grid;
  grid-template-columns: calc(var(--thumb-size) + 12px) minmax(0, 1fr);
  grid-template-areas: "rail stage";
  gap: var(--gallery-gap);
}
.product-gallery-stage {
  grid-area: stage;
  aspect-ratio: 7 / 6;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: clamp(10px, 1.2vw, 18px) clamp(12px, 1.5vw, 22px);
  border-radius: 16px;
  background: var(--gallery-surface);
}
.product-gallery-stage > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.product-gallery-rail { grid-area: rail; position: relative; min-width: 0; }
.product-gallery-thumbs {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gallery-gap);
  padding: 3px;
  scrollbar-width: thin;
}
.product-gallery-thumb {
  flex: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  display: block;
  padding: 3px;
  background: var(--gallery-surface);
  border: 1px solid #c6c0c2;
  border-radius: 10px;
  touch-action: manipulation;
}
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.product-gallery-thumb:hover { border-color: var(--ink); }
.product-gallery-thumb[aria-current] { border: 3px solid var(--ink); padding: 1px; }
.product-gallery-thumb:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 1px; }
@media (max-width: 600px) {
  .product-gallery {
    --thumb-size: 54px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "stage" "rail";
  }
  .product-gallery-thumbs { position: static; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
}
