/* Additive refinements kept separate from the core design sheet for easier upgrades. */
.card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.book-card-cover { display: block; align-self: start; min-width: 0; overflow: hidden; background-color: transparent !important; }
.book-card-cover img { display: block; width: 100%; height: auto !important; max-height: none; object-fit: contain !important; }
.book-card-cover.square-art { display: grid; place-items: center; aspect-ratio: 2/3; background-color: var(--cover-color,#e3ded6) !important; }
.book-card-cover.square-art img { width: 100%; height: auto !important; max-height: none; }
.main-cover { object-fit: contain; }
.cover-image-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; }
.cover-actions button { flex: 1; border: 1px solid #8e887e; padding: 9px; text-align: center; background: #fff; border-radius: 4px; color: inherit; }
.cover-modal { width: min(92vw, 760px); height: min(92vh, 920px); padding: 0; border: 0; background: transparent; overflow: visible; }
.cover-modal::backdrop { background: rgba(20,18,15,.82); backdrop-filter: blur(2px); }
.cover-modal-inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0,1fr) auto; place-items: center; padding: 24px; background: #f7f3e9; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.cover-modal img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.cover-modal p { margin: 13px 44px 0; text-align: center; color: #5a5a5a; }
.cover-modal-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 38px; height: 38px; border: 1px solid #8e887e; border-radius: 50%; background: #fff; color: #2b2b2b; font-size: 1.55rem; line-height: 1; }
.hero-book-without-quote .hero-content { grid-template-columns: minmax(0,1.25fr) minmax(240px,.75fr); }
.hero-book-without-quote .hero-product { justify-self: center; }
.bundle-collage,.bundle-visual { display: grid; place-items: center; isolation: isolate; padding: 32px 24px; }
.bundle-collage img:not(.bundle-custom-image),.bundle-visual img:not(.bundle-custom-image) { position: relative; grid-area: 1/1; left: auto; top: auto; width: var(--cover-width,35%); height: auto; max-height: 82%; object-fit: contain; transform: translateX(calc(var(--offset) * 62%)) rotate(calc(var(--offset) * 3deg)); transform-origin: center bottom; z-index: calc(var(--i) + 1); box-shadow: 0 14px 24px rgba(29,23,17,.23); }
.bundle-card { grid-template-columns: minmax(240px,46%) minmax(0,1fr); }
.genre-directory { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; padding-block: 32px 46px; }
.genre-directory .genre-tile { display: flex; min-width: 0; min-height: 138px; flex-direction: column; justify-content: center; padding: 18px; background: #fff; border: 1px solid var(--line); }
.genre-directory .genre-tile:hover { border-color: #1a4b7a; box-shadow: 0 7px 18px rgba(46,37,24,.08); }
.genre-directory .genre-tile h2 { margin: 5px 0 10px; font-size: 1.05rem; line-height: 1.18; }
.genre-directory .genre-icon { font-size: 1.15rem; }
.genre-directory .text-link { margin-top: auto; font-size: .8rem; }
.genre-shelf { padding: 44px 0 52px; border-top: 1px solid var(--line); }
.genre-shelf.alternate { background: #eee8dc; }
.genre-shelf .section-heading { margin-bottom: 22px; }
@media (max-width: 1100px) { .genre-directory { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 650px) { .genre-directory { grid-template-columns: repeat(2,minmax(0,1fr)); } .genre-directory .genre-tile { min-height: 118px; padding: 14px; } }
.stacked-edition-details { display: grid; gap: 3px; margin-top: 13px; color: #5a5a5a; }
.stacked-edition-details strong { color: #2b2b2b; }
.audio-sample { margin-top: 18px; padding-top: 15px; border-top: 1px solid #ddd7cc; }
.audio-sample audio { width: 100%; margin-top: 7px; }
.embedded-payment { max-width: 1050px; padding-block: 35px 70px; }
.embedded-payment-frame { min-height: 620px; background: #fff; border: 1px solid #ddd7cc; padding: 20px; }
.payment-fallback { padding: 20px; border: 1px solid #c45a3a; background: #fff8f4; }
.browser-player { margin-top: 28px; padding: 22px; border: 1px solid #ddd7cc; background: #fff; }
.browser-player audio { width: 100%; }
.player-options { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.player-options label { display: grid; gap: 4px; font-weight: 600; }
.player-options select { min-width: 145px; padding: 7px; border: 1px solid #aaa; background: #fff; }
@media (max-width: 1180px) { .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .hero-book-without-quote .hero-content { grid-template-columns: minmax(0,1fr) 220px; } }
@media (max-width: 650px) { .card-grid { grid-template-columns: 1fr; } .hero-book-without-quote .hero-content { grid-template-columns: 1fr; } }

/* Homepage color rhythm and unified discovery/newsletter band. */
.site-header { will-change: height; }
.brand img { transition: width .22s ease; }
.featured-home { background: #fff; border-bottom: 1px solid rgba(216,209,197,.7); }
.home-section-new { background: var(--paper); }
.home-section-best { background: #eee8dc; }
.home-section-sale { background: #fff; }
.home-section-bundles { background: var(--paper); }

.discovery-band {
    display: grid;
    grid-template-columns: repeat(12,minmax(0,1fr));
    min-height: 206px;
    margin-block: 34px 62px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0;
}
.discovery-band h2 { font-family: Literata,Georgia,serif; font-size: 1.08rem; font-weight: 400; line-height: 1.22; margin: 0 0 9px; }
.discovery-band p { margin: 0 0 14px; color: var(--muted); font-size: .79rem; line-height: 1.45; }
.discovery-band > * { min-width: 0; border-right: 1px solid var(--line); }
.discovery-band > *:last-child { border-right: 0; }
.discovery-categories { grid-column: span 3; display: flex; flex-direction: column; padding: 25px 27px 22px; }
.discovery-category-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 9px 0 20px; }
.discovery-category-links a { display: grid; justify-items: center; align-content: start; gap: 5px; min-width: 0; color: #4f4b45; font-size: .68rem; line-height: 1.15; text-align: center; }
.discovery-category-links a:hover { color: var(--terra-dark); }
.discovery-category-links .genre-icon { font-size: 1.45rem; line-height: 1; color: var(--terra); }
.discovery-categories > .text-link { margin-top: auto; font-size: .76rem; }
.discovery-new { grid-column: span 2; display: flex; flex-direction: column; padding: 24px 25px 22px; background: #173e32; color: #fff; }
.discovery-new:hover { background: #113329; }
.discovery-new h2 { color: #fff; font-size: 1.22rem; }
.discovery-new p { color: #e2e9e4; }
.discovery-leaf { display: block; margin-bottom: 6px; color: #d1aa54; font-family: Literata,Georgia,serif; font-size: 1.65rem; line-height: 1; transform: rotate(-12deg); transform-origin: left center; }
.discovery-new-link { margin-top: auto; font-size: .76rem; font-weight: 600; }
.discovery-visual { grid-column: span 2; min-height: 205px; padding: 0; background: #cdb699; }
.discovery-visual img { width: 100%; height: 100%; object-fit: cover; }
.discovery-note { grid-column: span 2; display: flex; flex-direction: column; justify-content: center; padding: 21px 24px; }
.discovery-shop { width: 72px; height: auto; margin: 0 0 10px; fill: none; stroke: #8c795e; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.discovery-note .text-link { font-size: .76rem; }
.discovery-newsletter { grid-column: span 3; display: flex; flex-direction: column; justify-content: center; padding: 23px 26px; background: #fffdf9; }
.discovery-newsletter form { display: flex; width: 100%; margin: 2px 0 7px; }
.discovery-newsletter input { flex: 1; min-width: 0; height: 42px; padding: 9px 11px; background: #fff; border: 1px solid #c9c1b5; border-right: 0; outline: 0; }
.discovery-newsletter input:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.discovery-newsletter .button { min-height: 42px; padding-inline: 14px; border-radius: 0; font-size: .78rem; }
.discovery-newsletter small { color: var(--muted); font-size: .67rem; }

@media (max-width: 1180px) {
    .discovery-categories { grid-column: span 6; border-bottom: 1px solid var(--line); }
    .discovery-new,.discovery-visual { grid-column: span 3; border-bottom: 1px solid var(--line); }
    .discovery-note,.discovery-newsletter { grid-column: span 6; }
    .discovery-note { display: grid; grid-template-columns: 88px 1fr; align-items: center; }
    .discovery-shop { margin: 0; }
}
@media (max-width: 900px) {
    .site-header.is-slim { height: 74px; }
    .site-header.is-slim .brand img { width: 82px; }
    .discovery-categories { grid-column: span 12; }
    .discovery-new,.discovery-visual,.discovery-note { grid-column: span 4; border-bottom: 1px solid var(--line); }
    .discovery-note { display: flex; align-items: flex-start; }
    .discovery-newsletter { grid-column: span 12; }
}
@media (max-width: 650px) {
    .brand img { transition: none; }
    .discovery-band { display: block; }
    .discovery-band > * { border-right: 0; border-bottom: 1px solid var(--line); }
    .discovery-band > *:last-child { border-bottom: 0; }
    .discovery-categories,.discovery-new,.discovery-note,.discovery-newsletter { padding: 22px; }
    .discovery-category-links { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    .discovery-category-links a { grid-template-columns: 27px 1fr; justify-items: start; align-items: center; text-align: left; font-size: .78rem; }
    .discovery-visual { height: 190px; min-height: 190px; }
    .discovery-note { display: grid; grid-template-columns: 80px 1fr; align-items: center; }
    .discovery-newsletter form { display: flex; }
}
