/*--------------------------------------------------------------
# Purchase Section
--------------------------------------------------------------*/
.purchase {
  padding: 80px 0;
  overflow: hidden;
}

.purchase .book-format-card {
  background-color: var(--surface-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  padding: 30px;
  height: 100%;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.purchase .book-format-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-color);
  opacity: 0.7;
}

.purchase .book-format-card .format-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-radius: 50%;
}

.purchase .book-format-card .format-icon i {
  font-size: 28px;
  color: var(--accent-color);
}

.purchase .book-format-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 10px;
}

.purchase .book-format-card .format-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.purchase .book-format-card .format-features {
  padding: 0;
  margin: 0 0 25px;
  list-style: none;
  text-align: left;
}

.purchase .book-format-card .format-features li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--default-color);
  line-height: 1.5;
}

.purchase .book-format-card .format-features li i {
  color: var(--accent-color);
  margin-right: 10px;
  flex-shrink: 0;
  font-size: 16px;
  transform: translateY(2px);
}

.purchase .book-format-card .buy-options .btn-purchase {
  display: grid;
  place-items: center;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  width: 100%;
}

.purchase .book-format-card .buy-options .btn-purchase:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  transform: translateY(-3px);
}

.purchase .book-format-card .buy-options .retailers {
  margin-top: 15px;
}

.purchase .book-format-card .buy-options .retailers span {
  display: block;
  font-size: 12px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin-bottom: 8px;
}

.purchase .book-format-card .buy-options .retailers .retailer-logos {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.purchase .book-format-card .buy-options .retailers .retailer-logos a {
  font-size: 18px;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  transition: all 0.3s ease;
}

.purchase .book-format-card .buy-options .retailers .retailer-logos a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.purchase .book-format-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
  .purchase .book-format-card {
    margin-bottom: 20px;
  }
}

.purchase .bundle-offer {
  background-color: var(--surface-color);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 40px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

.purchase .bundle-offer:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--accent-color);
}

.purchase .bundle-offer h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 15px;
}

.purchase .bundle-offer p {
  color: var(--default-color);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
}

.purchase .bundle-offer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
}

.purchase .bundle-offer ul li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--default-color);
}

.purchase .bundle-offer ul li i {
  color: var(--accent-color);
  margin-right: 10px;
  font-size: 18px;
  flex-shrink: 0;
}

.purchase .bundle-offer .bundle-price {
  margin-bottom: 25px;
}

.purchase .bundle-offer .bundle-price .original {
  font-size: 18px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  text-decoration: line-through;
  margin-right: 15px;
}

.purchase .bundle-offer .bundle-price .discounted {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color);
}

.purchase .bundle-offer .btn-bundle {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.purchase .bundle-offer .btn-bundle:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  transform: translateY(-3px);
}

.purchase .bundle-offer .bundle-image img {
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.purchase .bundle-offer .bundle-image img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .purchase .bundle-offer {
    padding: 30px;
  }

  .purchase .bundle-offer .bundle-image {
    margin-top: 30px;
    text-align: center;
  }

  .purchase .bundle-offer .bundle-image img {
    max-width: 250px;
  }

  .purchase .bundle-offer h3 {
    font-size: 22px;
  }

  .purchase .bundle-offer .bundle-price .discounted {
    font-size: 24px;
  }
}

@media (max-width: 992px) {
  .purchase .section-header h2 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .purchase {
    padding: 60px 0;
  }

  .purchase .section-header h2 {
    font-size: 24px;
  }
}



/* ============================================================
   PURCHASE (#purchase)
   Sunrise background + harmonized cards + CTA baseline alignment
   ============================================================

   Quick levers (most-used tweaks):
   - Section spacing: #purchase padding
   - Background intensity: .purchase-sunrise-gradient-bg opacity + filter
   - Animation feel: keyframe durations (30s) + opacity stops
   - Glass “cost”: backdrop-filter blur (10px → 8px on mobile)
   - Button palette: --btn-base / --btn-hover / --btn-press / --btn-text
   - Type scale: clamped font-size rules under “Responsive Type Scale”
*/

/* ============================================================
   1) Section base + stacking rules
   ============================================================ */
#purchase.purchase.section.light-background {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  padding: clamp(3.5rem, 6vw, 5rem) 0 !important;

  /* Soft base so sunrise layers read on light surfaces */
  background: linear-gradient(
    180deg,
    #FFF7F2 0%,
    #FFF1ED 55%,
    #FFF7F2 100%
  ) !important;
}

/* Ensure all content is above background layers */
#purchase .container,
#purchase .row,
#purchase .section-title {
  position: relative;
  z-index: 10;
}

/* ============================================================
   2) Sunrise background layers
   (Requires these divs in your HTML inside #purchase)
   - .purchase-sunrise-gradient-bg
   - .purchase-sunrise-haze
   - .purchase-sunrise-sun
   ============================================================ */
