/* v27: stable print-selection rows, including mobile Safari. */
.gallery-page .print-picker {
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.gallery-page .print-picker .print-choice {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 0;
  min-height: 0;
  padding: 125% 0 0;
  aspect-ratio: auto;
  align-self: start;
  margin: 0;
  background: #e9e1d5;
  border: 2px solid transparent;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}
.gallery-page .print-choice > .deferred-gallery-image {
  position: absolute;
  inset: 0 0 32px;
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  background: transparent;
  text-transform: none;
}
.gallery-page .print-choice .deferred-gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}
.gallery-page .print-choice > span:last-child {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 32px;
  padding: 7px 4px;
  font-size: 11px;
  line-height: 1.3;
}
.gallery-page .print-choice.selected { border-color: var(--clay); }
.gallery-page .print-order-button { max-width: 100%; white-space: normal; }
@media (max-width: 650px) {
  .gallery-page .print-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(65vh, 580px);
    gap: 12px;
  }
}
