/* XR Product Gallery — light, spacious product photography aesthetic */
.xrpg {
  --xrpg-bg: #f5f5f7;
  --xrpg-border: #e2e3e8;
  --xrpg-accent: #481c87;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  background: var(--xrpg-bg);
}
.xrpg--single { grid-template-columns: minmax(0, 1fr); }
.xrpg, .xrpg * { box-sizing: border-box; }
.xrpg-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: center;
  max-height: 68vh;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 3px;
}
.xrpg-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  padding: 5px;
  border: 1px solid var(--xrpg-border);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: border-color 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}
.xrpg-thumb:hover { opacity: 1; border-color: #94909e; }
.xrpg-thumb.is-selected {
  border-color: var(--xrpg-accent);
  box-shadow: 0 0 0 1px var(--xrpg-accent);
  opacity: 1;
}
.xrpg-thumb:focus-visible, .xrpg-zoom:focus-visible {
  outline: 2px solid var(--xrpg-accent);
  outline-offset: 3px;
}
.xrpg .xrpg-thumb img.xrpg-thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  margin: 0;
  box-shadow: none;
}
.xrpg-stage {
  position: relative;
  min-width: 0;
  height: clamp(350px, 70vh, 740px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.xrpg .xrpg-stage > img.xrpg-main-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transition: opacity 160ms ease;
}
.xrpg-main-image.is-changing { opacity: 0.25; }
.xrpg-zoom {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34373a;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--xrpg-border);
  border-radius: 3px;
  text-decoration: none;
  font: 500 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 10px 12px;
  transition: color 160ms ease, border-color 160ms ease;
}
.xrpg-zoom:hover { color: var(--xrpg-accent); border-color: var(--xrpg-accent); }
.xrpg-notice {
  padding: 14px 16px;
  font: 14px/1.5 system-ui, sans-serif;
  background: #f5f5f7;
  color: #34373a;
  border-left: 3px solid #481c87;
}
@media (max-width: 767px) {
  .xrpg { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .xrpg-stage {
    grid-row: 1;
    height: auto;
    min-height: 300px;
    aspect-ratio: 1 / 1;
  }
  .xrpg-thumbs {
    grid-row: 2;
    flex-direction: row;
    align-self: auto;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding: 3px 2px 10px;
    gap: 10px;
  }
  .xrpg-thumb { width: 64px; height: 64px; }
  .xrpg-zoom { bottom: 12px; right: 10px; padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .xrpg *, .xrpg *::before, .xrpg *::after { transition: none !important; }
}