#purchase .purchase-sunrise-gradient-bg,
#purchase .purchase-sunrise-haze,
#purchase .purchase-sunrise-sun {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 2.1 Animated vertical gradient (visible on light backgrounds) */
#purchase .purchase-sunrise-gradient-bg {
  z-index: 1;
  background: linear-gradient(
    0deg,
    #0A1A3C 0%,
    #2E2C65 18%,
    #6B4C97 34%,
    #C07DBE 50%,
    #FF9B73 66%,
    #FFDDA4 82%
  );
  background-size: 100% 350%;
  animation: purchaseVerticalSunrise 30s ease-in-out infinite;

  /* Lever: intensity */
  mix-blend-mode: normal;
  opacity: 0.30; /* try 0.22–0.40 */
  filter: saturate(1.25) contrast(1.06);
}

@keyframes purchaseVerticalSunrise {
  0%   { background-position: 50% 100%; opacity: 0.22; }
  28%  { background-position: 50% 55%;  opacity: 0.28; }
  55%  { background-position: 50% 20%;  opacity: 0.34; }
  78%  { background-position: 50% 0%;   opacity: 0.40; }
  100% { background-position: 50% 100%; opacity: 0.22; }
}

/* 2.2 Haze layer */
#purchase .purchase-sunrise-haze {
  z-index: 2;
  background:
    radial-gradient(
      circle at 50% 65%,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      rgba(255, 255, 255, 0.0) 100%
    ),
    url("data:image/svg+xml;utf8,\
      <svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'>\
        <filter id='noiseFilter'>\
          <feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' />\
        </filter>\
        <rect width='300' height='300' filter='url(%23noiseFilter)'/>\
      </svg>"
    );
  background-size: cover, 300px 300px;

  mix-blend-mode: normal;
  opacity: 0.10; /* Lever: 0.07–0.13 */
  animation: purchaseHazePulse 30s ease-in-out infinite;
}

@keyframes purchaseHazePulse {
  0%   { opacity: 0.07; filter: blur(0px); }
  40%  { opacity: 0.10; filter: blur(0.5px); }
  70%  { opacity: 0.13; filter: blur(1px); }
  100% { opacity: 0.07; filter: blur(0px); }
}

/* 2.3 Sun disk / bloom */
#purchase .purchase-sunrise-sun {
  z-index: 3;
  background: radial-gradient(
    circle at 50% 72%,
    rgba(255, 240, 200, 0.55) 0%,
    rgba(255, 210, 140, 0.40) 18%,
    rgba(255, 170, 110, 0.28) 34%,
    rgba(255, 140, 90, 0.16) 55%,
    rgba(255, 120, 75, 0.05) 72%,
    rgba(255, 120, 75, 0) 100%
  );

  /* Lever: bloom feel */
  mix-blend-mode: normal;
  opacity: 0;
  transform: scale(1.15);
  filter: blur(10px) saturate(1.1);
  animation: purchaseSunPulse 30s ease-in-out infinite;
}

@keyframes purchaseSunPulse {
  0%   { opacity: 0;    transform: scale(1.10); filter: blur(10px); }
  25%  { opacity: 0.10; transform: scale(1.25); filter: blur(12px); }
  55%  { opacity: 0.22; transform: scale(1.45); filter: blur(16px); }
  78%  { opacity: 0.32; transform: scale(1.70); filter: blur(20px); }
  100% { opacity: 0;    transform: scale(1.10); filter: blur(10px); }
}

/* ============================================================
   3) Responsive Type Scale (FINAL winners)
   ============================================================ */
#purchase .section-title h2 {
  font-family: var(--heading-font, inherit);
  font-weight: 800;
  line-height: 1.1;
  font-size: clamp(2.15rem, 1.55rem + 2.4vw, 3.25rem);
  letter-spacing: 0.01em;
  margin-bottom: clamp(0.5rem, 0.35rem + 0.5vw, 0.85rem);

  /* Keeps headline readable over sunrise */
  color: #061E25;
  text-shadow: 0 0.75rem 2rem rgba(255, 255, 255, 0.35);
}

#purchase .section-title p {
  font-family: var(--default-font, inherit);
  font-weight: 400;
  line-height: 1.6;
  font-size: clamp(1.05rem, 0.95rem + 0.55vw, 1.35rem);
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;

  color: var(--default-color, inherit);
}

/* ============================================================
   4) Cards — sunrise-harmonized “glass” look
   ============================================================ */
