.cover-buy-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.cover-buy-link img {
  transition: transform .25s ease, box-shadow .25s ease;
}

.cover-buy-link::before {
  content: none;
}

.cover-buy-link:hover img {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(52, 27, 14, .24);
}

.cover-buy-link:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 7px;
}

.cover-buy-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  background: rgba(46, 21, 10, .92);
  color: #fff4d3;
  box-shadow: 0 12px 28px rgba(30, 12, 5, .3);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.book-sales-heading {
  margin-bottom: 22px;
}

.book-sales-heading h1 {
  margin-bottom: 12px;
}

.book-synopsis {
  margin-top: 34px;
  padding: 27px 28px;
  border: 1px solid rgba(125, 46, 32, .2);
  border-radius: 20px;
  background: rgba(255, 250, 241, .76);
  box-shadow: 0 15px 34px rgba(66, 35, 17, .08);
}

.book-synopsis h2 {
  margin: 8px 0 15px;
  color: var(--brown);
  font-size: clamp(30px, 3.2vw, 43px);
  font-weight: 400;
  line-height: 1;
}

.book-synopsis p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.book-synopsis p:last-child {
  margin-bottom: 0;
}

.book-distribution {
  padding: 78px 0;
  background: linear-gradient(145deg, #f3dfb9, #fbefd5);
}

.book-distribution .section-title {
  margin-bottom: 30px;
}

.book-distribution-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 24px;
  align-items: stretch;
}

.book-distribution .distribution-note,
.book-distribution .book-identifiers {
  max-width: none;
  margin: 0;
}

.book-distribution .distribution-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 25px 27px;
  font-size: 16px;
}

.book-distribution .book-identifiers {
  grid-template-columns: 1fr;
}

