.photobank-month-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.page .photobank-month-heading h1 { margin: 0; }

.photobank-price {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
  white-space: nowrap;
}

.photobank-months .btn { gap: .5em; }
.photobank-months small { color: var(--muted); white-space: nowrap; }

.photobank-month-layout {
  display: grid;
  grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.photobank-carousel {
  min-width: 0;
  width: 100%;
  max-width: 23rem;
}

.photobank-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.photobank-controls .btn {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  font-size: 1.2rem;
}

.photobank-controls [aria-disabled="true"] {
  opacity: .56;
  cursor: default;
  background: var(--lavender-light);
}

.photobank-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.photobank-slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  list-style: none;
  border-radius: var(--radius);
  background: var(--lavender-light);
}

.photobank-slides::-webkit-scrollbar { display: none; }

.photobank-slides li {
  min-width: 0;
  scroll-snap-align: start;
}

.photobank-slides img {
  width: 100%;
  aspect-ratio: 1290 / 2293;
  object-fit: contain;
}

.photobank-tile {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--lavender-light);
  cursor: zoom-in;
}

.photobank-tile:focus-visible { outline-offset: -4px; }

.photobank-viewer {
  width: min(94%, 34rem);
  max-height: 94dvh;
  margin: auto;
  padding: clamp(.65rem, 2vw, 1rem);
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.photobank-viewer::backdrop { background: #281342b3; }

.photobank-viewer-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .6rem;
  margin-bottom: .65rem;
  text-align: center;
}

.photobank-viewer-controls .btn {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  font-size: 1.25rem;
}

.photobank-viewer-photo {
  width: auto;
  max-width: 100%;
  max-height: min(76dvh, calc(100dvh - 7rem));
  margin-inline: auto;
  border-radius: calc(var(--radius) / 2);
  object-fit: contain;
}

.photobank-description {
  display: grid;
  gap: 1.5rem;
}

.photobank-description h2 {
  margin-bottom: .55rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.photobank-description ul {
  margin: .55rem 0 0;
  padding-inline-start: 1.1rem;
}

.photobank-description li + li { margin-top: .3rem; }
.photobank-description .btn { margin-top: .9rem; }

@media (max-width: 43rem) {
  .photobank-month-layout { grid-template-columns: minmax(0, 1fr); }
  .photobank-carousel { justify-self: center; }
}

@media (min-width: 64rem) {
  .page:has(.photobank-month) { padding-block: 1.75rem 3rem; }
  .photobank-month-heading h1 { font-size: clamp(2.6rem, 4vw, 3.5rem); }

  .photobank-month-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .photobank-carousel { max-width: none; }
  .photobank-controls { display: none; }

  .photobank-slides {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(.7rem, 1.1vw, 1rem);
    overflow: visible;
    scroll-snap-type: none;
    border-radius: 0;
    background: transparent;
  }

  .photobank-tile:hover { box-shadow: 0 0 0 2px var(--lavender); }

  .photobank-description {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.2rem, 4vw, 3rem);
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }
}