#purchase .book-format-card {
  position: relative;
  height: 100%;
  display: flex;              /* enables baseline-aligned CTAs */
  flex-direction: column;

  border-radius: 1.25rem;
  padding: clamp(1.25rem, 2.2vw, 1.6rem);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.68) 100%
  );

  border: 1px solid rgba(255, 255, 255, 0.60);
  box-shadow:
    0 1.25rem 3.2rem rgba(10, 26, 60, 0.14),
    0 0.75rem 1.75rem rgba(192, 125, 190, 0.10);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

#purchase .book-format-card:hover {
  transform: translateY(-0.25rem);
  border-color: rgba(255, 221, 164, 0.65);
  box-shadow:
    0 1.75rem 4rem rgba(10, 26, 60, 0.16),
    0 1rem 2.25rem rgba(255, 155, 115, 0.14);
}

/* Icon badge */
#purchase .format-icon {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    135deg,
    rgba(255, 221, 164, 0.95) 0%,
    rgba(255, 155, 115, 0.85) 45%,
    rgba(192, 125, 190, 0.65) 100%
  );

  box-shadow:
    0 0.85rem 1.75rem rgba(255, 155, 115, 0.22),
    0 0.5rem 1.25rem rgba(107, 76, 151, 0.14);

  margin-bottom: 0.85rem;
}

#purchase .format-icon i {
  color: #061E25;
  font-size: 1.35rem;
}

/* Card title */
#purchase .book-format-card h3 {
  font-family: var(--heading-font, inherit);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  color: #061E25;
}

/* Price */
#purchase .book-format-card .format-price {
  font-weight: 800;
  font-size: clamp(1.05rem, 0.95rem + 0.55vw, 1.35rem);
  line-height: 1.2;
  margin-bottom: clamp(0.75rem, 0.55rem + 0.6vw, 1.05rem);
  color: #2E2C65;
}

/* Feature list (uses theme default tokens) */
#purchase .format-features,
#purchase .format-features li {
  font-family: var(--default-font) !important;
  color: var(--default-color) !important;
}

#purchase .format-features {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(1rem, 0.75rem + 0.8vw, 1.35rem);
}

#purchase .format-features li {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.6rem, 0.45rem + 0.5vw, 0.85rem);
  font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.06rem);
  line-height: 1.55;
  margin-bottom: clamp(0.55rem, 0.45rem + 0.35vw, 0.75rem);
}

#purchase .format-features li i {
  font-size: clamp(0.95rem, 0.85rem + 0.35vw, 1.1rem);
  line-height: 1.2;
  margin-top: 0.15em;
  flex: 0 0 auto;

  /* Lever: icon accent */
  color: #FF9B73;
}

/* ============================================================
   5) Align all CTAs to the same baseline (card footers)
   Requires: .buy-options wrapper in each card
   ============================================================ */
#purchase .book-format-card .buy-options {
  margin-top: auto;
  padding-top: clamp(0.9rem, 0.75rem + 0.6vw, 1.2rem);
}

#purchase .book-format-card .btn-purchase,
#purchase .book-format-card .btn-bundle {
  width: 100%;
}

/* ============================================================
   6) Buttons — FINAL working palette (no pseudo-elements)
   (Bottom rules win; this replaces earlier glow ring styles)
   ============================================================ */
#purchase .btn-purchase,
#purchase .btn-bundle {
  /* === Lever: standard button palette (tweak these 4) === */
  --btn-base: #B97A6A;   /* warm terracotta/rose-brown */
  --btn-hover: #A96B5D;  /* darker on hover */
  --btn-press: #915A4F;  /* pressed state */
  --btn-text: #FFF7F2;   /* warm off-white */

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;

  border-radius: 999px;
  padding: clamp(0.85rem, 0.7rem + 0.6vw, 1.05rem)
           clamp(1.15rem, 0.95rem + 0.9vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.01em;

  color: var(--btn-text) !important;
  opacity: 1 !important;

  /* Readability “fix”: keeps Buy Now text crisp */
  text-shadow: 0 1px 2px rgba(6, 30, 37, 0.35) !important;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.00) 45%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--btn-base) 92%, #ffffff 8%) 0%,
      var(--btn-base) 55%,
      color-mix(in srgb, var(--btn-base) 88%, #000000 12%) 100%
    );

  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    0 1.05rem 2.4rem rgba(10, 26, 60, 0.14),
    0 0.65rem 1.4rem rgba(185, 122, 106, 0.28);

  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease, background 220ms ease;
}

/* Button label (span.btn-label) */
#purchase .btn-purchase .btn-label,
#purchase .btn-bundle .btn-label {
  font-family: var(--default-font, inherit) !important;
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.12rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: inherit !important;
  opacity: 1 !important;
}

/* If the theme styles links inside buttons, force it */
#purchase .btn-purchase *,
#purchase .btn-bundle * {
  color: inherit !important;
  opacity: 1 !important;
}

