.ebook-product-page {
  background: #fffdf8;
}

.ebook-product-hero {
  padding: 54px 0 34px;
  background:
    radial-gradient(circle at 12% 25%, #ffe35c22 0 7%, transparent 22%),
    linear-gradient(180deg, #fff 0%, #fffdf8 100%);
  border-bottom: 1px solid #e4e7df;
}

.ebook-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: 62px;
  align-items: center;
  direction: ltr;
}

.ebook-copy {
  direction: rtl;
  text-align: right;
  padding: 8px 0 16px;
}

.ebook-copy .eyebrow {
  color: #43934b;
  font-size: 17px;
  margin-bottom: 12px;
}

.ebook-copy h1 {
  position: relative;
  display: inline-block;
  font-size: clamp(48px, 5.8vw, 82px);
  line-height: 1.25;
  letter-spacing: -3px;
  margin: 0 0 18px;
}

.ebook-copy h1::after {
  content: '';
  position: absolute;
  right: 3%;
  bottom: 4px;
  width: 67%;
  height: 11px;
  border-radius: 80%;
  background: #ffe35c;
  transform: rotate(-4deg);
  z-index: -1;
}

.ebook-copy h2 {
  font-size: clamp(25px, 3vw, 40px);
  line-height: 1.65;
  letter-spacing: -1px;
  margin: 0 0 17px;
}

.ebook-copy > p {
  max-width: 510px;
  font-size: 19px;
  line-height: 2;
  margin-bottom: 28px;
}

.ebook-facts {
  display: flex;
  gap: 30px;
  align-items: center;
  margin: 15px 0 20px;
}

.ebook-fact {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #232923;
  font-size: 16px;
  line-height: 1.65;
}

.ebook-fact-icon {
  width: 34px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #191b19;
  border-radius: 6px 3px 7px 4px;
  font-size: 22px;
  line-height: 1;
}

.ebook-fact-icon.person {
  border: 0;
  font-size: 32px;
}

.ebook-price {
  display: flex;
  direction: rtl;
  align-items: baseline;
  gap: 11px;
  margin: 4px 0 13px;
}

.ebook-price strong {
  color: #191b19;
  font-size: 45px;
  line-height: 1.2;
}

.ebook-price span {
  font-size: 17px;
  color: #4e574d;
}

.ebook-price .dirham-symbol {
  height: 27px;
}

.ebook-buy {
  min-width: 330px;
  justify-content: space-between;
  padding: 13px 24px;
  font-size: 20px;
}

.ebook-buy::after {
  content: '🛒';
  font-size: 22px;
}

.calm-site .button.ebook-unavailable:disabled,
.calm-site .button.ebook-unavailable:disabled:hover {
  background: #edf5e9;
  color: #43533f;
  border: 1px solid #c6d6bf;
  cursor: not-allowed;
  transform: none;
  justify-content: center;
}

.ebook-unavailable::after {
  content: none;
}

.ebook-release-label {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 17px;
  border-radius: 40px;
  background: #ffe35c;
  color: #233b25;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}

.ebook-catalog-details {
  margin-top: 14px;
  font-size: 14px;
}

.ebook-catalog-cover {
  display: grid;
  place-items: center;
  height: 260px;
  margin: 0 0 22px;
  padding: 12px;
  background: #fffdf8;
  border-radius: 16px;
}

.ebook-catalog-cover img {
  display: block;
  height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 5px 6px 12px #19281915;
}

.ebook-checkout-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.ebook-note {
  color: #697269 !important;
  font-size: 13px !important;
  margin: 18px 0 0 !important;
}

.ebook-gallery {
  display: grid;
  grid-template-columns: minmax(0, .24fr) minmax(0, .76fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: center;
  direction: ltr;
  min-width: 0;
  padding: 0;
  scroll-margin-top: 28px;
}

.ebook-preview-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ebook-cover-card {
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.ebook-cover-art {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.ebook-cover-missing {
  min-height: 510px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid #c6d6bf;
  border-radius: 18px;
  background: #f4faef;
  color: #5b6259;
  font-size: 15px;
  line-height: 1.9;
  direction: rtl;
}

.ebook-cover-missing strong {
  display: block;
  margin: 24px 0 12px;
  color: #233b25;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.5;
}

.ebook-cover-missing p {
  margin: 0;
  max-width: 320px;
}

.ebook-preview-card {
  width: 100%;
  margin: 0;
}

.ebook-preview-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.ebook-gallery-caption {
  margin: 0;
  color: #252b25;
  direction: rtl;
  text-align: center;
  font-size: clamp(10px, 1.1vw, 15px);
  font-weight: 600;
  line-height: 1.7;
}

.ebook-gallery-caption::before {
  content: '↙';
  display: inline-block;
  color: #ebc928;
  font-size: 33px;
  line-height: 1;
  margin-left: 8px;
  transform: rotate(-12deg);
  vertical-align: -7px;
}

.ebook-gallery.without-previews {
  grid-template-columns: minmax(0, 1fr);
}

.ebook-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 0 48px;
  border-bottom: 1px solid #d8ddd5;
}

.ebook-step {
  position: relative;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
}

.ebook-step + .ebook-step {
  border-right: 1px solid #cdd4ca;
}

.ebook-step-number {
  width: 35px;
  height: 35px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #4fb254;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.ebook-step-icon {
  font-size: 35px;
  line-height: 1;
}

.ebook-step strong {
  font-size: 17px;
}

.ebook-details {
  padding: 58px 0 80px;
}

.ebook-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.ebook-details-card {
  padding: 28px;
  background: #fff;
  border: 1px solid #d7e2d2;
  border-radius: 18px;
}

.ebook-details-card h2 {
  font-size: 27px;
  margin: 0 0 12px;
}

.ebook-details-card p,
.ebook-details-card li {
  font-size: 15px;
  line-height: 2;
}

.ebook-details-card ul {
  margin: 0;
  padding-right: 22px;
}

@media (max-width: 900px) {
  .ebook-product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ebook-copy {
    grid-row: 1;
    text-align: center;
  }

  .ebook-copy > p {
    margin-right: auto;
    margin-left: auto;
  }

  .ebook-facts,
  .ebook-price {
    justify-content: center;
  }

  .ebook-gallery {
    grid-row: 2;
    width: min(650px, 100%);
    margin: auto;
  }
}

@media (max-width: 600px) {
  .ebook-product-hero {
    padding-top: 35px;
  }

  .ebook-copy h1 {
    font-size: 49px;
    letter-spacing: -2px;
  }

  .ebook-copy h2 {
    font-size: 25px;
  }

  .ebook-copy > p {
    font-size: 16px;
  }

  .ebook-facts {
    gap: 16px;
  }

  .ebook-fact {
    font-size: 13px;
  }

  .ebook-buy {
    min-width: 0;
    width: 100%;
    font-size: 17px;
  }

  .ebook-gallery {
    gap: 18px;
    margin-bottom: 0;
  }

  .ebook-preview-stack {
    gap: 8px;
  }

  .ebook-cover-missing {
    min-height: 380px;
  }

  .ebook-gallery-caption {
    font-size: 10px;
  }

  .ebook-gallery-caption::before {
    display: none;
  }

  .ebook-steps {
    grid-template-columns: 1fr;
    gap: 13px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .ebook-step {
    justify-content: flex-start;
    min-height: 56px;
  }

  .ebook-step + .ebook-step {
    border-right: 0;
    border-top: 1px solid #e1e5de;
    padding-top: 13px;
  }

  .ebook-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Printed booklet with overlapping sample sheets. */
.ebook-gallery:not(.without-previews) {
  position: relative;
  display: block;
  width: 100%;
  max-width: 590px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 62%, #e9e7dc80, transparent 68%);
}
.ebook-gallery:not(.without-previews) .ebook-preview-stack {
  position: absolute;
  inset: 0;
  display: block;
}
.ebook-gallery:not(.without-previews) .ebook-preview-card {
  position: absolute;
  width: 43%;
  aspect-ratio: 777 / 1100;
  overflow: hidden;
  background: white;
  border: 1px solid #e4e2da;
  box-shadow: 0 8px 17px #34372a1c;
}
.ebook-gallery:not(.without-previews) .ebook-preview-card:nth-child(1) {
  left: 8%; top: 12%; transform: rotate(-13deg); z-index: 1;
}
.ebook-gallery:not(.without-previews) .ebook-preview-card:nth-child(2) {
  left: 40%; top: 8%; transform: rotate(11deg); z-index: 2;
}
.ebook-gallery:not(.without-previews) .ebook-preview-card:nth-child(3) {
  left: 45%; top: 29%; transform: rotate(17deg); z-index: 3;
}
.ebook-gallery:not(.without-previews) .ebook-cover-card {
  position: absolute;
  width: 48%;
  left: 19%;
  top: 23%;
  z-index: 4;
  background: #fff;
  border-radius: 2px 5px 5px 2px;
  transform: rotate(-5deg);
  box-shadow: 2px 2px 0 #dddcd3, 4px 4px 0 #fff, 5px 5px 0 #d7d6cd,
    7px 7px 0 #fff, 8px 8px 0 #d4d3ca, 12px 18px 25px #30342630;
}
.ebook-gallery:not(.without-previews) .ebook-cover-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, #3a3a3019, #ffffff55 2%, transparent 5%,
    #55533c0d 6%, transparent 9%, transparent 98%, #292c2414);
}
.ebook-gallery:not(.without-previews) .ebook-cover-art { border-radius: inherit; }
.ebook-gallery:not(.without-previews) .ebook-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 13px;
}
.ebook-gallery:not(.without-previews) .ebook-gallery-caption::before { content: none; }
@media (max-width: 900px) {
  .ebook-gallery:not(.without-previews) { max-width: 480px; }
}

/* Matching covers and aligned information on the ebook shelf. */
.ebook-catalog-page .page-hero { padding: 38px 0 28px; background: #fafcf8; }
.ebook-catalog-page .page-hero h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 12px; }
.ebook-catalog-page .content-section { padding-top: 28px; }
.ebook-shelf { max-width: 1040px; gap: 28px; }
.ebook-shelf .content-card { padding: 18px 24px 26px; border-radius: 22px; box-shadow: none; }
.ebook-shelf .ebook-catalog-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 310px;
  padding: 25px 20px 32px;
  margin: 0 0 24px;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, #f3e8cb 0 35%, transparent 68%), #fbf8ef;
}
.ebook-shelf #anxietyCard .ebook-catalog-cover {
  background: radial-gradient(ellipse at center, #e0ebd7 0 35%, transparent 68%), #f2f6ed;
}
.ebook-shelf .ebook-catalog-cover img {
  width: auto;
  height: 253px;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 2px 4px 4px 2px;
  transform: rotate(-2deg);
  box-shadow: 3px 2px 0 #deded3, 5px 3px 0 #fff, 7px 4px 0 #d3d6ca, 10px 13px 18px #38422d24;
  transition: transform .25s ease;
}
.ebook-shelf .ebook-catalog-cover:hover img { transform: translateY(-4px) rotate(0); }
.ebook-shelf .content-card h2 { font-size: clamp(23px, 2.5vw, 30px); line-height: 1.6; min-height: 1.6em; }
.ebook-shelf .content-card > p:not(.card-meta) { line-height: 1.9; min-height: 5.7em; }
.ebook-shelf .card-meta { display: flex; align-items: center; gap: 8px; color: #65715d; }
.ebook-shelf .card-meta strong { font-size: 26px; color: #191b19; }
.ebook-shelf .card-meta del { font-size: 16px; color: #7b8175; }
.ebook-shelf .content-card .button { width: 100%; justify-content: center; }
.ebook-shelf .ebook-catalog-details { align-self: center; }
@media (max-width: 600px) {
  .ebook-shelf .content-card { padding: 15px 20px 24px; }
  .ebook-shelf .ebook-catalog-cover { height: 285px; }
  .ebook-shelf .ebook-catalog-cover img { height: 228px; }
  .ebook-shelf .content-card > p:not(.card-meta) { min-height: 0; margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .ebook-shelf .ebook-catalog-cover img { transition: none; }
}

.ebook-details-intro { max-width: 850px; line-height: 2; margin-bottom: 26px; }
.ebook-details-card h3 { font-size: 21px; margin-top: 0; }
.ebook-info-accordion { border: 1px solid #d7e2d2; border-radius: 14px; padding: 18px 22px; margin-top: 16px; background: #fff; }
.ebook-info-accordion summary { font-weight: 650; cursor: pointer; line-height: 1.8; }
.ebook-info-accordion p, .ebook-contents { line-height: 2; }
.ebook-contents { columns: 2; column-gap: 45px; padding-right: 24px; }
.ebook-contents li { break-inside: avoid; margin-bottom: 7px; font-size: 14px; }
.ebook-reviews { padding-block: 0 60px; }
.ebook-review-card { background: #fff; border: 1px solid #d7e2d2; border-radius: 14px; padding: 20px; margin-top: 14px; overflow-wrap: anywhere; }
.ebook-review-card p { white-space: pre-wrap; line-height: 1.9; }
.ebook-review-card small { display: block; margin-bottom: 12px; }
.ebook-review-card button { margin: 5px; }
#ebookReviewForm { max-width: 700px; }
#ebookReviewForm label { display: block; margin-block: 16px; }
#ebookReviewForm input:not([type=checkbox]), #ebookReviewForm textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; padding: 12px; margin-top: 7px; border: 1px solid #b9c6b4; border-radius: 9px; background: white; }
#ebookReviewForm .ebook-review-consent { display: flex; align-items: start; gap: 10px; line-height: 1.8; }
#ebookReviewForm .ebook-review-consent input { margin-top: 7px; }
#ebookReviewForm button { margin-top: 20px; }
@media(max-width:600px) { .ebook-contents { columns: 1; } .ebook-info-accordion { padding: 16px; } }

/* Keep each amount and its currency together, with a clear current price. */
.ebook-price { align-items: center; gap: 22px; flex-wrap: wrap; margin: 10px 0 20px; }
.ebook-price-current { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.ebook-price-current strong { font-size: clamp(38px, 4vw, 45px); font-weight: 700; }
.ebook-price-current span { font-size: 19px; color: #191b19; }
.ebook-price-previous { color: #71776f; font-size: 28px; font-weight: 400; white-space: nowrap; text-decoration-thickness: 1px; }
.ebook-price-previous span { color: inherit; font-size: 17px; }

/* Approved catalogue sale presentation: prior label above the struck price. */
.ebook-shelf .ebook-catalog-pricing { gap: 18px; flex-wrap: wrap; min-height: 55px; margin-block: 12px 20px; }
.ebook-shelf .catalog-old-price { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; color: #71776f; }
.ebook-shelf .catalog-price-label { font-size: 13px; line-height: 1.4; }
.ebook-shelf .catalog-price-amount, .ebook-shelf .catalog-current-price { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ebook-shelf .catalog-price-amount del { font-size: 18px; text-decoration-thickness: 1px; }
.ebook-shelf .catalog-price-amount .dirham-symbol { opacity: .6; }
.ebook-shelf .catalog-current-price { border-inline-start: 1px solid #d7dcd3; padding-inline-start: 18px; }
.ebook-shelf .catalog-current-price strong { font-size: 30px; }
.ebook-shelf .catalog-discount { font-size: 13px; line-height: 1.5; color: #405b38; background: #f0f5e9; border-radius: 20px; padding: 5px 10px; white-space: nowrap; }
@media (max-width: 380px) { .ebook-shelf .ebook-catalog-pricing { gap: 12px; } .ebook-shelf .catalog-current-price { padding-inline-start: 12px; } }

.ebook-email-form { max-width: 480px; margin: 24px auto; text-align: right; }
.ebook-email-form label { display: block; margin-block: 18px; font-weight: 600; }
.ebook-email-form input { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; padding: 14px; border: 1px solid #bbcbb4; border-radius: 12px; background: white; color: #191b19; font: inherit; }
.ebook-email-form p { font-size: 14px; line-height: 1.9; }
#purchaseEmailError { color: #924535; }

/* Sale details shared by both ebook product pages. */
.ebook-price-old { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.ebook-price .ebook-price-label { font-size: 13px; line-height: 1.4; color: #71776f; }
.ebook-price .ebook-discount { font-size: 14px; line-height: 1.5; color: #405b38; background: #f0f5e9; border-radius: 20px; padding: 5px 10px; white-space: nowrap; }
