/*
 * Ready Book Store — Single book product UI
 * 1.0.90.268 canonical stylesheet.
 *
 * This file intentionally replaces the accumulated historical overrides from
 * 1.0.90.261–265. The single-product layout now has one authoritative design
 * system so theme WooCommerce floats/grids cannot re-break the page.
 */

body.pb-bookshop-single-redesign {
  --pb-book-accent: #8f1d1d;
  --pb-book-accent-hover: #761616;
  --pb-book-accent-soft: #fff5f5;
  --pb-book-ink: #192230;
  --pb-book-text: #3e4a5e;
  --pb-book-muted: #7a8597;
  --pb-book-line: #e6e9ee;
  --pb-book-soft: #f7f8fa;
  --pb-book-surface: #fff;
  --pb-book-container: 1240px;
  --pb-book-radius-lg: 24px;
  --pb-book-radius-md: 16px;
  --pb-book-shadow: 0 14px 40px rgba(16, 24, 40, .055);
  direction: rtl;
  background: #f7f8fa;
}

body.pb-bookshop-single-redesign *,
body.pb-bookshop-single-redesign *::before,
body.pb-bookshop-single-redesign *::after {
  box-sizing: border-box;
}

/* Remove theme/Woo duplicate related products. PB renders its own curated block. */
body.pb-bookshop-single-redesign .related.products,
body.pb-bookshop-single-redesign .up-sells.products,
body.pb-bookshop-single-redesign section.related.products,
body.pb-bookshop-single-redesign section.up-sells.products {
  display: none !important;
}

/* --------------------------------------------------------------------------
 * Canonical page geometry
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .woocommerce div.product,
body.pb-bookshop-single-redesign .woocommerce-page div.product {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-hero,
body.pb-bookshop-single-redesign .woocommerce-tabs,
body.pb-bookshop-single-redesign .pb-bookshop-discovery {
  width: min(calc(100% - 40px), var(--pb-book-container)) !important;
  max-width: var(--pb-book-container) !important;
  margin-inline: auto !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-hero {
  display: grid !important;
  grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr) !important;
  grid-template-rows: auto !important;
  gap: clamp(22px, 2.8vw, 38px) !important;
  align-items: start !important;
  margin-top: clamp(30px, 4vw, 58px) !important;
  margin-bottom: 30px !important;
  direction: rtl;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-media {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: grid !important;
  min-width: 0 !important;
  gap: 16px !important;
  align-content: start !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-content {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* Critical root fix: never let old theme/Woo rules turn summary into another grid. */
