/* Book page, webshop style: the book part of the prototype's page-batch1.css (« Book page, webshop
   style (part 2) », docs/wireframes/wireframe-4b-book-product-page.png, ddf9b78). The cover column
   keeps its width with or without thumbnails, so the buy box never moves. WordPress adaptations are
   marked « WP: ». */
/* WP: each theme-block part is display: contents, so its prototype markup lays out as in the prototype. */
.lea-book-part { display: contents; }
.book-hero > * { margin-block: 0; }
.book-hero > .batch-breadcrumb { margin-bottom: var(--within-gap); }
.book-product { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 88px; align-items: start; }
.book-gallery { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.book-gallery.has-thumbs { grid-template-columns: 72px minmax(0, 1fr); gap: 20px; }
.book-gallery__thumbs { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.book-thumb { display: grid; place-items: center; width: 72px; height: 100px; padding: 4px; border: 1px solid transparent; background: none; cursor: pointer; }
.book-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.book-thumb.is-current, .book-thumb:hover { border-color: var(--color-accent); }
.book-gallery__main { display: grid; place-items: start; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.book-gallery__main img { width: auto; max-width: 100%; height: auto; max-height: min(600px, calc(100vh - 280px)); min-height: 420px; object-fit: contain; }

.book-buy { min-width: 0; }
.book-buy > * { margin-block: 0; }
.book-links { display: flex; flex-wrap: wrap; align-items: stretch; row-gap: 12px; margin-bottom: 24px; }
.book-links__group { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding-right: 20px; }
.book-links__group--stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.book-links__group + .book-links__group { padding-left: 20px; border-left: 1px solid var(--color-accent); }
.book-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.book-link__portrait { position: relative; flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; }
.book-link__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: var(--portrait-position, 50% 30%); filter: grayscale(1); transform: scale(var(--portrait-zoom, 1)); }
.book-link__text { display: grid; gap: 2px; line-height: 1.2; }
.book-link__label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.book-link__name { width: fit-content; border-bottom: 1px solid var(--color-accent); font-weight: 500; }
.book-link:hover .book-link__name, .book-link:focus-visible .book-link__name { color: var(--color-accent); }
/* A mini shelf of three spines in the collection's colour on a Bronze line. */
.book-link__shelf { display: flex; flex: none; align-items: flex-end; gap: 3px; height: 40px; padding: 0 5px; border-bottom: 1px solid var(--color-accent); }
.book-link__shelf i { display: block; width: 7px; height: 30px; background: var(--color-text); }
.book-link__shelf i:nth-child(2) { height: 37px; }
.book-link__shelf i:nth-child(3) { height: 26px; }
.book-link__shelf--bronze i { background: var(--color-accent); }
.book-link__shelf--sable i { border: 1px solid var(--color-text); background: var(--color-surface-alt); }

.book-buy h1 { margin: 0; font-family: var(--font-display); font-size: clamp(2.6rem, 4.2vw, 3.75rem); font-weight: 400; line-height: 1.02; text-wrap: balance; }
.book-hook { margin: 12px 0 0; font-size: 1.2rem; line-height: 1.45; }
.book-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 24px !important; padding-top: 24px; border-top: 1px solid var(--color-accent); }
.book-price-row > * { margin: 0; }
.book-price, .book-price .wc-block-components-product-price { margin: 0; font-family: var(--font-body); font-size: 2.75rem; font-weight: 400; line-height: 1; }
.book-facts-inline { margin: 0; }
.book-availability { display: flex; align-items: center; gap: 10px; margin: 16px 0 0 !important; font-weight: 500; }
.book-availability span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text); }

/* WP: WooCommerce's add-to-cart form (« stepper » style) as the prototype's quantity pill and wide
   button: the form is the flex row, the quantity box the pill, the − and + its round steps. */
.book-purchase { margin-top: 24px !important; }
.book-purchase form.cart { display: flex; align-items: stretch; gap: 16px; margin: 0; }
/* WP: WooCommerce's clearfix pseudo-elements would be flex items (and take a gap each). */
.book-purchase form.cart::before, .book-purchase form.cart::after { content: none !important; }
.book-purchase .quantity { display: inline-flex; flex: none; align-items: center; height: 52px; margin: 0; padding: 0 3px; border: 1px solid var(--color-text); border-radius: var(--radius-pill); background: none; }
.book-purchase form.cart .quantity input.qty { flex: none; width: 40px; min-width: 0; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--color-text); font: inherit; font-size: 1.1rem; line-height: 44px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
/* WP: WooCommerce's own quantity styles (woocommerce.css, loaded after the theme) outrank these. */
.book-purchase form.cart .quantity input.qty { padding: 0 !important; font-size: 1.1rem !important; }
.book-purchase form.cart .quantity { margin: 0 !important; }
.book-purchase .quantity .qty::-webkit-inner-spin-button, .book-purchase .quantity .qty::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.book-purchase form.cart .quantity button { position: static; flex: none; min-width: 0; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--color-text); font-size: 1.35rem; line-height: 1; opacity: 1; cursor: pointer; }
.book-purchase .quantity .qty { order: 1; }
.book-purchase .quantity .wc-block-components-quantity-selector__button--plus { order: 2; }
.book-purchase .quantity button:hover { color: var(--color-accent); }
.book-purchase .quantity button:disabled { opacity: .35; cursor: not-allowed; }
.book-purchase .single_add_to_cart_button { flex: 1 1 auto; min-height: 52px; margin: 0; }
.book-extract-link { margin-top: 12px; }
.book-reassurance { display: grid; gap: 10px; margin: 24px 0 0 !important; padding: 24px 0 0; border-top: 1px solid var(--color-accent); list-style: none; font-size: .96rem; }
.book-reassurance li { position: relative; margin: 0; padding-left: 20px; }
.book-reassurance li::before { content: ""; position: absolute; top: .55em; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }

