/* Final responsive pass for the home page. Kept after the editorial layers. */
@media (max-width: 800px) {
  .books .catalog-carousel,
  .books .books-grid,
  .books .catalog-card,
  .books .catalog-media,
  .books .catalog-info { min-width: 0; }
  .books .books-grid { scroll-padding-inline: 0; }
  .books .catalog-card { width: 100%; box-sizing: border-box; }
  .books .catalog-thumbs { width: 100%; max-width: 100%; overflow-x: auto; justify-content: flex-start; scrollbar-width: thin; padding-bottom: 5px; }
  .books .catalog-thumb { flex: 0 0 auto; }
  .books .catalog-title { overflow-wrap: break-word; }
  .books .catalog-price-grid { width: 100%; }
  .books .catalog-actions { width: 100%; }
  .books .catalog-actions a { min-height: 48px; text-align: center; }
  .repertoire-intro h2 { overflow-wrap: normal; }
}
@media (max-width: 550px) {
  .books .section-heading,
  .authors .section-heading { padding-bottom: 28px; margin-bottom: 28px; }
  .books .section-heading h2,
  .authors .section-heading h2 { font-size: clamp(43px, 11vw, 58px); line-height: .93; letter-spacing: -.065em; }
  .books .catalog-media { align-items: stretch; }
  .books .catalog-image-wrap { width: 100%; }
  .books .catalog-info { align-items: stretch; }
  .books .catalog-author { margin-bottom: 12px; }
  .books .catalog-title,
  .books .catalog-card-pachakuti .catalog-title { font-size: clamp(38px, 10vw, 50px); line-height: .97; letter-spacing: -.04em; }
  .books .catalog-price-option { min-width: 0; }
  .books .catalog-actions a { flex: 1 1 0; white-space: normal; line-height: 1.25; }
  .repertoire-intro h2 { font-size: clamp(39px, 10.3vw, 56px); line-height: .96; letter-spacing: -.065em; }
  .repertoire-intro h2 em { letter-spacing: -.06em; }
  .repertoire-intro { min-height: 0; padding-bottom: 10px; }
  .books .catalog-payment-method { min-width: 0; }
  .books .catalog-payment-method > span { min-width: 0; }
  .books .catalog-payment-method:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-content: center; }
  .books .catalog-payment-method:last-child > span { grid-column: 1; grid-row: 1; }
  .books .catalog-payment-method:last-child .payment-lock { grid-column: 2; grid-row: 1; align-self: start; margin: 0; }
  .books .catalog-payment-method:last-child .payment-brand-icons { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 360px) {
  .books .catalog-price-grid { grid-template-columns: 1fr; }
  .books .catalog-price-option { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; }
  .books .catalog-price-option small { grid-column: 1 / -1; }
  .books .catalog-actions { display: grid; grid-template-columns: 1fr; }
  .books .catalog-actions a { width: 100%; }
  .books .catalog-title,
  .books .catalog-card-pachakuti .catalog-title { font-size: 37px; }
  .repertoire-intro h2 { font-size: 38px; }
}

/* Keep one complete book in view and give every slide the same footprint. */
.books .catalog-carousel { max-width: 1280px; }
.books .books-grid { align-items: stretch; gap: 24px; padding-bottom: 12px; }
.books .catalog-card { flex: 0 0 100%; max-width: none; min-height: 570px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.books .catalog-media { justify-content: center; }
.books .catalog-image-wrap,
.books .catalog-card-pachakuti .catalog-image-wrap { height: min(42vw, 450px); max-height: 450px; aspect-ratio: auto; }
.books .catalog-image { min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; }

@media (min-width: 801px) and (max-width: 1100px) {
  .books .catalog-card-pachakuti .catalog-thumbs { gap: 8px; }
  .books .catalog-card-pachakuti .catalog-thumb { width: 46px; height: 60px; }
}
@media (max-width: 800px) {
  .books .catalog-card { min-height: 0; grid-template-columns: 1fr; }
  .books .catalog-image-wrap,
  .books .catalog-card-pachakuti .catalog-image-wrap { height: min(70vw, 430px); max-height: 430px; }
}
@media (max-width: 550px) {
  .books .catalog-image-wrap,
  .books .catalog-card-pachakuti .catalog-image-wrap { height: min(105vw, 410px); max-height: 410px; }
}
