
/* Interactive artwork photo viewer */
.item-photo-stack { min-width: 0; }
.photo-viewer-trigger {
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}
.photo-viewer-trigger:disabled { cursor: default; }
.photo-viewer-trigger img { display: block; }
.photo-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(20, 22, 21, .72);
  font-size: .72rem;
  font-weight: 650;
  backdrop-filter: blur(6px);
}
.item-photo-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}
.item-photo-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0;
  background: #ece9e2;
  cursor: zoom-in;
}
.item-photo-thumb.active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.item-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

body.photo-viewer-open { overflow: hidden; }
.photo-viewer[hidden] { display: none; }
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: #f7f7f5;
}
.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 11, .96);
}
.photo-viewer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.photo-viewer-toolbar {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding: 8px 14px;
  background: rgba(12, 13, 13, .78);
}
.photo-viewer-counter { justify-self: start; font-variant-numeric: tabular-nums; font-weight: 650; }
.photo-viewer-controls { display: flex; align-items: center; gap: 6px; }
.photo-viewer-toolbar button,
.photo-viewer-footer button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  padding: 7px 11px;
  color: inherit;
  background: rgba(255,255,255,.07);
  cursor: pointer;
}
.photo-viewer-toolbar button:hover,
.photo-viewer-footer button:hover { background: rgba(255,255,255,.14); }
.photo-viewer-toolbar button:focus-visible,
.photo-viewer-footer button:focus-visible,
.photo-viewer-stage:focus-visible {
  outline-color: #fff;
}
.photo-viewer-close {
  justify-self: end;
  font-size: 1.45rem;
  line-height: 1;
}
.photo-viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  outline: none;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.photo-viewer-stage:active { cursor: grabbing; }
.photo-viewer-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  translate: -50% -50%;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.photo-viewer-error {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100% - 48px));
  translate: -50% -50%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  padding: 24px;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.06);
  text-align: center;
}
.photo-viewer-nav {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 64px;
  translate: 0 -50%;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 5px;
  color: #fff;
  background: rgba(10,11,11,.55);
  font-size: 2rem;
  cursor: pointer;
}
.photo-viewer-nav.prev { left: 14px; }
.photo-viewer-nav.next { right: 14px; }
.photo-viewer-footer {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 8px 14px 10px;
  color: rgba(255,255,255,.68);
  background: rgba(12, 13, 13, .78);
  font-size: .72rem;
}
.photo-viewer-footer p { margin: 0; white-space: nowrap; }
.photo-viewer-thumbs {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
}
.photo-viewer-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 44px;
  overflow: hidden;
  padding: 0 !important;
}
.photo-viewer-thumb.active {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff;
}
.photo-viewer-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 780px) {
  .photo-zoom-hint { right: 9px; bottom: 9px; }
  .item-photo-thumb { flex-basis: 58px; width: 58px; height: 48px; }
  .photo-viewer-toolbar {
    min-height: 58px;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 6px;
    padding: 7px 8px;
  }
  .photo-viewer-controls {
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
  }
  .photo-viewer-toolbar button {
    min-width: 44px;
    min-height: 44px;
    padding: 7px 9px;
  }
  .photo-viewer-controls [data-photo-fit],
  .photo-viewer-controls [data-photo-actual] { font-size: .68rem; }
  .photo-viewer-nav {
    top: auto;
    bottom: 14px;
    width: 46px;
    height: 52px;
    translate: 0;
  }
  .photo-viewer-nav.prev { left: 8px; }
  .photo-viewer-nav.next { right: 8px; }
  .photo-viewer-footer {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 6px 8px 8px;
  }
  .photo-viewer-footer p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .photo-viewer-thumb { flex-basis: 52px; width: 52px; height: 42px; }
}
.photo-unavailable::after{content:"—";display:grid;place-items:center;min-height:44px;color:var(--muted)}