.book-about { display: grid; grid-template-columns: minmax(0, var(--reading-width)) minmax(220px, 300px); justify-content: space-between; gap: 64px; align-items: start; }
.book-about > * { margin: 0; }
.book-about h2 { margin: 0 0 var(--heading-gap); font-family: var(--font-body); font-size: clamp(2.25rem, 4vw, 3.4rem); font-weight: 600; }
.book-about__copy { font-size: 20px; line-height: 1.75; }
.book-about__copy p { margin: 0 0 1.4em; }
.book-about__copy p:last-child { margin-bottom: 0; }
.book-pullquote { margin: var(--within-gap) 0 0; }
.book-pullquote .lea-dots { --dots-size: 10px; display: block; margin-bottom: 16px; }
.book-pullquote blockquote { margin: 0; }
.book-pullquote p { margin: 0; font-family: var(--font-body); font-size: 2rem; font-style: normal; line-height: 1.25; }
.book-details dl { margin: 0; border-top: 1px solid var(--color-accent); }
.book-details dl > div { padding: 16px 0; border-bottom: 1px solid var(--color-accent); }
.book-details dt { margin-bottom: 4px; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.book-details dd { margin: 0; }
.book-details dd a { border-bottom: 1px solid var(--color-accent); text-decoration: none; }
.book-authors .batch-book-author + .batch-book-author { margin-top: var(--within-gap); }

/* Sticky purchase bar: under the header on desktop, at the bottom on phones. WP: the header's bottom
   edge comes from view.js (--sticky-top), so the admin bar is taken into account. */
.book-sticky { position: fixed; z-index: 35; top: var(--sticky-top, 82px); right: 0; left: 0; border-bottom: 1px solid var(--color-accent); background: var(--color-surface); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--duration-fast), transform var(--duration-fast), visibility 0s linear var(--duration-fast); }
.book-sticky.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity var(--duration-fast), transform var(--duration-fast); }
.book-sticky__inner { display: flex; align-items: center; gap: 24px; width: min(100% - 64px, var(--container-max)); min-height: 72px; margin: 0 auto; padding: 10px 0; }
.book-sticky__title { flex: 1 1 auto; margin: 0; font-family: var(--font-body); font-size: 1.3rem; line-height: 1.15; font-weight: 600; }
.book-sticky__price { flex: none; margin: 0; font-family: var(--font-body); font-size: 1.3rem; }
.book-sticky .wp-element-button { flex: none; min-height: 48px; }
@media (prefers-reduced-motion: reduce) { .book-sticky, .book-sticky.is-visible { transform: none; transition: none; } }

/* Enlarged cover: a native modal dialog (focus kept inside, Escape closes). */
.book-zoom { max-width: min(92vw, 900px); max-height: 94vh; padding: 60px 28px 28px; border: 0; background: var(--color-surface); }
.book-zoom::backdrop { background: rgba(0, 0, 0, .72); }
.book-zoom img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(94vh - 100px); margin: 0 auto; object-fit: contain; }
.book-zoom__close { position: absolute; top: 8px; right: 12px; min-width: 44px; min-height: 44px; border: 0; background: none; font-weight: 500; cursor: pointer; }
.book-zoom__close span { margin-left: 4px; font-size: 1.4rem; vertical-align: -2px; }

@media (max-width: 1020px) {
  .book-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .book-gallery__main img { min-height: 0; }
  .book-about { grid-template-columns: minmax(0, 1fr); gap: var(--within-gap); }
}

@media (max-width: 767px) {
  .book-product { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .book-gallery.has-thumbs { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .book-gallery__thumbs { flex-direction: row; order: 2; }
  .book-gallery__main img { width: 100%; max-height: none; }
  .book-links__group { padding-right: 16px; }
  .book-links__group--stack { flex-direction: column; align-items: flex-start; gap: 4px; }
  .book-links__group + .book-links__group { padding-left: 16px; }
  .book-price, .book-price .wc-block-components-product-price { font-size: 2.4rem; }
  .book-about__copy { font-size: 18px; }
  .book-pullquote p { font-size: 1.6rem; }
  .book-sticky { top: auto; bottom: 0; border-top: 1px solid var(--color-accent); border-bottom: 0; transform: translateY(8px); }
  .book-sticky__inner { width: calc(100% - 32px); gap: 16px; min-height: 68px; }
  .book-sticky__title { display: none; }
  .book-sticky__price { flex: 1 1 auto; font-size: 1.5rem; }
  body:has(.book-sticky) .lea-footer { padding-bottom: 110px; }
}
