/* The controls share the bounds of the actual picture. The outer slot keeps
   the thumbnail rail still when switching between portrait and wide photos. */
.store-gallery { min-width: 0; container-type: inline-size; }
.store-photo-slot {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.store-gallery .store-photo-stage {
  width: min(100%, calc(75cqw * var(--photo-aspect)));
  position: relative;
  margin: 0;
  background: transparent;
}
.store-photo-stage figure { margin: 0; }
.store-gallery .store-photo-open {
  display: block;
  width: 100%;
  aspect-ratio: var(--photo-aspect);
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.store-gallery .store-photo-open img,
.store-photo-dialog .store-photo-full {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.store-photo-stage .store-photo-caption,
.store-photo-dialog .store-photo-caption {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 48px 112px 16px 18px;
  color: white;
  background: linear-gradient(transparent, rgba(0,0,0,.77));
  font: 400 13px/1.35 Onest, "Segoe UI", sans-serif;
  pointer-events: none;
}
.store-photo-stage .store-photo-arrows,
.store-photo-dialog .store-photo-arrows {
  position: absolute;
  right: 13px;
  bottom: 12px;
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
}
.store-photo-arrows > button,
.store-photo-dialog .store-photo-close {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 37px;
  height: 37px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #92988d;
  color: #f6f8f2;
  background: #10160fe8;
  font: 26px/1 Onest, "Segoe UI", sans-serif;
  cursor: pointer;
}
.store-photo-arrows > button:hover, .store-photo-close:hover { background: #273123; }
.store-photo-arrows > button:focus-visible, .store-photo-close:focus-visible,
.store-photo-open:focus-visible { outline: 2px solid #c5f468; outline-offset: -2px; }
.store-gallery :is(.oc-thumbs,.gp-thumbs) { margin-top: 10px; }
.store-gallery :is(.oc-thumbs,.gp-thumbs) img { object-fit: contain; background: transparent; }

dialog.store-photo-dialog {
  position: fixed;
  inset: 0;
  box-sizing: content-box;
  margin: auto;
  width: min(94vw, 1300px, calc(88vh * var(--photo-aspect)));
  width: min(94vw, 1300px, calc(88dvh * var(--photo-aspect)));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  color: white;
  background: #101510;
}
.store-photo-dialog::backdrop { background: rgb(0 0 0 / .85); }
.store-photo-dialog .store-photo-full {
  aspect-ratio: var(--photo-aspect);
  height: auto;
  max-height: none;
  margin: 0;
}
.store-photo-dialog .store-photo-close {
  position: absolute;
  top: 10px;
  right: 10px;
}
.store-photo-dialog .store-photo-count {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  color: white;
  background: #10160fe8;
  font-size: 13px;
}
@media (max-width: 700px) {
  .store-photo-stage .store-photo-caption, .store-photo-dialog .store-photo-caption {
    font-size: 11px;
    padding-right: 115px;
  }
}
@media (pointer: coarse) {
  .store-photo-arrows > button, .store-photo-dialog .store-photo-close { width: 44px; height: 44px; }
}