/* Hover: richer + lift */
#purchase .btn-purchase:hover,
#purchase .btn-bundle:hover {
  transform: translateY(-0.12rem);
  filter: saturate(1.03) brightness(1.02);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.00) 45%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--btn-hover) 92%, #ffffff 8%) 0%,
      var(--btn-hover) 55%,
      color-mix(in srgb, var(--btn-hover) 86%, #000000 14%) 100%
    );
  box-shadow:
    0 1.35rem 3rem rgba(10, 26, 60, 0.16),
    0 0.95rem 2rem rgba(185, 122, 106, 0.32);
}

/* Active/pressed */
#purchase .btn-purchase:active,
#purchase .btn-bundle:active {
  transform: translateY(0);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.00) 45%
    ),
    linear-gradient(
      135deg,
      var(--btn-press) 0%,
      var(--btn-press) 60%,
      color-mix(in srgb, var(--btn-press) 82%, #000000 18%) 100%
    );
  box-shadow:
    0 0.75rem 1.6rem rgba(10, 26, 60, 0.14),
    0 0.5rem 1.1rem rgba(185, 122, 106, 0.26);
}

/* Focus ring (keyboard nav) */
#purchase .btn-purchase:focus-visible,
#purchase .btn-bundle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 0.22rem rgba(255, 221, 164, 0.65),
    0 1.05rem 2.4rem rgba(10, 26, 60, 0.14),
    0 0.65rem 1.4rem rgba(185, 122, 106, 0.28);
}

/* ============================================================
   7) Retailer icons
   ============================================================ */
#purchase .retailers {
  margin-top: 0.9rem;
  color: rgba(6, 30, 37, 0.75);
  font-size: 0.9rem;
}

#purchase .retailer-logos {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.4rem;
  justify-content: center;
}

#purchase .retailer-logos a {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.60);
  color: #2E2C65;

  box-shadow: 0 0.75rem 1.7rem rgba(10, 26, 60, 0.10);
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}

#purchase .retailer-logos a:hover {
  transform: translateY(-0.12rem);
  background: rgba(255, 221, 164, 0.60);
  color: #061E25;
}

/* ============================================================
   8) Bundle offer styling
   ============================================================ */
#purchase .bundle-offer {
  border-radius: 1.5rem;
  padding: clamp(1.35rem, 2.4vw, 1.8rem);

  background: linear-gradient(
    135deg,
    rgba(255, 221, 164, 0.35) 0%,
    rgba(255, 155, 115, 0.20) 45%,
    rgba(192, 125, 190, 0.18) 100%
  );

  border: 1px solid rgba(255, 255, 255, 0.60);
  box-shadow:
    0 1.75rem 4rem rgba(10, 26, 60, 0.15),
    0 1rem 2.4rem rgba(255, 155, 115, 0.16);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#purchase .bundle-offer h3 {
  color: #061E25;
  margin-bottom: 0.5rem;
}

#purchase .bundle-offer p,
#purchase .bundle-offer li {
  color: rgba(6, 30, 37, 0.86);
}

#purchase .bundle-offer li i {
  color: #FF9B73;
}

#purchase .bundle-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.9rem 0 1.05rem;
}

#purchase .bundle-price .original {
  color: rgba(6, 30, 37, 0.55);
  text-decoration: line-through;
  font-weight: 700;
}

#purchase .bundle-price .discounted {
  color: #2E2C65;
  font-weight: 900;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
}

#purchase .bundle-image img {
  border-radius: 1.25rem;
  box-shadow:
    0 1.25rem 3rem rgba(10, 26, 60, 0.14),
    0 0.75rem 1.75rem rgba(255, 155, 115, 0.18);
}

/* ============================================================
   9) Mobile performance tweak (reduce blur cost slightly)
   ============================================================ */
@media (max-width: 576px) {
  #purchase .book-format-card,
  #purchase .bundle-offer {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* =========================================================
   Purchase buttons: cap width + center (no full-width bars)
========================================================= */
#purchase .buy-options{
  display: flex;
  justify-content: center;
}

#purchase .btn-purchase{
  display: inline-flex;               /* prevents full-width stretch */
  justify-content: center;
  align-items: center;
  width: 100%;                        /* allows max-width to control size */
  max-width: clamp(14rem, 60%, 22rem);/* tweak these numbers if you want */
  margin-inline: auto;
  text-align: center;
}

/* =========================================================
   Purchase cards: center the bullet block, keep text left
========================================================= */
#purchase .book-format-card .format-features{
  width: fit-content;        /* shrink-wrap to content */
  max-width: 100%;           /* safety */
  margin-inline: auto;       /* centers the whole list block */
  text-align: left;          /* keeps the bullets/text flush left */
}

/* Optional: if your list gets too wide on desktop, cap it */
#purchase .book-format-card .format-features{
  max-width: 34ch;           /* tweak 30–40ch to taste */
}
