/* Books product page: reference-led editorial commerce composition */
.book-detail-body .book-product-header {
  min-height: calc(100dvh - var(--header-height));
  color: var(--navy);
  background: var(--catalogue-paper);
  box-shadow: inset 0 -1px 0 var(--line);
}

.book-detail-body .book-product-header-shell {
  display: grid;
  min-height: inherit;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.65rem, 1.4vw, 1rem);
  padding-block: clamp(0.7rem, 1.6vw, 1.1rem) clamp(1.8rem, 3.6vw, 2.8rem);
}

.book-detail-body .product-back-link {
  width: fit-content;
  color: var(--catalogue-muted);
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration: none;
}

.book-detail-body .product-back-link:hover,
.book-detail-body .product-back-link:focus-visible {
  color: var(--red);
}

.book-detail-body .book-product-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.24fr) minmax(20rem, 0.92fr);
  gap: clamp(1.7rem, 3vw, 3.1rem);
  align-content: center;
  align-items: start;
  padding-top: clamp(0.55rem, 1.5vh, 0.95rem);
}

.book-detail-body .book-product-cover-column,
.book-detail-body .book-product-copy,
.book-detail-body .book-purchase-column {
  min-width: 0;
}

.book-detail-body .book-product-cover-column {
  display: grid;
  place-items: center;
}

.book-detail-body .book-product-cover {
  display: grid;
  width: 100%;
  margin: 0;
  place-items: center;
}

.book-detail-body .book-product-cover img {
  display: block;
  width: clamp(14.75rem, 21.5vw, 20.5rem);
  max-width: 100%;
  max-height: min(66dvh, 33.5rem);
  object-fit: contain;
  border-radius: 2px;
  outline: 1px solid rgba(7, 20, 33, 0.1);
  outline-offset: -1px;
  box-shadow:
    0 22px 36px -28px rgba(7, 20, 33, 0.62),
    10px 30px 56px -42px rgba(7, 20, 33, 0.72);
  transition: transform 180ms var(--ease-premium), box-shadow 180ms var(--ease-premium);
}

.book-detail-body .book-product-cover:hover img {
  box-shadow:
    0 25px 42px -29px rgba(7, 20, 33, 0.66),
    12px 34px 62px -42px rgba(7, 20, 33, 0.76);
  transform: translateY(-2px);
}

.book-detail-body .book-product-cover-note {
  display: none;
}

.book-detail-body .book-product-copy {
  display: grid;
  align-content: start;
  gap: clamp(0.58rem, 1.1vw, 0.82rem);
}

.book-detail-body .book-product-subject,
.book-detail-body .book-product-subtitle,
.book-detail-body .book-product-authors,
.book-detail-body .book-product-summary {
  margin: 0;
  text-wrap: pretty;
}

.book-detail-body .book-product-subject {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 880;
}

.book-detail-body .book-product-copy h1 {
  max-width: 16ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: var(--type-product-title-size);
  font-weight: 720;
  letter-spacing: 0;
  line-height: var(--type-product-title-line);
  text-wrap: balance;
}

.book-detail-body.has-long-product-title .book-product-copy h1 {
  max-width: 19ch;
  font-size: var(--type-product-title-long-size);
  line-height: var(--type-product-title-long-line);
}

.book-detail-body .book-product-subtitle {
  max-width: 42rem;
  color: var(--catalogue-muted);
  font-family: var(--serif);
  font-size: var(--type-product-subtitle-size);
  line-height: 1.35;
}

.book-detail-body .book-product-authors {
  color: var(--catalogue-muted);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
}

.book-detail-body .book-product-authors a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--red);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.book-detail-body .book-product-authors a:hover,
.book-detail-body .book-product-authors a:focus-visible {
  color: var(--red-deep);
}

.book-detail-body .book-product-summary {
  max-width: 58ch;
  color: var(--catalogue-muted);
  font-size: 0.96rem;
  line-height: 1.64;
}

.book-detail-body .book-product-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(0.35rem, 1vw, 0.72rem) 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.book-detail-body .book-product-facts .product-fact {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
  padding-inline: 0.8rem;
}

.book-detail-body .book-product-facts .product-fact:first-child {
  padding-left: 0;
}