body.pb-bookshop-single-redesign .pb-bookshop-product-content > div.summary,
body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-content > div.summary,
body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-content > div.summary {
  display: block !important;
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --------------------------------------------------------------------------
 * Cover / gallery — one third rail
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .pb-bookshop-product-media > div.images,
body.pb-bookshop-single-redesign .pb-bookshop-product-media > .woocommerce-product-gallery,
body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-media > div.images,
body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-media > div.images {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: clamp(22px, 2.4vw, 32px) !important;
  border: 1px solid var(--pb-book-line) !important;
  border-radius: var(--pb-book-radius-lg) !important;
  background: radial-gradient(circle at 50% 18%, #fff 0%, #fafbfc 58%, #f4f6f8 100%) !important;
  box-shadow: var(--pb-book-shadow) !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__wrapper,
body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image {
  width: 100% !important;
  max-width: 100% !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image > a {
  display: grid !important;
  min-height: 315px !important;
  place-items: center !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image img,
body.pb-bookshop-single-redesign .pb-bookshop-product-media div.images img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: min(82%, 285px) !important;
  max-height: 410px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 5px !important;
  box-shadow: 0 15px 28px rgba(15, 23, 42, .10) !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-product-media .flex-control-thumbs {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 7px !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-product-media .flex-control-thumbs li {
  float: none !important;
  width: 50px !important;
  margin: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-product-media .flex-control-thumbs img {
  width: 50px !important;
  height: 64px !important;
  padding: 3px !important;
  object-fit: contain !important;
  border: 1px solid var(--pb-book-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
 * Summary header / main price — compact premium strip
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(235px, 300px) !important;
  grid-template-areas:
    "title price"
    "rating price"
    "excerpt excerpt" !important;
  column-gap: 18px !important;
  row-gap: 7px !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
  padding: 15px 17px !important;
  overflow: hidden;
  border: 1px solid #e1e5eb !important;
  border-radius: 19px !important;
  background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%) !important;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .045) !important;
  direction: ltr !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 82px;
  height: 3px;
  background: linear-gradient(90deg, var(--pb-book-accent), #d58d96);
  border-radius: 0 0 999px 0;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 88% 20%, rgba(143,29,29,.045), transparent 34%);
}

body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
  grid-area: title !important;
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: var(--pb-book-ink) !important;
  font-size: clamp(20px, 1.35vw, 23px) !important;
  font-weight: 850 !important;
  line-height: 1.45 !important;
  letter-spacing: -.018em !important;
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext;
}

body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-rating {
  grid-area: rating !important;
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  direction: ltr;
}

body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price {
  grid-area: price !important;
  position: relative;
  z-index: 1;
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #edd9dc !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, #fffafa 0%, #fff 72%) !important;
  color: var(--pb-book-accent) !important;
  line-height: 1.45 !important;
  direction: rtl !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 5px 16px rgba(143,29,29,.045) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del {
  order: 1;
  color: #9199a7 !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del::before {
  content: 'قیمت اصلی';
  color: #8d96a5;
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins {
  order: 2;
  color: var(--pb-book-accent) !important;
  font-size: clamp(18px, 1.3vw, 21px) !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins::before {
  content: 'قیمت نهایی';
  color: #9b434a;
  font-size: 10.5px;
  font-weight: 850;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price:not(:has(del)) {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 50px !important;
  font-size: 19px !important;
  font-weight: 900 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price:not(:has(del))::before {
  content: 'قیمت';
  color: #8d96a5;
  font-size: 10.5px;
  font-weight: 800;
}

body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-details__short-description {
  grid-area: excerpt !important;
  position: relative;
  z-index: 1;
  max-width: none !important;
  margin: 2px 0 0 !important;
  padding: 9px 11px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: #f7f8fa !important;
  color: #596579 !important;
  font-size: 13.5px !important;
  line-height: 1.9 !important;
  direction: rtl !important;
  text-align: right !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }
body.pb-bookshop-single-redesign .product_meta { display: none !important; }

/* --------------------------------------------------------------------------
 * Book facts + purchase panel — two equal premium cards in the two-thirds rail
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .pb-bookshop-summary-panels {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid #e4e8ee !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, #f3f5f8 0%, #f7f8fa 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 10px 28px rgba(16,24,40,.035) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-quick-meta,
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > form.cart,
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-call-box,
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-edition-call-box {
  position: relative !important;
  flex: 1 1 0 !important;
  align-self: stretch !important;
  width: calc(50% - 6px) !important;
  max-width: calc(50% - 6px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 18px !important;
  overflow: hidden !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(16,24,40,.045) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-quick-meta::before,
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > form.cart::before {
  content: '';
  position: absolute;
  top: 0;
  right: 18px;
  width: 54px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--pb-book-accent), #d28c94);
}
/* Pre-normalization fallback if a theme delays Woo form output. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > .pb-bookshop-quick-meta,
body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > form.cart {
  display: inline-block !important;
  width: calc(50% - 8px) !important;
  max-width: calc(50% - 8px) !important;
  min-width: 0 !important;
  vertical-align: top !important;
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(16,24,40,.045) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > .pb-bookshop-quick-meta { margin-inline-end: 12px !important; }

.pb-bookshop-quick-meta__head,
.pb-bookshop-editions-head {
  margin: 0 0 13px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #edf0f4 !important;
}
.pb-bookshop-quick-meta__eyebrow,
.pb-bookshop-editions-head .pb-bookshop-editions-eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--pb-book-accent);
  font-size: 9px;
  font-weight: 850;
}
.pb-bookshop-quick-meta__head h3,
.pb-bookshop-editions-head .pb-bookshop-editions-title {
  margin: 0 !important;
  color: var(--pb-book-ink) !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.6 !important;
}
.pb-bookshop-quick-meta__head p,
.pb-bookshop-editions-head p {
  margin: 5px 0 0 !important;
  color: #8a94a6 !important;
  font-size: 10px !important;
  line-height: 1.8 !important;
}

.pb-bookshop-quick-meta__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.pb-bookshop-quick-meta__item {
  min-width: 0 !important;
  padding: 11px 12px !important;
  border: 1px solid #ebedf1 !important;
  border-radius: 13px !important;
  background: #fafbfc !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pb-bookshop-quick-meta__item--author,
.pb-bookshop-quick-meta__item--publisher,
.pb-bookshop-quick-meta__item--subject,
.pb-bookshop-quick-meta__item--language {
  background: linear-gradient(145deg, #fff 0%, #fafbfd 100%) !important;
}
.pb-bookshop-quick-meta__item--author:hover,
.pb-bookshop-quick-meta__item--publisher:hover,
.pb-bookshop-quick-meta__item--subject:hover,
.pb-bookshop-quick-meta__item--language:hover {
  transform: translateY(-1px);
  border-color: #d7dce5 !important;
  box-shadow: 0 6px 14px rgba(16,24,40,.04);
}
.pb-bookshop-quick-meta__item small {
  display: block !important;
  margin-bottom: 4px !important;
  color: #929cac !important;
  font-size: 9px !important;
  font-weight: 750 !important;
}
.pb-bookshop-quick-meta__item strong {
  display: block !important;
  overflow: visible !important;
  color: #2c394d !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.75 !important;
  white-space: normal !important;
}
.pb-bookshop-quick-meta__item a {
  color: #26364c !important;
  font-weight: 850 !important;
  text-decoration: none !important;
}
.pb-bookshop-quick-meta__item a::after {
  content: '↗';
  margin-inline-start: 5px;
  color: #a0a8b5;
  font-size: 8px;
}
.pb-bookshop-quick-meta__item a:hover { color: var(--pb-book-accent) !important; }

/* Purchase panel and editions. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > form.cart,
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > form.cart {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 11px !important;
}
body.pb-bookshop-single-redesign form.cart .pb-bookshop-editions-frontend,
body.pb-bookshop-single-redesign form.cart .pb-bookshop-binding-box {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin: 0 !important;
}
body.pb-bookshop-single-redesign form.cart .pb-bookshop-editions-frontend {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-editions-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-card {
  position: relative;
  display: block !important;
  min-width: 0 !important;
  padding: 12px 13px !important;
  border: 1px solid #e4e8ee !important;
  border-radius: 14px !important;
  background: #fbfcfd !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-card:hover {
  transform: translateY(-1px);
  border-color: #d2d8e1 !important;
  background: #fff !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-card.selected {
  border-color: rgba(143,29,29,.50) !important;
  background: #fffafa !important;
  box-shadow: 0 0 0 3px rgba(143,29,29,.06) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-card > input[type='radio'] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.pb-bookshop-edition-check {
  position: absolute;
  top: 11px;
  left: 11px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #d8dde5;
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 10px;
  font-weight: 900;
}
.pb-bookshop-edition-card.selected .pb-bookshop-edition-check {
  border-color: var(--pb-book-accent);
  background: var(--pb-book-accent);
  color: #fff;
}
.pb-bookshop-edition-topline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding-left: 28px;
}
.pb-bookshop-edition-name {
  min-width: 0;
  flex: 1;
  color: #202b3b !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.65 !important;
}
.pb-bookshop-edition-type {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 3px 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f1f3f6 !important;
  color: #6b7585 !important;
  font-size: 8.5px !important;
  font-weight: 800 !important;
}
.pb-bookshop-edition-type--digital { background: #eef4ff !important; color: #3849a8 !important; }
.pb-bookshop-file-formats { display: grid; gap: 5px; margin-top: 8px; }
.pb-bookshop-file-format { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 6px; }
.pb-bookshop-file-format strong { min-width: 46px; padding: 3px 6px; border-radius: 7px; background: #eef4ff; color: #3849a8; font-size: 8.5px; text-align: center; }
.pb-bookshop-file-format small,
.pb-bookshop-edition-note,
.pb-bookshop-file-size { color: #7d8798 !important; font-size: 9.5px !important; line-height: 1.7 !important; }
.pb-bookshop-edition-note { margin-top: 8px !important; }
.pb-bookshop-edition-price {
  margin-top: 9px !important;
  padding-top: 8px !important;
  border-top: 1px dashed #e3e7ec !important;
  color: var(--pb-book-accent) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-binding-box {
  padding: 11px !important;
  border: 1px solid #e3e7ec !important;
  border-radius: 12px !important;
  background: #f8f9fb !important;
  box-shadow: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-binding-box > label { margin-bottom: 6px !important; font-size: 10.5px !important; }
body.pb-bookshop-single-redesign #pb_selected_binding {
  width: 100% !important;
  max-width: none !important;
  min-height: 40px !important;
  border: 1px solid #d4d9e1 !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  font-size: 10.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-binding-hint { margin-top: 5px !important; font-size: 9px !important; }
body.pb-bookshop-single-redesign form.cart .quantity {
  grid-column: 1 !important;
  margin: 0 !important;
}
body.pb-bookshop-single-redesign form.cart .quantity .qty {
  width: 100% !important;
  min-height: 44px !important;
  border: 1px solid #d4d9e1 !important;
  border-radius: 11px !important;
  background: #fff !important;
}
body.pb-bookshop-single-redesign form.cart .single_add_to_cart_button,
body.pb-bookshop-single-redesign .pb-bookshop-call-box .button,
body.pb-bookshop-single-redesign .pb-bookshop-edition-call-box .button {
  grid-column: 2 !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 9px 16px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: var(--pb-book-accent) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(143,29,29,.16) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}
body.pb-bookshop-single-redesign form.cart .single_add_to_cart_button:hover { background: var(--pb-book-accent-hover) !important; }

/* --------------------------------------------------------------------------
 * Dedicated reviews under cover
 * -------------------------------------------------------------------------- */
.pb-bookshop-media-reviews {
  width: 100%;
  padding: 17px;
  border: 1px solid var(--pb-book-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16,24,40,.038);
}
.pb-bookshop-media-reviews__head {
  display: grid;
  gap: 11px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0f4;
}
.pb-bookshop-media-reviews__head > div:first-child > span {
  display: block;
  margin-bottom: 3px;
  color: var(--pb-book-accent);
  font-size: 8.5px;
  font-weight: 850;
}
.pb-bookshop-media-reviews__head h2 {
  margin: 0 !important;
  color: var(--pb-book-ink);
  font-size: 14px !important;
  font-weight: 850 !important;
}
.pb-bookshop-review-score {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f8f9fb;
}
.pb-bookshop-review-score > strong {
  grid-row: 1 / 3;
  color: var(--pb-book-ink);
  font-size: 24px;
  font-weight: 900;
}
.pb-bookshop-review-score > small { color: #8a94a6; font-size: 8.5px; }
.pb-bookshop-review-stars { display: inline-flex; gap: 1px; direction: ltr; }
.pb-bookshop-review-stars > span { color: #d7dce3; font-size: 12px; line-height: 1; }
.pb-bookshop-review-stars > span.is-filled { color: #f59e0b; }
.pb-bookshop-review-list { display: grid; gap: 8px; }
.pb-bookshop-review-card {
  padding: 11px;
  border: 1px solid #ebedf1;
  border-radius: 13px;
  background: #fcfcfd;
}
.pb-bookshop-review-card__top {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
}
.pb-bookshop-review-card__avatar img { width: 34px !important; height: 34px !important; border-radius: 50% !important; }
.pb-bookshop-review-card__identity { min-width: 0; }
.pb-bookshop-review-card__identity strong { display: block; color: #2b3748; font-size: 10.5px; font-weight: 850; }
.pb-bookshop-review-card__identity span { display: block; margin-top: 2px; color: #98a2b3; font-size: 7.8px; }
.pb-bookshop-review-card__verified { padding: 3px 6px; border-radius: 999px; background: #ecfdf3; color: #027a48; font-size: 7.2px; font-weight: 850; }
.pb-bookshop-review-card__rating { margin-top: 7px; }
.pb-bookshop-review-card__text { margin-top: 7px; color: #536074; font-size: 9.5px; line-height: 1.9; }
.pb-bookshop-review-card__text p:last-child { margin-bottom: 0; }
.pb-bookshop-review-empty { display: grid; place-items: center; gap: 4px; padding: 14px 10px; border: 1px dashed #e0e4ea; border-radius: 12px; color: #929cac; text-align: center; }
.pb-bookshop-review-empty > span { color: #f59e0b; font-size: 20px; }
.pb-bookshop-review-empty p { margin: 0; font-size: 9px; }
.pb-bookshop-review-more { margin-top: 9px; }
.pb-bookshop-review-more > summary {
  cursor: pointer;
  color: #5d6879;
  font-size: 9px;
  font-weight: 800;
  list-style: none;
}
.pb-bookshop-review-list--more { margin-top: 8px; }
.pb-bookshop-review-compose {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e4e8ee;
  border-radius: 14px;
  background: #fff;
}
.pb-bookshop-review-compose > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
  color: #2b3748;
  font-size: 10px;
  font-weight: 850;
}
.pb-bookshop-review-compose > summary::-webkit-details-marker { display: none; }
.pb-bookshop-review-compose > summary small { color: #98a2b3; font-size: 7.5px; font-weight: 700; }
.pb-bookshop-review-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfd;
}
.pb-bookshop-review-form label > span,
.pb-bookshop-review-rating-input legend { display: block; margin-bottom: 5px; color: #566176; font-size: 8.5px; font-weight: 800; }
.pb-bookshop-review-form input[type='text'],
.pb-bookshop-review-form textarea {
  width: 100%;
  border: 1px solid #dce1e8;
  border-radius: 10px;
  background: #fff;
  color: #2d394b;
  font-family: inherit;
  font-size: 10px;
  outline: 0;
}
.pb-bookshop-review-form input[type='text'] { min-height: 39px; padding: 0 10px; }
.pb-bookshop-review-form textarea { min-height: 90px; padding: 9px 10px; resize: vertical; line-height: 1.8; }
.pb-bookshop-review-form input:focus,
.pb-bookshop-review-form textarea:focus { border-color: rgba(143,29,29,.48); box-shadow: 0 0 0 3px rgba(143,29,29,.06); }
.pb-bookshop-review-form__signed-in { padding: 9px 10px; border-radius: 10px; background: #f3f5f7; }
.pb-bookshop-review-form__signed-in span { color: #8a94a6; font-size: 7.8px; }
.pb-bookshop-review-form__signed-in strong { display: block; margin-top: 2px; color: #2d394b; font-size: 10px; }
.pb-bookshop-review-rating-input { margin: 0; padding: 0; border: 0; }
.pb-bookshop-review-rating-input__choices { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; direction: ltr; }
.pb-bookshop-review-rating-input__choices label { cursor: pointer; }
.pb-bookshop-review-rating-input__choices input { position: absolute; opacity: 0; pointer-events: none; }
.pb-bookshop-review-rating-input__choices span {
  display: grid;
  place-items: center;
  min-height: 34px;
  margin: 0 !important;
  border: 1px solid #e0e4ea;
  border-radius: 9px;
  background: #fff;
  color: #f59e0b;
  font-size: 9px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.pb-bookshop-review-rating-input__choices input:checked + span { border-color: #f0b95a; background: #fffbeb; transform: translateY(-1px); }
.pb-bookshop-review-captcha {
  display: grid;
  grid-template-columns: minmax(0,1fr) 74px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e1e5eb;
  border-radius: 11px;
  background: #f7f8fa;
}
.pb-bookshop-review-captcha > div span { display: block; color: #8c96a6; font-size: 7.5px; }
.pb-bookshop-review-captcha > div strong { display: block; margin-top: 2px; color: #2c394c; font-size: 11px; direction: ltr; text-align: right; }
.pb-bookshop-review-captcha input { text-align: center; }
.pb-bookshop-review-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.pb-bookshop-review-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--pb-book-accent);
  color: #fff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.pb-bookshop-review-submit:hover { background: var(--pb-book-accent-hover); }
.pb-bookshop-review-note,
.pb-bookshop-review-login { margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; background: #f8f9fb; color: #667085; font-size: 9px; line-height: 1.8; }

/* --------------------------------------------------------------------------
 * Description tabs
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .woocommerce-tabs {
  margin-top: 0 !important;
  margin-bottom: 28px !important;
  padding: clamp(18px, 2vw, 26px) !important;
  border: 1px solid var(--pb-book-line) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(16,24,40,.035) !important;
}
body.pb-bookshop-single-redesign .woocommerce-tabs ul.tabs { margin-bottom: 16px !important; }

/* --------------------------------------------------------------------------
 * Related + latest — one shared carousel component, related always first.
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .pb-bookshop-discovery {
  display: grid !important;
  gap: 24px !important;
  margin-top: 0 !important;
  margin-bottom: 46px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-section {
  width: 100% !important;
  min-width: 0 !important;
  padding: clamp(18px, 1.8vw, 24px) !important;
  overflow: hidden !important;
  border: 1px solid var(--pb-book-line) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 12px 34px rgba(16,24,40,.04) !important;
}
.pb-bookshop-discovery-section__head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 0 16px !important;
}
.pb-bookshop-discovery-section__eyebrow { display: block; margin-bottom: 3px; color: var(--pb-book-accent); font-size: 8.5px; font-weight: 850; }
.pb-bookshop-discovery-section__head h2 { margin: 0 !important; color: var(--pb-book-ink); font-size: clamp(18px, 1.55vw, 22px) !important; font-weight: 900 !important; }
.pb-bookshop-discovery-section__head p { margin: 4px 0 0 !important; color: #8a94a6; font-size: 10px !important; }
.pb-bookshop-discovery-section__actions { display: flex; align-items: center; gap: 6px; }
.pb-bookshop-discovery-section__count { display: inline-grid; min-width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #f2f4f7; color: #667085; font-size: 9px; font-weight: 850; }
.pb-bookshop-carousel-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe3e9;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-family: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.pb-bookshop-carousel-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: #cfd5de; background: #f7f8fa; }
.pb-bookshop-carousel-btn:disabled { opacity: .3; cursor: default; }

.pb-bookshop-discovery-viewport {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 1px 9px !important;
  direction: rtl;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.pb-bookshop-discovery-viewport::-webkit-scrollbar { display: none; }
.pb-bookshop-discovery-track {
  display: flex !important;
  flex-flow: row nowrap !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  align-items: stretch !important;
  direction: rtl;
}

/* Exactly five cards in a desktop viewport. */
.pb-bookshop-discovery-card {
  flex: 0 0 calc((100% - 56px) / 5) !important;
  width: calc((100% - 56px) / 5) !important;
  min-width: 0 !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid #e4e8ee !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 7px 20px rgba(16,24,40,.035) !important;
  direction: rtl;
  scroll-snap-align: start;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pb-bookshop-discovery-card:hover { transform: translateY(-4px); border-color: #d2d8e1 !important; box-shadow: 0 16px 30px rgba(16,24,40,.08) !important; }
.pb-bookshop-discovery-card__cover {
  position: relative;
  display: grid !important;
  width: 100% !important;
  height: 260px !important;
  place-items: center !important;
  padding: 14px 12px 10px !important;
  overflow: hidden !important;
  border-bottom: 1px solid #edf0f3 !important;
  background: radial-gradient(circle at 50% 30%, #fff 0%, #fafbfc 58%, #f2f4f7 100%) !important;
}
.pb-bookshop-discovery-card__cover img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 91% !important;
  max-height: 235px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 4px !important;
  box-shadow: 0 10px 21px rgba(15,23,42,.12) !important;
  transition: transform .18s ease;
}
.pb-bookshop-discovery-card:hover .pb-bookshop-discovery-card__cover img { transform: translateY(-2px) scale(1.01); }
.pb-bookshop-discovery-card__body { display: flex !important; flex: 1 !important; flex-direction: column !important; padding: 12px 13px 13px !important; }
.pb-bookshop-discovery-card__badges { display: flex; flex-wrap: wrap; gap: 5px; min-height: 19px; margin-bottom: 7px; }
.pb-bookshop-discovery-card__badge { display: inline-flex; margin: 0 !important; padding: 3px 6px !important; border-radius: 999px !important; background: #f2f4f7 !important; color: #697386 !important; font-size: 7.5px !important; font-weight: 850 !important; }
.pb-bookshop-discovery-card__badge--type { background: #fff1f2 !important; color: #9f3942 !important; }
.pb-bookshop-discovery-card h3 {
  min-height: 45px !important;
  margin: 0 0 8px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  line-height: 1.8 !important;
  direction: ltr !important;
  text-align: left !important;
}
.pb-bookshop-discovery-card h3 a {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #1f2938 !important;
  direction: ltr !important;
  text-align: left !important;
  text-decoration: none !important;
  unicode-bidi: plaintext;
}
.pb-bookshop-discovery-card__meta {
  display: grid !important;
  gap: 4px !important;
  min-height: 45px !important;
  margin-bottom: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f8f9fb;
  color: #667085 !important;
  font-size: 8.3px !important;
  line-height: 1.55;
}
.pb-bookshop-discovery-card__meta span { display: grid !important; grid-template-columns: auto minmax(0,1fr); gap: 5px; min-width: 0; }
.pb-bookshop-discovery-card__meta b { color: #98a2b3 !important; font-weight: 750 !important; }
.pb-bookshop-discovery-card__meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-bookshop-discovery-card__foot { display: grid !important; gap: 8px !important; margin-top: auto !important; padding-top: 9px !important; border-top: 1px solid #edf0f3 !important; }
.pb-bookshop-discovery-card__price { display: block !important; min-height: 55px !important; }
.pb-bookshop-card-price { position: relative; display: grid; gap: 4px; }
.pb-bookshop-card-price > small,
.pb-bookshop-card-price__old small,
.pb-bookshop-card-price__new small { color: #929cac; font-size: 7.4px; font-weight: 750; }
.pb-bookshop-card-price > strong,
.pb-bookshop-card-price__new strong { color: var(--pb-book-accent); font-size: 10px; font-weight: 900; line-height: 1.5; }
.pb-bookshop-card-price__old,
.pb-bookshop-card-price__new { display: grid; gap: 1px; align-items: start; }
.pb-bookshop-card-price__old del { color: #9ba4b2 !important; font-size: 8.7px !important; font-weight: 650 !important; }
.pb-bookshop-card-price__new strong { font-size: 11px !important; }
.pb-bookshop-card-price__discount { position: absolute; top: 0; left: 0; padding: 2px 5px; border-radius: 999px; background: #fff0f1; color: #a33b44; font-size: 6.8px; font-weight: 850; }
.pb-bookshop-discovery-card__link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  padding: 7px 9px !important;
  border: 1px solid #e4e8ee !important;
  border-radius: 9px !important;
  background: #f8f9fb !important;
  color: #465267 !important;
  font-size: 8.7px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
}
.pb-bookshop-discovery-card__link:hover { border-color: #ead4d7 !important; background: var(--pb-book-accent-soft) !important; color: var(--pb-book-accent) !important; }
.pb-bookshop-carousel-progress { position: relative; height: 3px; margin: 11px 0 0; overflow: hidden; border-radius: 999px; background: #eef1f4; }
.pb-bookshop-carousel-progress span { display: block; width: 100%; height: 100%; border-radius: inherit; background: #c5ccd6; transform: scaleX(.08); transform-origin: right center; transition: transform .12s linear; }

/* --------------------------------------------------------------------------
 * Responsive
 * -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .pb-bookshop-discovery-card {
    flex-basis: calc((100% - 42px) / 4) !important;
    width: calc((100% - 42px) / 4) !important;
  }
}

@media (max-width: 980px) {
  body.pb-bookshop-single-redesign .pb-bookshop-product-hero {
    grid-template-columns: minmax(220px, .82fr) minmax(0, 1.8fr) !important;
    gap: 18px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
    gap: 11px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > form.cart,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > form.cart { padding: 14px !important; }
  .pb-bookshop-quick-meta__grid { gap: 6px !important; }
  .pb-bookshop-quick-meta__item { padding: 9px !important; }
  .pb-bookshop-discovery-card {
    flex-basis: calc((100% - 28px) / 3) !important;
    width: calc((100% - 28px) / 3) !important;
  }
}

@media (max-width: 820px) {
  body.pb-bookshop-single-redesign .pb-bookshop-product-hero {
    display: flex !important;
    flex-direction: column !important;
    width: calc(100% - 24px) !important;
    gap: 14px !important;
    margin-top: 20px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-content { order: 1; }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media { order: 2; width: 100%; }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > form.cart {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media > div.images,
  body.pb-bookshop-single-redesign .pb-bookshop-product-media > .woocommerce-product-gallery {
    width: min(100%, 270px) !important;
    margin-inline: auto !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image > a { min-height: 255px !important; }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image img { max-height: 300px !important; }
  body.pb-bookshop-single-redesign .pb-bookshop-media-reviews { width: min(100%, 520px); margin-inline: auto; }
  body.pb-bookshop-single-redesign .woocommerce-tabs,
  body.pb-bookshop-single-redesign .pb-bookshop-discovery { width: calc(100% - 24px) !important; }
  .pb-bookshop-discovery-card {
    flex-basis: calc((100% - 14px) / 2) !important;
    width: calc((100% - 14px) / 2) !important;
  }
}

@media (max-width: 520px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro { padding: 14px !important; border-radius: 17px !important; }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title { font-size: 18px !important; }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price { width: 100% !important; }
  .pb-bookshop-quick-meta__grid { grid-template-columns: 1fr 1fr !important; }
  .pb-bookshop-discovery-section { padding: 14px !important; border-radius: 17px !important; }
  .pb-bookshop-discovery-section__head p,
  .pb-bookshop-discovery-section__count { display: none !important; }
  .pb-bookshop-carousel-btn { width: 31px; height: 31px; }
  .pb-bookshop-discovery-card { flex-basis: 78% !important; width: 78% !important; }
  .pb-bookshop-discovery-card__cover { height: 238px !important; }
  .pb-bookshop-discovery-card__cover img { max-height: 216px !important; }
  .pb-bookshop-review-captcha { grid-template-columns: minmax(0,1fr) 68px; }
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-section--related { order: 1 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-discovery-section--latest { order: 2 !important; }
.pb-bookshop-review-form__error {
  margin: 0 !important;
  padding: 8px 10px;
  border: 1px solid #f2c7cc;
  border-radius: 9px;
  background: #fff4f5;
  color: #a02b36;
  font-size: 8.8px;
  font-weight: 750;
  line-height: 1.7;
}


/* --------------------------------------------------------------------------
 * 1.0.90.268 — surface + readability pass
 * The previous compact 9–11px scale was too small on real desktop displays.
 * -------------------------------------------------------------------------- */
body.pb-bookshop-single-redesign .pb-bookshop-product-content,
body.pb-bookshop-single-redesign .pb-bookshop-product-media {
  font-size: 15px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
  font-size: clamp(20px, 1.35vw, 23px) !important;
  line-height: 1.5 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price {
  font-size: 17px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del {
  font-size: 14px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins {
  font-size: clamp(19px, 1.45vw, 23px) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del::before,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins::before {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-details__short-description {
  font-size: 13.5px !important;
  line-height: 1.95 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__eyebrow,
body.pb-bookshop-single-redesign .pb-bookshop-editions-head .pb-bookshop-editions-eyebrow {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__head h3,
body.pb-bookshop-single-redesign .pb-bookshop-editions-head .pb-bookshop-editions-title {
  font-size: 19px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__head p,
body.pb-bookshop-single-redesign .pb-bookshop-editions-head p {
  font-size: 13px !important;
  line-height: 1.85 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__item small {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__item strong {
  font-size: 14px !important;
  line-height: 1.7 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-name {
  font-size: 15px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-type,
body.pb-bookshop-single-redesign .pb-bookshop-file-format strong {
  font-size: 10px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-file-format small,
body.pb-bookshop-single-redesign .pb-bookshop-edition-note,
body.pb-bookshop-single-redesign .pb-bookshop-file-size {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-edition-price {
  font-size: 14px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-binding-box > label,
body.pb-bookshop-single-redesign #pb_selected_binding {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-binding-hint {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign form.cart .single_add_to_cart_button,
body.pb-bookshop-single-redesign .pb-bookshop-call-box .button,
body.pb-bookshop-single-redesign .pb-bookshop-edition-call-box .button {
  font-size: 14px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-media-reviews__head > div:first-child > span,
body.pb-bookshop-single-redesign .pb-bookshop-review-form label > span,
body.pb-bookshop-single-redesign .pb-bookshop-review-rating-input legend {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-media-reviews__head h2 {
  font-size: 16px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-review-card__identity strong,
body.pb-bookshop-single-redesign .pb-bookshop-review-form input[type='text'],
body.pb-bookshop-single-redesign .pb-bookshop-review-form textarea,
body.pb-bookshop-single-redesign .pb-bookshop-review-submit {
  font-size: 12px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-review-card__text,
body.pb-bookshop-single-redesign .pb-bookshop-review-note,
body.pb-bookshop-single-redesign .pb-bookshop-review-login {
  font-size: 11px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-section__eyebrow {
  font-size: 10px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-section__head h2 {
  font-size: clamp(20px, 1.7vw, 24px) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-section__head p {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card h3 {
  font-size: 14px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card__meta {
  font-size: 10px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price > small,
body.pb-bookshop-single-redesign .pb-bookshop-card-price__old small,
body.pb-bookshop-single-redesign .pb-bookshop-card-price__new small {
  font-size: 9px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price > strong,
body.pb-bookshop-single-redesign .pb-bookshop-card-price__new strong {
  font-size: 13.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card__link {
  font-size: 13.5px !important;
}

/* Actual mobile stack: desktop/laptop pair stays horizontal until 820px. */
@media (max-width: 820px) {
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
    flex-direction: column !important;
    gap: 12px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > form.cart,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-call-box,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-edition-call-box {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels > form.cart {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline-end: 0 !important;
  }
}


/* 1.0.90.267 hard fallback for environments where JS is delayed/blocked.
 * The two primary nodes are flex items in the existing server wrapper until
 * the DOM normalizer places them into .pb-bookshop-primary-pair. */
@media (min-width: 821px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels:not(:has(.pb-bookshop-primary-pair)) {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: stretch !important;
    gap: 18px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels:not(:has(.pb-bookshop-primary-pair)) > .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels:not(:has(.pb-bookshop-primary-pair)) > form.cart {
    flex: 1 1 0 !important;
    display: block !important;
    width: calc(50% - 9px) !important;
    max-width: calc(50% - 9px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels:not(:has(.pb-bookshop-primary-pair)) > form.cart {
    display: grid !important;
    grid-template-columns: 78px minmax(0, 1fr) !important;
    align-content: start !important;
  }
}

/* --------------------------------------------------------------------------
 * 1.0.90.268 final authoritative polish — real-site theme override guard
 * -------------------------------------------------------------------------- */
@media (min-width: 821px) {
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
    padding: 10px !important;
    gap: 12px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > form.cart,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-call-box,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair > .pb-bookshop-edition-call-box {
    flex: 1 1 0 !important;
    width: calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
    min-width: 0 !important;
    padding: 18px !important;
    border: 1px solid #dfe4ea !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(16,24,40,.045) !important;
  }
}

body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__eyebrow,
body.pb-bookshop-single-redesign .pb-bookshop-editions-head .pb-bookshop-editions-eyebrow { font-size: 11px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__head h3,
body.pb-bookshop-single-redesign .pb-bookshop-editions-head .pb-bookshop-editions-title { font-size: 19px !important; line-height: 1.55 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__head p,
body.pb-bookshop-single-redesign .pb-bookshop-editions-head p { font-size: 12.5px !important; line-height: 1.85 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__item small { font-size: 11.5px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__item strong { font-size: 14px !important; line-height: 1.7 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-edition-name { font-size: 15px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-edition-type,
body.pb-bookshop-single-redesign .pb-bookshop-file-format strong { font-size: 11px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-file-format small,
body.pb-bookshop-single-redesign .pb-bookshop-edition-note,
body.pb-bookshop-single-redesign .pb-bookshop-file-size { font-size: 12.5px !important; line-height: 1.85 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-edition-price { font-size: 14px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-binding-box > label,
body.pb-bookshop-single-redesign #pb_selected_binding { font-size: 13.5px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-binding-hint { font-size: 11.5px !important; }
body.pb-bookshop-single-redesign form.cart .single_add_to_cart_button { font-size: 14px !important; }

@media (max-width: 820px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro {
    grid-template-columns: 1fr !important;
    grid-template-areas: "title" "rating" "price" "excerpt" !important;
    gap: 9px !important;
    padding: 14px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price { max-width: 100% !important; }
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair { padding: 8px !important; }
}

/* ========================================================================== 
 * 1.0.90.269 — FINAL STRUCTURAL PASS
 * Server-rendered neutral shells replace form.cart as the layout column.
 * ========================================================================== */

/* Exactly two visual rows above the panels: one-line title, one-line price. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
  padding: 12px 16px !important;
  border-radius: 17px !important;
  direction: ltr !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--pb-book-ink) !important;
  font-size: clamp(17px, 1.22vw, 20px) !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  direction: ltr !important;
  unicode-bidi: plaintext;
}
/* Score already exists in the dedicated review card and the user requested a
 * strict two-row header, so duplicate rating/excerpt are intentionally hidden. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-rating,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-details__short-description {
  display: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-radius: 11px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  direction: rtl !important;
  scrollbar-width: none;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price::-webkit-scrollbar { display: none; }
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price > span {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  align-items: baseline !important;
  gap: 4px !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del::before,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins::before { content: none !important; }
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price del {
  color: #929aa8 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price ins,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price > .amount,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price > span:not(del) {
  color: var(--pb-book-accent) !important;
  font-size: clamp(14px, 1.05vw, 17px) !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

/* True 50/50 shells. form.cart is intentionally NOT a grid child anymore. */
body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  gap: 14px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid #e3e7ed !important;
  border-radius: 22px !important;
  background: #f3f5f8 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 10px 26px rgba(16,24,40,.03) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-facts-column,
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-facts-column {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: 12px !important;
  align-content: start !important;
  background: transparent !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell {
  position: relative !important;
  display: block !important;
  align-self: stretch !important;
  padding: 18px !important;
  overflow: hidden !important;
  border: 1px solid #dce2e9 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 9px 24px rgba(16,24,40,.05) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell::before,
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta::before,
body.pb-bookshop-single-redesign .pb-bookshop-format-guide::before {
  content: '';
  position: absolute;
  top: 0;
  right: 18px;
  width: 52px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--pb-book-accent), #d58d96);
}
/* Metadata and format guide are separate cards in the facts column. */
body.pb-bookshop-single-redesign .pb-bookshop-facts-column > .pb-bookshop-quick-meta,
body.pb-bookshop-single-redesign .pb-bookshop-format-guide {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 17px !important;
  overflow: hidden !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(16,24,40,.04) !important;
}
/* Woo form can now focus only on internal controls, never page geometry. */
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell > form.cart,
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell form.cart {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  float: none !important;
  clear: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-editions-frontend {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Digital format help card under book metadata. */
.pb-bookshop-format-guide__head {
  margin: 0 0 12px;
  padding: 0 0 11px;
  border-bottom: 1px solid #edf0f4;
}
.pb-bookshop-format-guide__head > span {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--pb-book-accent);
  font-size: 11px;
  font-weight: 850;
}
.pb-bookshop-format-guide__head h3 {
  margin: 0 !important;
  color: var(--pb-book-ink) !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.55 !important;
}
.pb-bookshop-format-guide__head p {
  margin: 4px 0 0 !important;
  color: #858fa0 !important;
  font-size: 11.5px !important;
  line-height: 1.75 !important;
}
.pb-bookshop-format-guide__list {
  display: grid;
  gap: 7px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.pb-bookshop-format-guide__list li {
  display: grid;
  grid-template-columns: minmax(105px, auto) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin: 0 !important;
  padding: 8px 9px;
  border: 1px solid #ebedf1;
  border-radius: 11px;
  background: #fafbfc;
}
.pb-bookshop-format-guide__list strong {
  color: #31405a;
  font-size: 10.5px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}
.pb-bookshop-format-guide__list span {
  color: #687386;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.75;
}

/* Purchase panel headings/readability. */
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-editions-title { font-size: 17px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-editions-head p { font-size: 12px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-name { font-size: 14px !important; }
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-note,
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-file-format small,
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-file-size { font-size: 11.5px !important; }

/* Carousel price rows: old price = exactly one line, new price = exactly one line. */
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card__price {
  display: block !important;
  min-height: 48px !important;
  overflow: hidden !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price {
  display: grid !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price__row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price__row small {
  flex: 0 0 auto !important;
  color: #8e98a8 !important;
  font-size: 8.5px !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price__row del,
body.pb-bookshop-single-redesign .pb-bookshop-card-price__row strong {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: clamp(9px, .72vw, 11px) !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.35 !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-card-price__row del { color: #9099a8 !important; font-weight: 650 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-card-price__row strong { color: var(--pb-book-accent) !important; font-weight: 900 !important; }
body.pb-bookshop-single-redesign .pb-bookshop-price-range,
body.pb-bookshop-single-redesign .pb-bookshop-price-currency { white-space: nowrap !important; }
/* Legacy discount pill is intentionally suppressed; it consumed horizontal room
 * and was one of the reasons long price ranges wrapped to four lines. */
body.pb-bookshop-single-redesign .pb-bookshop-card-price__discount { display: none !important; }

/* Keep five cards on normal desktop/laptop widths. */
@media (min-width: 981px) {
  body.pb-bookshop-single-redesign .pb-bookshop-discovery-card {
    flex: 0 0 calc((100% - 56px) / 5) !important;
    width: calc((100% - 56px) / 5) !important;
  }
}

@media (max-width: 980px) and (min-width: 821px) {
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 8px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell,
  body.pb-bookshop-single-redesign .pb-bookshop-facts-column > .pb-bookshop-quick-meta,
  body.pb-bookshop-single-redesign .pb-bookshop-format-guide { padding: 13px !important; }
  .pb-bookshop-format-guide__list li { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 820px) {
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 8px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell,
  body.pb-bookshop-single-redesign .pb-bookshop-facts-column { width: 100% !important; }
  .pb-bookshop-format-guide__list li { grid-template-columns: 1fr; gap: 3px; }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro { padding: 11px 13px !important; }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title { font-size: 17px !important; }
}
/* Prevent legacy Elementor/PB related widget from rendering a second mismatched block. */
body.pb-bookshop-single-redesign .pb-related-products-carousel,
body.pb-bookshop-single-redesign .elementor-widget-pb_bookshop_related_products_carousel {
  display: none !important;
}

/* 1.0.90.270 — discovery cards intentionally do not show any price. */
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card__price,
body.pb-bookshop-single-redesign .pb-bookshop-card-price {
  display: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card__foot {
  margin-top: auto !important;
  min-height: 0 !important;
  padding-top: 8px !important;
  display: block !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-discovery-card__link {
  width: 100% !important;
  min-height: 34px !important;
}

/* ========================================================================== 
 * 1.0.90.271 — THREE-COLUMN SINGLE BOOK REBALANCE
 * Desktop geometry: 23.33% cover (left) + 43.33% book info (middle)
 * + 33.33% edition purchase (right). This reduces the old one-third cover
 * rail by 30% and transfers the freed width to the middle information rail.
 * ========================================================================== */
@media (min-width: 981px) {
  body.pb-bookshop-single-redesign .pb-bookshop-product-hero {
    grid-template-columns: minmax(185px, .7fr) minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    gap: clamp(16px, 1.9vw, 28px) !important;
    direction: ltr !important;
  }

  /* Physical left: smaller cover rail. */
  body.pb-bookshop-single-redesign .pb-bookshop-product-media {
    grid-column: 1 !important;
    grid-row: 1 !important;
    direction: rtl !important;
  }

  /* Middle + physical right are owned by the summary wrapper. */
  body.pb-bookshop-single-redesign .pb-bookshop-product-content {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    direction: rtl !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-content > div.summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 14px 18px !important;
    align-items: start !important;
    direction: ltr !important;
  }

  /* Middle column: title + complete bibliographic information. */
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    margin: 0 !important;
    direction: rtl !important;
  }

  /* Flatten only PB's neutral layout shells so the two real columns can take
   * part directly in the summary grid without moving WooCommerce form nodes. */
  body.pb-bookshop-single-redesign .pb-bookshop-summary-panels,
  body.pb-bookshop-single-redesign .pb-bookshop-primary-pair {
    display: contents !important;
  }

  body.pb-bookshop-single-redesign .pb-bookshop-facts-column {
    grid-column: 1 !important;
    grid-row: 2 !important;
    direction: rtl !important;
  }

  /* Physical right: edition selector / purchase column. */
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    align-self: stretch !important;
    direction: rtl !important;
  }

  /* The cover itself can use the full newly-smaller rail without looking tiny. */
  body.pb-bookshop-single-redesign .pb-bookshop-product-media > div.images,
  body.pb-bookshop-single-redesign .pb-bookshop-product-media > .woocommerce-product-gallery {
    padding: clamp(16px, 1.6vw, 22px) !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image > a {
    min-height: 280px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media .woocommerce-product-gallery__image img,
  body.pb-bookshop-single-redesign .pb-bookshop-product-media div.images img {
    max-width: min(92%, 255px) !important;
    max-height: 390px !important;
  }
}

/* Title card no longer owns or displays Woo's generic product price. Prices
 * remain untouched inside each edition card / purchase control. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .price {
  display: none !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-summary-intro {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "title"
    "rating"
    "meta"
    "excerpt" !important;
  align-content: start !important;
  row-gap: 9px !important;
  padding: 18px 19px !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
  grid-area: title !important;
  direction: rtl !important;
  text-align: right !important;
  font-size: clamp(21px, 1.45vw, 26px) !important;
  line-height: 1.55 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-rating {
  grid-area: rating !important;
  justify-content: flex-start !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .pb-bookshop-quick-meta--intro {
  grid-area: meta !important;
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 3px 0 0 !important;
  padding: 14px !important;
  overflow: visible !important;
  border: 1px solid #e6e9ee !important;
  border-radius: 15px !important;
  background: #fafbfc !important;
  box-shadow: none !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .pb-bookshop-quick-meta--intro::before {
  content: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__head {
  margin: 0 0 10px !important;
  padding: 0 0 9px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__head p {
  display: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__eyebrow {
  font-size: 10.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__head h3 {
  font-size: 15px !important;
  line-height: 1.5 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item {
  padding: 10px 11px !important;
  background: #fff !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item--isbn {
  grid-column: 1 / -1 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item--sub-subject {
  background: linear-gradient(145deg, #fff 0%, #fafbfd 100%) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item small {
  font-size: 10.5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item strong {
  font-size: 12.5px !important;
  line-height: 1.9 !important;
  overflow-wrap: anywhere !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .woocommerce-product-details__short-description {
  grid-area: excerpt !important;
  margin-top: 1px !important;
}

/* Tablet keeps the visual order logical and avoids squeezing the 23/43/33
 * desktop ratio into a narrow viewport. */
@media (max-width: 980px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item--isbn {
    grid-column: auto !important;
  }
}

/* ========================================================================== 
 * 1.0.90.272 — COMPACT FACTS + DESCRIPTION CARD
 * ========================================================================== */

/* Smaller title; wrap naturally to the next line instead of clipping. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  overflow: visible !important;
  color: var(--pb-book-ink) !important;
  font-size: clamp(18px, 1.18vw, 22px) !important;
  font-weight: 850 !important;
  line-height: 1.55 !important;
  text-align: right !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  direction: rtl !important;
}

/* The bibliographic card contains only useful data rows: no duplicate heading. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .pb-bookshop-quick-meta--intro {
  margin: 1px 0 0 !important;
  padding: 8px 11px !important;
  border-radius: 13px !important;
  background: #fff !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item {
  display: grid !important;
  grid-template-columns: 70px minmax(0, 1fr) !important;
  gap: 7px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 5px 1px !important;
  border: 0 !important;
  border-bottom: 1px solid #eef0f3 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item:last-child {
  border-bottom: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item small {
  display: block !important;
  margin: 1px 0 0 !important;
  color: #8b94a3 !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1.7 !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__values {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px 6px !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #30394a !important;
  font-size: 11.5px !important;
  font-weight: 720 !important;
  line-height: 1.55 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__value {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  max-width: 100% !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 2px 6px !important;
  border: 1px solid #e7eaf0 !important;
  border-radius: 7px !important;
  background: #f8f9fb !important;
  line-height: 1.55 !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__value a {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__value a:hover {
  color: var(--pb-book-accent) !important;
}

/* New description card directly below book facts. */
body.pb-bookshop-single-redesign .pb-bookshop-description-card {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  overflow: hidden !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 13px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #576172 !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__excerpt,
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more p {
  margin: 0 !important;
  color: #576172 !important;
  font-size: 11.5px !important;
  font-weight: 520 !important;
  line-height: 1.9 !important;
  text-align: justify !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more {
  margin: 4px 0 0 !important;
  padding: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more summary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  color: var(--pb-book-accent) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.7 !important;
  cursor: pointer !important;
  list-style: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more summary::-webkit-details-marker { display: none !important; }
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more summary::after {
  content: '←' !important;
  font-size: 12px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more[open] summary {
  margin-bottom: 3px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more[open] summary::after {
  content: '↑' !important;
}

/* Pull the digital-format guide closer to the card above it. */
@media (min-width: 981px) {
  body.pb-bookshop-single-redesign .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-content > div.summary {
    row-gap: 7px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-facts-column {
    gap: 7px !important;
  }
}

@media (max-width: 980px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro {
    row-gap: 7px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .pb-bookshop-quick-meta--intro {
    padding: 7px 10px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-description-card {
    padding: 9px 10px !important;
  }
}

/* On very narrow screens give each value row the full width. The individual
 * publisher/author/subject chips still move as whole units and never split. */
@media (max-width: 480px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    padding: 5px 0 !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item small {
    margin: 0 !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
    font-size: 17px !important;
  }
}

/* ========================================================================== 
 * 1.0.90.273 — LEFT-ALIGNED BOOK COPY + RIGHT-RAIL REVIEWS + SMART STICKY
 * ========================================================================== */

/* Book title and description copy: left aligned while preserving natural
 * Persian/English bidi behavior inside the actual text. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .product_title {
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  direction: rtl !important;
  unicode-bidi: plaintext !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-description-card {
  direction: rtl !important;
  text-align: left !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__text,
body.pb-bookshop-single-redesign .pb-bookshop-description-card__excerpt,
body.pb-bookshop-single-redesign .pb-bookshop-description-card__remainder {
  margin: 0 !important;
  color: #576172 !important;
  font-size: 11.5px !important;
  font-weight: 520 !important;
  line-height: 1.9 !important;
  text-align: left !important;
  direction: rtl !important;
  unicode-bidi: plaintext !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__remainder[hidden] {
  display: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__toggle {
  appearance: none !important;
  display: inline !important;
  margin: 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--pb-book-accent) !important;
  font: inherit !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: inherit !important;
  text-decoration: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__toggle:hover,
body.pb-bookshop-single-redesign .pb-bookshop-description-card__toggle:focus-visible {
  color: var(--pb-book-accent-hover) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}
/* Retire the previous native-details styling if cached markup is briefly seen. */
body.pb-bookshop-single-redesign .pb-bookshop-description-card__more { display: none !important; }

/* Bibliographic facts are deliberately LTR/left aligned. Labels are English;
 * each actual author/publisher/subject remains a whole, non-breaking chip. */
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro > .pb-bookshop-quick-meta--intro,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__grid,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item {
  direction: ltr !important;
  text-align: left !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item small {
  text-align: left !important;
  direction: ltr !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__values {
  justify-content: flex-start !important;
  direction: ltr !important;
  text-align: left !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__value,
body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__value a {
  max-width: 100% !important;
  text-align: left !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  unicode-bidi: plaintext !important;
}

/* The physical-right rail owns purchase first and reviews immediately below. */
body.pb-bookshop-single-redesign .pb-bookshop-purchase-column {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 14px !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-column > .pb-bookshop-media-reviews {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

@media (min-width: 981px) {
  /* Promote the right rail, rather than the nested shell, into summary grid. */
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-column {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    align-self: stretch !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell {
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: flex-start !important;
  }

  /* The cover rail sticks independently and is bounded by the full hero.
   * JS keeps --pb-book-sticky-top just below any fixed/sticky site menu. */
  body.pb-bookshop-single-redesign .pb-bookshop-product-media {
    position: sticky !important;
    top: var(--pb-book-sticky-top, 118px) !important;
    align-self: start !important;
    z-index: 4 !important;
  }
}

@media (max-width: 980px) {
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-column {
    width: 100% !important;
    gap: 10px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media {
    position: relative !important;
    top: auto !important;
  }
}

@media (max-width: 480px) {
  body.pb-bookshop-single-redesign .pb-bookshop-summary-intro .pb-bookshop-quick-meta__item {
    grid-template-columns: 1fr !important;
  }
}


/* ========================================================================== 
 * 1.0.90.274 — TIGHT GUIDE STACK + LEGACY DESCRIPTION TAB RETIREMENT
 * ========================================================================== */
body.pb-bookshop-single-redesign .woocommerce-tabs ul.tabs li.description_tab,
body.pb-bookshop-single-redesign .woocommerce-tabs .woocommerce-Tabs-panel--description,
body.pb-bookshop-single-redesign #tab-description {
  display: none !important;
}

@media (min-width: 981px) {
  body.pb-bookshop-single-redesign .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-content > div.summary {
    row-gap: 8px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-facts-column {
    gap: 8px !important;
  }
}
body.pb-bookshop-single-redesign .pb-bookshop-format-guide {
  margin-top: 0 !important;
}


/* ==========================================================================
 * 1.0.90.275 — COMPACT DIGITAL GUIDE + TRUE TWO-RAIL HERO + STICKY CLEARANCE
 * ========================================================================== */
@media (min-width: 981px) {
  body.pb-bookshop-single-redesign .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-content > div.summary {
    grid-template-columns: minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    grid-template-rows: minmax(0, auto) !important;
    column-gap: 18px !important;
    row-gap: 0 !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-middle-column {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    direction: rtl !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-middle-column > .pb-bookshop-summary-intro,
  body.pb-bookshop-single-redesign .pb-bookshop-middle-column .pb-bookshop-facts-column {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    margin: 0 !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-column {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media {
    top: var(--pb-book-sticky-top, 200px) !important;
  }
}

/* The first DOM cell is the physical-right column in RTL; keep it centered. */
body.pb-bookshop-single-redesign .pb-bookshop-format-guide__list li > strong {
  width: 100% !important;
  text-align: center !important;
  justify-self: stretch !important;
}

/* No accidental vertical margin between the description/meta stack and guide. */
body.pb-bookshop-single-redesign .pb-bookshop-middle-column .pb-bookshop-facts-column,
body.pb-bookshop-single-redesign .pb-bookshop-middle-column .pb-bookshop-format-guide {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}


/* ========================================================================== 
 * 1.0.90.276 — COMPACT EDITION PICKER
 * Remove non-essential helper copy/counts and tighten selectable edition cards.
 * ========================================================================== */
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-editions-head {
  display: block !important;
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-editions-head .pb-bookshop-editions-title {
  margin: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-editions-list {
  gap: 6px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-card {
  padding: 9px 11px !important;
  border-radius: 12px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-check {
  top: 9px !important;
  left: 9px !important;
  width: 20px !important;
  height: 20px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-topline {
  gap: 6px !important;
  padding-left: 26px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-name {
  line-height: 1.5 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-type {
  padding: 2px 7px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-file-formats {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 5px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-file-format {
  display: inline-flex !important;
  width: auto !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-file-format strong {
  min-width: 0 !important;
  padding: 2px 6px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-file-size {
  margin-top: 4px !important;
  line-height: 1.5 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell .pb-bookshop-edition-price {
  margin-top: 5px !important;
  padding-top: 5px !important;
}

/* ========================================================================== 
 * 1.0.90.277 — MOBILE PRODUCT FLOW + DIGITAL BADGE CLEANUP
 * ========================================================================== */
/* 1.0.90.278: Keep the compact edition-type badge for both print and digital
 * choices. Only the generic fallback file-format chip “دیجیتال” stays hidden;
 * concrete PDF/EPUB/etc. chips remain visible. */
body.pb-bookshop-single-redesign .pb-bookshop-file-format--digital {
  display: none !important;
}

@media (max-width: 820px) {
  /* Mobile canonical reading flow:
   * cover -> book summary/description -> digital guide -> editions -> reviews.
   * Discovery carousels are server-rendered after the hero, so they naturally
   * follow reviews without any JS DOM movement. */
  body.pb-bookshop-single-redesign .pb-bookshop-product-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-media {
    order: 1 !important;
    width: 100% !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-content {
    order: 2 !important;
    width: 100% !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce .pb-bookshop-product-content > div.summary,
  body.pb-bookshop-single-redesign .woocommerce-page .pb-bookshop-product-content > div.summary {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-middle-column {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-purchase-column {
    order: 2 !important;
    width: 100% !important;
  }

  /* Explicitly keep the compact product description visible on mobile. */
  body.pb-bookshop-single-redesign .pb-bookshop-description-card,
  body.pb-bookshop-single-redesign .pb-bookshop-description-card__text,
  body.pb-bookshop-single-redesign .pb-bookshop-description-card__excerpt {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-description-card__remainder:not([hidden]) {
    display: inline !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-description-card__remainder[hidden] {
    display: none !important;
  }

  /* Keep the guide immediately after description/details without inherited grid gaps. */
  body.pb-bookshop-single-redesign .pb-bookshop-middle-column .pb-bookshop-facts-column,
  body.pb-bookshop-single-redesign .pb-bookshop-middle-column .pb-bookshop-format-guide {
    width: 100% !important;
    margin: 0 !important;
  }
}

/* ========================================================================== 
 * 1.0.90.282 — FORMATTED DESCRIPTION + STOCK/CTA LAYOUT HARDENING
 * ========================================================================== */

/* The product description is authored content. Preserve its paragraph/list/BR
 * structure and safe inline styles instead of flattening everything into one
 * forced text line. Only provide neutral defaults at the card level. */
body.pb-bookshop-single-redesign .pb-bookshop-description-card {
  overflow: visible !important;
  text-align: left !important;
  direction: rtl !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__view[hidden] {
  display: none !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted {
  color: #576172;
  font-size: 11.5px;
  font-weight: 520;
  line-height: 1.9;
  text-align: left;
  direction: rtl;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted > :first-child {
  margin-top: 0;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted > :last-child {
  margin-bottom: 0;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted p {
  margin-top: 0;
  margin-bottom: .85em;
  white-space: normal;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted br {
  display: initial !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted ul,
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted ol {
  margin-top: .45em;
  margin-bottom: .85em;
  padding-inline-start: 1.5em;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__formatted li + li {
  margin-top: .28em;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__toggle {
  margin-top: 4px !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-description-card__toggle--collapse {
  display: inline-block !important;
  margin-top: 8px !important;
}

/* ISBN is the one bibliographic value that must stay Latin/English digits even
 * when the site-wide Persian-digit observer is active. */
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__item--isbn .pb-bookshop-quick-meta__values,
body.pb-bookshop-single-redesign .pb-bookshop-quick-meta__item--isbn .pb-bookshop-quick-meta__value {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-variant-numeric: tabular-nums;
}

/* When WooCommerce itself is out of stock the normal add-to-cart form is absent.
 * Keep the purchase rail geometrically stable and render the contact CTA as the
 * content of the existing purchase shell instead of letting legacy theme rules
 * stretch or float it. */
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell > .pb-bookshop-call-box {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell > .pb-bookshop-call-box .button {
  width: 100% !important;
  margin: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell > .pb-bookshop-call-box .pb-bookshop-call-hint {
  margin: 8px 0 0 !important;
}


/* ==========================================================================
 * 1.0.90.284 — OUT-OF-STOCK / CONTACT HERO GEOMETRY HARDENING
 * ========================================================================== */

/* The contact state must be a content variant of the normal purchase rail,
 * never a different page layout. Reset common theme .outofstock floats/widths
 * with a deliberately high-specificity PB scope. */
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-hero,
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce-page div.product .pb-bookshop-product-hero {
  position: relative !important;
  float: none !important;
  clear: both !important;
  width: min(calc(100% - 40px), var(--pb-book-container)) !important;
  max-width: var(--pb-book-container) !important;
  min-width: 0 !important;
  writing-mode: horizontal-tb !important;
}

body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-media,
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-content,
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-content > div.summary,
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-middle-column,
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-purchase-column,
body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-purchase-shell {
  float: none !important;
  clear: none !important;
  max-width: none !important;
  min-width: 0 !important;
  writing-mode: horizontal-tb !important;
  box-sizing: border-box !important;
}

body.pb-bookshop-single-redesign .pb-bookshop-contact-purchase {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-contact-purchase > .pb-bookshop-call-box,
body.pb-bookshop-single-redesign .pb-bookshop-purchase-shell--contact > .pb-bookshop-call-box {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-contact-purchase .pb-bookshop-call-box .button {
  width: 100% !important;
  margin: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-contact-purchase .pb-bookshop-call-hint {
  margin: 8px 0 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-contact-purchase .pb-bookshop-call-hint p {
  margin: 0 !important;
}
body.pb-bookshop-single-redesign .pb-bookshop-contact-purchase .pb-bookshop-call-hint p + p {
  margin-top: 6px !important;
}

/* Related/latest sections must start only after the full hero. This also
 * neutralizes old theme floats that can make them rise beside an out-of-stock
 * summary instead of below it. */
body.pb-bookshop-single-redesign .pb-bookshop-discovery {
  position: relative !important;
  float: none !important;
  clear: both !important;
  isolation: isolate !important;
}

@media (min-width: 981px) {
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-hero {
    display: grid !important;
    grid-template-columns: minmax(185px, .7fr) minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    grid-template-rows: auto !important;
    gap: clamp(16px, 1.9vw, 28px) !important;
    align-items: start !important;
    direction: ltr !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-media {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-content {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    position: relative !important;
    width: 100% !important;
    align-self: start !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-content > div.summary {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    grid-template-rows: auto !important;
    column-gap: 18px !important;
    row-gap: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start !important;
    direction: ltr !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-middle-column {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    gap: 8px !important;
    direction: rtl !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-purchase-column {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 285px !important;
    align-self: start !important;
    direction: rtl !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-purchase-shell {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
  }
}

@media (max-width: 820px) {
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-hero {
    display: flex !important;
    flex-direction: column !important;
    width: calc(100% - 24px) !important;
    gap: 12px !important;
  }
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-media,
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-content,
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-product-content > div.summary,
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-middle-column,
  body.single-product.pb-bookshop-single-redesign.pb-bookshop-cta-replace .woocommerce div.product .pb-bookshop-purchase-column {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}


/* ========================================================================== 
 * 1.0.90.285 — INDEPENDENT CONTACT STAGE
 * In replacement CTA states the visible rails are detached from WooCommerce's
 * .summary entirely. This prevents theme .outofstock summary widths/floats from
 * collapsing the middle rail or pulling discovery beside the product.
 * ========================================================================== */
body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage {
  width: min(calc(100% - 40px), var(--pb-book-container)) !important;
  max-width: var(--pb-book-container) !important;
  min-width: 0 !important;
  margin: clamp(30px, 4vw, 58px) auto 30px !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
  box-sizing: border-box !important;
  writing-mode: horizontal-tb !important;
}

@media (min-width: 981px) {
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage {
    display: grid !important;
    grid-template-columns: minmax(185px, .7fr) minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    grid-template-rows: auto !important;
    column-gap: clamp(16px, 1.9vw, 28px) !important;
    row-gap: 0 !important;
    align-items: start !important;
    direction: ltr !important;
  }

  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-product-media {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    direction: rtl !important;
    position: sticky !important;
    top: var(--pb-book-sticky-top, 200px) !important;
    align-self: start !important;
    z-index: 4 !important;
  }

  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-middle-column {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    gap: 8px !important;
    float: none !important;
    direction: rtl !important;
    writing-mode: horizontal-tb !important;
  }

  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-purchase-column {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    gap: 14px !important;
    float: none !important;
    direction: rtl !important;
    writing-mode: horizontal-tb !important;
  }
}

@media (max-width: 980px) {
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: calc(100% - 24px) !important;
    gap: 12px !important;
    margin-top: 20px !important;
  }
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-product-media,
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-middle-column,
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-purchase-column {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    position: relative !important;
    top: auto !important;
    writing-mode: horizontal-tb !important;
  }
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-product-media { order: 1 !important; }
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-middle-column { order: 2 !important; gap: 8px !important; }
  body.pb-bookshop-single-redesign.pb-bookshop-cta-replace .pb-bookshop-contact-stage > .pb-bookshop-purchase-column { order: 3 !important; gap: 10px !important; }
}

/* Once the independent stage is mounted, discovery is always a normal full-width
 * sibling below it. No Woo/theme float can pull it beside the contact rail. */
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready .pb-bookshop-contact-stage + .pb-bookshop-discovery,
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready .pb-bookshop-discovery {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: min(calc(100% - 40px), var(--pb-book-container)) !important;
  max-width: var(--pb-book-container) !important;
  margin-inline: auto !important;
  position: relative !important;
}
@media (max-width: 820px) {
  body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready .pb-bookshop-discovery {
    width: calc(100% - 24px) !important;
  }
}


/* ==========================================================================
 * 1.0.90.286 — BLOCKSY :has() ROOT FLEX FIX
 *
 * Blocksy WooCommerce CSS (loaded AFTER this plugin stylesheet on the affected
 * site) contains:
 *   .product-entry-wrapper:has(.woocommerce-product-gallery...){display:flex}
 * and:
 *   ... .woocommerce-product-gallery{width:var(--product-gallery-width,50%)}
 *
 * Because the independent contact stage still contains the gallery, those
 * descendant :has() rules match the OUTER wrapper. That makes contact-stage
 * and discovery flex siblings, shrinking the hero and collapsing its middle
 * rail. These !important rules deliberately own only the PB contact-state root.
 * ========================================================================== */
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .product-entry-wrapper.pb-bookshop-contact-stage-owner,
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .product-entry-wrapper:has(> .pb-bookshop-contact-stage) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box !important;
}

body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .product-entry-wrapper.pb-bookshop-contact-stage-owner > .pb-bookshop-contact-stage,
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .product-entry-wrapper:has(> .pb-bookshop-contact-stage) > .pb-bookshop-contact-stage {
  flex: none !important;
  flex-basis: auto !important;
  min-width: 0 !important;
}

body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .product-entry-wrapper.pb-bookshop-contact-stage-owner > .pb-bookshop-discovery,
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .product-entry-wrapper:has(> .pb-bookshop-contact-stage) > .pb-bookshop-discovery {
  display: block !important;
  flex: none !important;
  flex-basis: auto !important;
  float: none !important;
  clear: both !important;
  min-width: 0 !important;
}

/* Blocksy also re-sizes every descendant gallery to 50% at desktop. The PB
 * media rail already owns the image width, so the nested Woo gallery must fill
 * that rail rather than halve itself a second time. */
body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
  .pb-bookshop-contact-stage > .pb-bookshop-product-media .woocommerce-product-gallery {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  margin-inline: 0 !important;
  margin-bottom: 0 !important;
  float: none !important;
  flex: none !important;
  box-sizing: border-box !important;
}

@media (min-width: 981px) {
  body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
    .product-entry-wrapper.pb-bookshop-contact-stage-owner > .pb-bookshop-contact-stage,
  body.pb-bookshop-single-redesign.pb-bookshop-contact-layout-ready
    .product-entry-wrapper:has(> .pb-bookshop-contact-stage) > .pb-bookshop-contact-stage {
    display: grid !important;
    grid-template-columns: minmax(185px, .7fr) minmax(0, 1.3fr) minmax(285px, 1fr) !important;
    grid-template-rows: auto !important;
    align-items: start !important;
  }
}


/* ========================================================================== 
 * 1.0.90.287 — STAGE 1 MOBILE PURCHASE-FIRST FLOW
 * ========================================================================== */
@media (max-width: 820px) {
  /* Long-form copy is temporarily moved by single-product-redesign.js so the
   * edition selector/cart immediately follows the compact bibliographic facts. */
  body.pb-bookshop-single-redesign .pb-bookshop-mobile-reflow-node {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    float: none !important;
    position: relative !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-mobile-reflow-description {
    order: 3 !important;
    margin-top: 2px !important;
  }
  body.pb-bookshop-single-redesign .pb-bookshop-mobile-reflow-guide {
    order: 4 !important;
    margin-top: 0 !important;
  }
  body.pb-bookshop-single-redesign.pb-bookshop-mobile-purchase-first .pb-bookshop-purchase-column {
    order: 2 !important;
  }
}