.book-distribution .book-identifiers > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.saint-hero-image-link {
  display: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.saint-hero-image-link::before {
  content: none;
}

.saint-hero-image-link::after {
  content: "Comprar tapa dura →";
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 12px;
  background: rgba(6, 25, 70, .9);
  color: #fff1c6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

html[lang="en"] .saint-hero-image-link::after {
  content: "Buy hardback →";
}

html[lang="fr"] .saint-hero-image-link::after {
  content: "Acheter l’édition reliée →";
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.perez-page .inner-hero {
  padding: 42px 0 88px;
}

body.perez-page .inner-hero .crumb {
  display: block;
}

body.perez-page .inner-hero .inner-grid {
  display: grid;
  grid-template-columns: minmax(330px, .82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(48px, 6vw, 82px);
}

body.perez-page .inner-hero .cover-buy-link {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

body.perez-page .inner-hero .cover-buy-link img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
}

.book-sales-content {
  width: min(100%, 980px);
  margin: 0 auto;
}

.book-sales-heading {
  text-align: center;
}

.book-sales-heading h1 {
  margin-top: 12px;
  font-size: clamp(54px, 6vw, 76px);
  line-height: .88;
}

.book-sales-heading .book-subtitle {
  margin-bottom: 0;
}

.book-sales-content .buy-accordion {
  margin-top: 0;
}

body.perez-page .book-sales-content {
  width: 100%;
  margin: 0;
}

body.perez-page .book-sales-heading {
  text-align: left;
}

body.perez-page .book-sales-heading h1 {
  font-size: clamp(60px, 6vw, 82px);
}

.hero-buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.hero-buy-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  padding: 13px 21px;
  border: 1px solid var(--wine);
  border-radius: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.hero-buy-actions .btn.secondary {
  margin-left: 0;
  background: rgba(255, 250, 241, .7);
}

.hero-format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-format-pills span {
  padding: 8px 12px;
  border: 1px solid rgba(125, 46, 32, .2);
  border-radius: 999px;
  background: rgba(255, 250, 241, .68);
  color: var(--brown);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.book-purchase-panel {
  margin-top: 44px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(125, 46, 32, .2);
  border-radius: 24px;
  background: rgba(255, 250, 241, .76);
  box-shadow: 0 20px 46px rgba(66, 35, 17, .1);
}

.book-purchase-panel .purchase-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.book-purchase-panel .purchase-intro h2 {
  margin: 7px 0 0;
  color: var(--brown);
  font-size: clamp(36px, 4.6vw, 58px);
  font-weight: 400;
  line-height: .95;
}

.book-purchase-panel .purchase-intro p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.book-purchase-panel .buy-accordion {
  max-width: none;
  margin-top: 0;
}

body.perez-page .book-synopsis {
  margin-top: 30px;
}

body.jara-page .inner-hero {
  padding: 42px 0 82px;
}

body.jara-page .inner-hero .inner-grid {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(48px, 6vw, 84px);
}

body.jara-page .inner-hero .jara-cover-buy {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px;
  transform: rotate(-1deg);
}

body.jara-page .inner-hero .jara-cover-buy img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f4e8d5;
}

body.jara-page .book-sales-content {
  width: 100%;
  margin: 0;
}

body.jara-page .book-sales-heading {
  margin-bottom: 0;
  text-align: left;
}

body.jara-page .book-sales-heading h1 {
  margin: 12px 0 19px;
  font-size: clamp(62px, 7vw, 92px);
  line-height: .82;
}

body.jara-page .jara-sales-lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

body.jara-page .jara-gallery-card img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.saint-page .saint-cinematic-hero {
  display: block;
  min-height: 0;
  padding: 0;
  background-color: #061946;
  background-image: none;
}

.saint-page .saint-cinematic-hero::before,
.saint-page .saint-cinematic-hero::after,
.saint-page .saint-cinematic-image-backdrop {
  display: none;
}

.saint-page .saint-cinematic-image {
  position: relative;
  inset: auto;
  display: block;
  width: min(100%, 850px);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.saint-page .saint-hero-image-link {
  position: absolute;
  z-index: 3;
  top: 0;
  right: auto;
  left: 50%;
  display: block;
  width: min(100%, 850px);
  height: auto;
  aspect-ratio: 1440 / 967;
  transform: translateX(-50%);
}

.saint-page .saint-hero-image-link:hover {
  transform: translateX(-50%);
  filter: none;
}

.saint-page .saint-cinematic-content {
  align-items: center;
  width: min(900px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
  padding-top: 20px;
  padding-bottom: 26px;
  text-align: center;
}

.saint-page .saint-cinematic-content .crumb,
.saint-page .saint-cinematic-content .eyebrow,
.saint-page .saint-cinematic-content .saint-hero-lead,
.saint-page .saint-cinematic-content .saint-hero-availability,
.saint-page .saint-cinematic-content .saint-hero-badges {
  display: none;
}

.saint-page .saint-cinematic-content .status-pill {
  margin-bottom: 8px;
}

.saint-page .saint-cinematic-content h1 {
  margin: 0;
  font-size: clamp(52px, 6vw, 74px);
}

.saint-page .saint-cinematic-content .saint-hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(100%, 380px);
  margin-top: 2px;
}

.saint-page .saint-cinematic-content .saint-hero-actions .btn {
  width: 100%;
  margin-left: 0;
  text-align: center;
}

.saint-page .saint-cinematic-content .saint-hero-actions .btn.secondary {
  border-color: #efc878;
  background: #fff4d3;
  color: #061946;
}

@media (min-width: 1051px) {
  .saint-page .saint-cinematic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(430px, .72fr);
    min-height: 680px;
  }

  .saint-page .saint-cinematic-image {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 680px;
    object-fit: contain;
  }

  .saint-page .saint-hero-image-link {
    grid-column: 1;
    grid-row: 1;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }

  .saint-page .saint-hero-image-link:hover {
    transform: none;
  }

  .saint-page .saint-cinematic-content {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 48px 42px;
    text-align: left;
  }
}

@media (max-width: 850px) {
  body.perez-page .inner-hero {
    padding-top: 28px;
  }

  body.perez-page .inner-hero .crumb {
    display: none;
  }

  body.perez-page .inner-hero .inner-grid {
    display: flex;
    flex-direction: column;
    gap: 26px;
  }

  body.perez-page .inner-hero .cover-buy-link {
    width: min(100%, 340px);
    margin: 0 auto;
  }

  body.perez-page .inner-hero .cover-buy-link img {
    display: block;
    width: 100%;
    height: auto;
  }

  body.perez-page .book-sales-heading {
    text-align: center;
  }

  body.perez-page .book-sales-heading h1 {
    margin-top: 12px;
    font-size: clamp(43px, 13vw, 61px);
    line-height: .9;
  }

  body.perez-page .book-sales-heading .book-subtitle {
    margin-bottom: 0;
    font-size: 18px;
  }

  .hero-buy-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 21px;
  }

  .hero-buy-actions .btn {
    width: 100%;
  }

  .hero-format-pills {
    justify-content: center;
  }

  .book-purchase-panel {
    margin-top: 30px;
    padding: 22px 16px;
    border-radius: 20px;
  }

  .book-purchase-panel .purchase-intro {
    display: block;
    margin-bottom: 20px;
    text-align: center;
  }

  .book-purchase-panel .purchase-intro p {
    margin: 12px auto 0;
  }

  body.jara-page .inner-hero {
    padding-top: 28px;
  }

  body.jara-page .inner-hero .crumb {
    display: none;
  }

  body.jara-page .inner-hero .inner-grid {
    display: flex;
    flex-direction: column;
    gap: 27px;
  }

  body.jara-page .inner-hero .jara-cover-buy {
    width: min(100%, 390px);
    margin: 0 auto;
  }

  body.jara-page .book-sales-heading {
    text-align: center;
  }

  body.jara-page .book-sales-heading h1 {
    font-size: clamp(49px, 14vw, 68px);
  }

  body.jara-page .jara-sales-lead {
    margin: 0 auto;
    font-size: 17px;
    text-align: center;
  }

  .book-sales-content .buy-accordion {
    margin-top: 0;
  }

  .book-synopsis {
    margin-top: 26px;
    padding: 23px 21px;
  }

  .book-synopsis h2 {
    font-size: 34px;
  }

  .book-synopsis p {
    font-size: 16px;
  }

  .book-distribution {
    padding: 60px 0;
  }

  .book-distribution-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .saint-hero-image-link {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    left: 0;
    display: block;
    height: 67.17vw;
  }

  .saint-hero-image-link:focus-visible {
    outline: 4px solid #efc878;
    outline-offset: -7px;
  }
}

@media (max-width: 560px) {
  .cover-buy-hint {
    right: 10px;
    bottom: 10px;
    left: 10px;
    min-height: 46px;
  }

  .book-distribution .section-title h2 {
    font-size: 42px;
  }

  .saint-cinematic-content .crumb,
  .saint-cinematic-content .eyebrow,
  .saint-cinematic-content .saint-hero-lead,
  .saint-cinematic-content .saint-hero-availability,
  .saint-cinematic-content .saint-hero-badges {
    display: none;
  }

  .saint-cinematic-content {
    padding-top: 24px;
    padding-bottom: 34px;
  }

  .saint-cinematic-content .status-pill {
    margin-bottom: 13px;
  }

  .saint-cinematic-content h1 {
    margin: 0;
  }

  .saint-cinematic-content .saint-hero-actions {
    width: 100%;
    margin-top: 4px;
  }

  .book-purchase-panel .purchase-intro h2 {
    font-size: clamp(32px, 10vw, 40px);
  }

  .saint-buy-section .section-title {
    margin-bottom: 26px;
  }

  .saint-buy-section .section-title h2 {
    font-size: clamp(40px, 11vw, 50px);
    line-height: .92;
  }
}

/* The mobile purchase bar appears only after the hero and disappears again
   around the purchase panel and footer. sales-behavior.js controls the state. */
.mobile-buy-bar {
  display: none !important;
}

@media (max-width: 560px) {
  .mobile-buy-bar.is-visible {
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex !important;
  }
}

/* Las portadas completas son el enlace de compra; ningún rótulo tapa la obra. */
.cover-buy-hint,
.saint-hero-image-link::after {
  display: none !important;
  content: none !important;
}

.hero-buy-actions .sample-open.btn {
  border-color: rgba(125, 46, 32, .35);
  background: transparent;
  color: var(--wine);
  cursor: pointer;
}

.saint-page .saint-cinematic-content .saint-hero-actions .sample-open.btn {
  border: 1px solid rgba(239, 200, 120, .72);
  background: transparent;
  color: #fff4d3;
  box-shadow: none;
}

.saint-page .saint-cinematic-content .saint-hero-actions .sample-open.btn:hover {
  background: rgba(239, 200, 120, .1);
}

/* Muestras de lectura: la ficha queda corta y las páginas se abren en el visor. */
.sample-launch-section {
  padding-block: clamp(40px, 5vw, 64px) !important;
}

.sample-launch-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 50px);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(24px, 3.5vw, 40px);
  overflow: hidden;
  border: 1px solid rgba(125, 46, 32, .18);
  border-radius: 28px;
  background: linear-gradient(135deg, #fffaf1 0%, #f4e5cf 100%);
  box-shadow: 0 22px 54px rgba(75, 42, 27, .12);
}

.sample-launch-card::after {
  position: absolute;
  right: -85px;
  bottom: -125px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(125, 46, 32, .12);
  border-radius: 50%;
  content: "";
}

.sample-launch-copy,
.sample-launch-button {
  position: relative;
  z-index: 1;
}

.sample-launch-copy h2 {
  max-width: 780px;
  margin: 7px 0 11px;
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1;
  text-align: left;
}

.sample-launch-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.sample-launch-button.btn {
  min-width: 240px;
  min-height: 52px;
  border: 0;
  background: var(--wine);
  color: #fffaf1;
  white-space: normal;
  text-align: center;
  cursor: pointer;
}

.sample-launch-button.btn:hover {
  background: #6f271d;
}

.saint-page .sample-launch-card {
  border-color: rgba(239, 200, 120, .3);
  background: linear-gradient(135deg, #102d69 0%, #061946 100%);
  box-shadow: 0 22px 54px rgba(6, 25, 70, .2);
}

.saint-page .sample-launch-card::after {
  border-color: rgba(239, 200, 120, .22);
}

.saint-page .sample-launch-copy .eyebrow,
.saint-page .sample-launch-copy h2 {
  color: #fff4d3;
}

.saint-page .sample-launch-copy p {
  color: #f1d7a5;
}

.saint-page .sample-launch-button.btn {
  background: #efc878;
  color: #2b180f;
}

.saint-page .sample-launch-button.btn:hover {
  background: #f7d991;
}

.sample-pages-source[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .sample-launch-section {
    padding-block: 22px !important;
  }

  .sample-launch-card {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 18px 16px;
    border-radius: 18px;
  }

  .sample-launch-copy h2 {
    margin: 5px 0 0;
    font-size: clamp(26px, 7.5vw, 30px);
    line-height: 1.04;
  }

  .sample-launch-copy p {
    display: none;
  }

  .sample-launch-button.btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 13px;
  }
}

.image-lightbox-controls {
  display: grid;
  grid-template-columns: 48px minmax(96px, 1fr) 48px auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.image-lightbox-controls button,
.image-lightbox-buy {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: #fff4d3;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.image-lightbox-count {
  color: #f1d7a5;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.image-lightbox-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #efc878;
  color: #2b180f;
  text-decoration: none;
}

@media (max-width: 560px) {
  .image-lightbox-controls {
    grid-template-columns: 46px 1fr 46px;
  }

  .image-lightbox-buy {
    grid-column: 1 / -1;
  }
}

/* Illustrated feature cards for The Origin of Santa Claus: Saint Nicholas */
.saint-page .saint-feature {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.saint-page .saint-feature-media {
  aspect-ratio: 799 / 538;
  margin: 0;
  overflow: hidden;
  background: #1d2c50;
}

.saint-page .saint-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.saint-page .saint-feature:hover .saint-feature-media img {
  transform: scale(1.035);
}

.saint-page .saint-feature-copy {
  padding: 25px 27px 29px;
}

.saint-page .saint-feature-copy > span {
  display: block;
  color: #b88737;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .18em;
}

.saint-page .saint-feature-copy h3 {
  margin: 17px 0 12px;
}

@media (max-width: 560px) {
  .saint-page .saint-feature {
    display: block;
  }

  .saint-page .saint-feature-media {
    aspect-ratio: 799 / 538;
    min-height: 0;
  }

  .saint-page .saint-feature-copy {
    padding: 18px 20px 22px;
  }

  .saint-page .saint-feature-copy h3 {
    margin-top: 12px;
    font-size: 23px;
  }

  .saint-page .saint-feature-copy p {
    font-size: 14px;
    line-height: 1.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .saint-page .saint-feature-media img {
    transition: none;
  }
}