.book-detail-body .book-product-facts .product-fact + .product-fact {
  border-left: 1px solid var(--line);
}

.book-detail-body .book-product-facts dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
}

.book-detail-body .book-product-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1.35;
}

.book-detail-body .book-purchase-column {
  display: grid;
  align-content: start;
  gap: clamp(0.95rem, 1.8vw, 1.3rem);
  padding-left: clamp(1.2rem, 2.4vw, 2.15rem);
  border-left: 1px solid var(--line);
}

.book-detail-body .book-purchase-group {
  display: grid;
  gap: 0.5rem;
}

.book-detail-body .book-purchase-group h2 {
  margin: 0;
  color: var(--red);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 880;
  line-height: 1.3;
}

.book-detail-body .book-purchase-direct h2::before {
  content: "1. ";
}

.book-detail-body .book-purchase-digital h2::before {
  content: "2. ";
}

.book-detail-body .book-purchase-retailers h2::before {
  content: "3. ";
}

.book-detail-body .direct-format-summary {
  display: grid;
  gap: 0.24rem;
  padding: 0.62rem 0.78rem 0.66rem;
  background: var(--catalogue-surface);
  border: 1px solid rgba(142, 31, 47, 0.35);
  border-radius: 6px;
}

.book-detail-body .product-release-summary {
  gap: 0.42rem;
}

.book-detail-body .product-release-heading {
  margin: 0;
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 860;
  line-height: 1.3;
}

.book-detail-body .product-release-date {
  margin: 0;
  color: var(--navy);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1.4;
}

.book-detail-body .direct-format-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.book-detail-body .direct-format-heading h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 860;
}

.book-detail-body .direct-format-stock {
  color: var(--catalogue-muted);
  font-size: 0.75rem;
  font-weight: 820;
  text-align: right;
}

.book-detail-body .direct-format-stock.is-available {
  color: var(--navy);
}

.book-detail-body .direct-format-price {
  color: var(--navy);
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.book-detail-body .direct-format-listed-price,
.book-detail-body .direct-format-retailer,
.book-detail-body .direct-format-delivery,
.book-detail-body .direct-format-unavailable,
.book-detail-body .book-purchase-helper,
.book-detail-body .external-purchase-note,
.book-detail-body .purchase-status {
  margin: 0;
  color: var(--catalogue-muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.book-detail-body .direct-format-listed-price,
.book-detail-body .direct-format-retailer,
.book-detail-body .direct-format-delivery {
  margin-left: 0;
}

.book-detail-body .purchase-action-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.book-detail-body .purchase-action-area .button {
  min-height: 40px;
  width: 100%;
  justify-content: center;
  padding-inline: 0.7rem;
  font-size: 0.79rem;
  white-space: nowrap;
}

.book-detail-body .purchase-status:empty {
  display: none;
}

.book-detail-body .digital-edition-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.book-detail-body .digital-edition-list > div + div {
  border-top: 1px solid var(--line);
}

.book-detail-body .digital-edition-option {
  display: grid;
  min-height: 54px;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  align-items: center;
  padding: 0.45rem 0.64rem;
  color: var(--navy);
  background: var(--catalogue-paper);
  border: 0;
  text-align: left;
  text-decoration: none;
  transition: background-color 160ms var(--ease-premium), box-shadow 160ms var(--ease-premium);
}

.book-detail-body .digital-edition-option:not(.is-unavailable):hover,
.book-detail-body .digital-edition-option:not(.is-unavailable):focus-visible {
  background: var(--catalogue-surface);
  box-shadow: inset 3px 0 0 var(--red);
}

.book-detail-body .digital-edition-option strong,
.book-detail-body .digital-edition-retailer,
.book-detail-body .digital-edition-price {
  grid-column: 1;
}

.book-detail-body .digital-edition-option strong {
  align-self: end;
  font-size: 0.8rem;
  font-weight: 840;
}

.book-detail-body .digital-edition-retailer {
  color: var(--muted);
  font-size: 0.69rem;
}

.book-detail-body .digital-edition-price {
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 720;
}

.book-detail-body .digital-edition-option.is-unavailable,
.book-detail-body .digital-edition-option.is-unavailable .digital-edition-price {
  color: var(--muted);
}

.book-detail-body .retailer-link:not(.is-unavailable)::after {
  margin-left: 0.38rem;
  content: "↗";
  font-size: 0.92em;
}

.book-detail-body .retailer-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.95rem;
}

.book-detail-body .retailer-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 0.38rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.book-detail-body .retailer-link + .retailer-link {
  padding-left: 0.95rem;
  border-left: 1px solid var(--line);
}

.book-detail-body .retailer-link.is-unavailable {
  color: var(--muted);
  text-decoration: none;
}

.book-detail-body .retailer-link small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.book-detail-body .product-back-link:focus-visible,
.book-detail-body .book-product-authors a:focus-visible,
.book-detail-body .digital-edition-option:focus-visible,
.book-detail-body .retailer-link:focus-visible,
.book-detail-body .purchase-action-area .button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .book-detail-body .book-product-header {
    min-height: auto;
  }

  .book-detail-body .book-product-header-shell {
    min-height: 0;
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  }

  .book-detail-body .book-product-layout {
    grid-template-columns: minmax(13rem, 0.64fr) minmax(0, 1.36fr);
    align-items: start;
  }

  .book-detail-body .book-product-cover-column,
  .book-detail-body .book-product-copy {
    align-self: center;
  }

  .book-detail-body .book-product-cover img {
    width: clamp(13rem, 28vw, 17rem);
    max-height: 28rem;
  }

  .book-detail-body .book-purchase-column {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(12rem, 0.7fr);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
    padding-top: 1.4rem;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (min-width: 1121px) {
  .book-detail-body .book-product-layout {
    padding-bottom: clamp(1.5rem, 4vh, 2rem);
  }
}

@media (min-width: 1121px) and (max-height: 760px) {
  .book-detail-body .book-product-header-shell {
    padding-block: 0.55rem 1rem;
  }

  .book-detail-body .book-product-layout {
    padding-top: 0;
    padding-bottom: 1rem;
  }

  .book-detail-body .book-product-cover img {
    max-height: 58dvh;
  }

  .book-detail-body .book-purchase-column {
    gap: 0.72rem;
  }

  .book-detail-body .book-purchase-group {
    gap: 0.34rem;
  }

  .book-detail-body .direct-format-summary {
    gap: 0.18rem;
    padding-block: 0.48rem 0.5rem;
  }

  .book-detail-body .digital-edition-option {
    min-height: 48px;
    padding-block: 0.34rem;
  }

  .book-detail-body .external-purchase-note {
    font-size: 0.68rem;
  }
}

@media (max-width: 880px) {
  .book-detail-body .book-product-layout {
    gap: 1.5rem;
  }

  .book-detail-body .book-product-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0;
  }

  .book-detail-body .book-product-facts .product-fact:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .book-detail-body .book-product-facts .product-fact:nth-child(n + 3) {
    padding-top: 0.15rem;
  }

  .book-detail-body .book-purchase-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-detail-body .book-purchase-retailers {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .book-detail-body .book-product-header-shell {
    gap: 0.8rem;
    padding-block: 0.65rem 2.6rem;
  }

  .book-detail-body .book-product-layout {
    grid-template-columns: 1fr;
    gap: 1.45rem;
  }

  .book-detail-body .book-product-cover img {
    width: clamp(11.75rem, 58vw, 15rem);
    max-height: 22rem;
  }

  .book-detail-body .book-product-copy {
    gap: 0.65rem;
  }

  .book-detail-body .book-product-copy h1 {
    max-width: 15ch;
  }

  .book-detail-body .book-product-subtitle {
    font-size: 1.06rem;
  }

  .book-detail-body .book-product-summary {
    font-size: 0.94rem;
  }

  .book-detail-body .book-product-facts {
    gap: 0.75rem 0;
  }

  .book-detail-body .book-purchase-column {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 1.5rem;
  }

  .book-detail-body .book-purchase-retailers {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .book-detail-body .purchase-action-area {
    grid-template-columns: 1fr;
  }

  .book-detail-body .retailer-link-list {
    display: grid;
    gap: 0;
  }

  .book-detail-body .retailer-link + .retailer-link {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-detail-body .book-product-cover img,
  .book-detail-body .digital-edition-option {
    transition: none;
  }

  .book-detail-body .book-product-cover:hover img {
    transform: none;
  }
}
