@import url("https://fonts.googleapis.com/css2?family=Charis+SIL:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary-red: #8f1f2e;
  --dark-red: #7a0000;
  --black: #0d0d0d;
  --soft-black: #111;
  --gold: #d8b55a;
  --bg-cream: #f2eae3;
  --white: #fff;
  --light-gray: #f2f2f2;
}

/* --------------- GLOBAL --------------- */

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--soft-black);
  animation: fadeInBody 0.6s ease forwards;
  overflow-x: hidden;
  background: var(--bg-cream);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@keyframes fadeInBody {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Wrapper to center everything */
.wrapper {
  display: flex;
  justify-content: center;
  padding: 80px 20px;
  padding-bottom: 0;
}
/* --------------- NAVBAR --------------- */
.navbar {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;

  background: rgba(250, 246, 242, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  padding: 14px 22px;
  display: flex;
  border-bottom: 1px solid rgba(143, 31, 46, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.nav-left {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgb(57, 57, 57);
  gap: 10px;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.logo {
  width: 42px;
  height: auto;
  transition: transform 0.25s ease;
  filter: none;
}

.nav-left:hover .logo {
  transform: scale(1.08);
}

/* --------------- CONTENT AREA --------------- */

.content-container {
  display: flex;
  gap: 50px;
}

/* Book Cover */

.book-cover img {
  width: 320px;
  border-radius: 10px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease;
}

.book-cover img:hover {
  transform: scale(1.03);
}

/* --------------- BOOK INFO --------------- */

.book-info {
  max-width: 600px;
}

.book-info > * {
  margin-bottom: 18px;
}

/* rating */
.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: -0.8rem;
}

.rating-text {
  font-size: 1rem;
}

/* Text */

.book-title {
  font-size: 2.2rem;
  margin: 10px 0 5px;
  color: #343131;
}

.author {
  font-weight: 400;
  margin-top: 0;
  color: var(--primary-red);
  font-size: 1.2rem;
}

/* Price */

.price {
  margin: 22px 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.old-price {
  font-family: "Montserrat", sans-serif;
  text-decoration: line-through;
  color: #666;
}

.sale-price {
  color: var(--dark-red);
  font-weight: 700;
}

/* --------------- BUTTON --------------- */

.checkout-btn {
  background: var(--primary-red);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  font-size: 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
  margin-bottom: 25px;
  box-shadow: 0 4px 14px rgba(179, 0, 0, 0.3);
}

.checkout-btn:hover {
  background: var(--dark-red);
  transform: translateY(-3px);
}

/* Pulse animation */
.pulse {
  animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
  0% {
    box-shadow: 0 0 0 0 rgba(179, 0, 0, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(179, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(179, 0, 0, 0);
  }
}

/* Description */
.description {
  width: min(720px, 100%);
  margin: 26px auto 0;
  text-align: center;
  padding: 1rem;
}

.description h2 {
  margin: 0 auto 14px;
  display: inline-block;
  color: #343131;
}

.description p {
  margin: 0 auto;
  max-width: 640px;
}

.highlight {
  color: #8f1f2e;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(178, 77, 77, 0.22);
  position: relative;
}

.description p {
  font-size: 1.15rem;
  margin-bottom: 15px;
  line-height: 1.7;
}

.copy-badge {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
  background: rgba(143, 31, 46, 0.08);
  border: 1px solid rgba(143, 31, 46, 0.18);
  padding: 10px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.copy-lead {
  font-size: 1.18rem;
  line-height: 1.75;
}

.copy-divider {
  width: 100%;
  height: 2px;
  background: rgba(143, 31, 46, 0.18);
  border-radius: 999px;
  margin: 22px 0;
}

.copy-subtitle {
  margin: 1rem 0 14px;
  font-size: 1.25rem;
  color: var(--black);
}

.copy-list,
.copy-list-1 {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.copy-list,
.copy-list-1 li {
  gap: 12px;
  line-height: 1.65;
  font-size: 1.08rem;
}

.copy-list li::before {
  content: "✓";
  font-weight: 900;
  color: var(--primary-red);
  margin-top: 2px;
}

.copy-list-1 li::before {
  content: "•";
  font-weight: 900;
  color: var(--primary-red);
  margin-top: 2px;
}

.copy-muted {
  color: rgba(0, 0, 0, 0.6);
  font-weight: 500;
}

.copy-cta-line {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(143, 31, 46, 0.06);
  border: 1px solid rgba(143, 31, 46, 0.14);
  font-size: 1.08rem;
  line-height: 1.7;
}

.bonusi {
  font-weight: 900;
  color: var(--dark-red);
  text-decoration: underline;
  font-size: 1.8rem;
}

/* RESPONSIVENESS */
@media (max-width: 600px) {
  .description h2 {
    font-size: 1.75rem;
  }

  .description p,
  .copy-list li,
  .copy-cta-line {
    font-size: 1rem;
  }

  .copy-list li {
    display: block; /* kill the flex layout */
    position: relative;
    padding-left: 1.6rem; /* space for the checkmark */
    line-height: 1.65;
  }

  .copy-list li::before {
    position: absolute;
    left: 0;
    top: 0.15em; /* aligns with first line */
    margin: 0; /* stop flex-era leftovers */
  }

  .copy-muted {
    display: block; /* force it to drop under the main text */
    max-width: none; /* remove the 400px cap */
    margin-top: 0.35rem;
    text-align: center;
  }
}

/* --------------- ANIMATIONS --------------- */

.fade-in {
  opacity: 0;
  animation: fadeSlow 1s forwards;
}

.fade-in-delayed {
  opacity: 0;
  animation: fadeSlow 1s forwards 0.2s;
}

.fade-in-delayed2 {
  opacity: 0;
  animation: fadeSlow 1s forwards 0.4s;
}

.fade-in-delayed3 {
  opacity: 0;
  animation: fadeSlow 1s forwards 0.6s;
}

@keyframes fadeSlow {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  opacity: 0;
  animation: slideUp 0.8s ease forwards 0.1s;
}

@keyframes slideUp {
  from {
    transform: translateY(25px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --------------- RESPONSIVENESS --------------- */

@media (max-width: 950px) {
  .content-container {
    flex-direction: column;
    gap: 30px;
    text-align: center; /* Center book cover and text */
    align-items: center; /* Center book cover horizontally */
  }

  .book-info {
    max-width: 100%;
  }

  .book-title {
    font-size: 1.9rem;
  }

  .author {
    font-size: 1rem;
  }

  /* Ensure price and metadata align nicely in the center on mobile */
  .price {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .wrapper {
    padding: 20px 12px;
  }

  .content-container {
    padding: 25px 20px;
  }

  .book-cover img {
    width: 200px;
  }

  .book-title {
    font-size: 1.6rem;
  }

  .price {
    justify-content: center;
    font-size: 1.8rem; /* Adjusted price size */
  }

  .purchase-box {
    padding: 18px;
  }

  /* Metadata grid should switch to a single column or wrap better if necessary */
  .metadata-grid {
    grid-template-columns: repeat(3, 1fr); /* Keep 3 columns, they should fit */
    gap: 5px;
  }

  .checkout-btn {
    width: 100%;
    font-size: 1.15rem !important;
  }
}

/* --- NEW: PURCHASE BOX STYLES --- */

.purchase-box {
  background: var(--light-gray); /* Light separation background */
  border: 1px solid #ddd;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px; /* Separate it from the Description below */
}

.price {
  /* Increased size for prominence */
  font-size: 2.2rem;
  margin: 0 0 15px 0; /* Tighten up spacing above CTA */
  justify-content: flex-start; /* Ensure prices align left on desktop */
}

.old-price {
  font-size: 1.4rem;
  color: #777;
  margin-right: 15px;
}

.sale-price {
  color: var(--dark-red);
  font-weight: 800; /* Extra bold for the final price */
}

.checkout-btn {
  /* Existing button styles are good, but let's ensure full width within the box */
  width: 100%;
  font-size: 1.3rem; /* Make the button text bigger */
  padding: 18px 28px;
}

.checkout-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 10px;
  font-weight: 500;
}

/* --- NEW: METADATA GRID & DESCRIPTION CONTAINER --- */

.description-container {
  padding-top: 10px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metadata-item .icon {
  font-size: 2rem;
  margin-bottom: 5px;
}

.metadata-item .value {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-red);
}

.metadata-item .label {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Description Heading Polish */
.description h2 {
  /* Changed border style for cleaner look */
  border-bottom: 3px solid var(--primary-red);
  display: inline-block;
  padding-bottom: 8px;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.trust-icons {
  margin-top: 12px;
  text-align: center;
  opacity: 0.9;
}

.trust-icons img {
  height: 28px;
  margin: 0 6px;
  filter: grayscale(20%);
  transition: 0.25s;
}

.trust-icons img:hover {
  filter: grayscale(0%);
  transform: scale(1.08);
}

#dynamic-price {
  color: var(--dark-red);
  font-weight: 800;
}

/* SALES PAGE REVIEWS */
.sales-reviews {
  max-width: 900px;
  margin: 50px auto;
  padding: 20px;
}

.reviews-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 25px;
  color: #343131;
}

.reviews-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 700px) {
  .reviews-list {
    grid-template-columns: 1fr;
  }
}

.review-box {
  background: #fff;
  padding: 22px 25px;
  border-radius: 14px;
  border: 2px solid #f1e2e2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
}

.review-header .stars {
  color: gold;
  font-size: 1.1rem;
}

.review-comment {
  line-height: 1.5;
  margin-bottom: 10px;
}

.review-date {
  font-size: 0.85rem;
  color: #777;
}

.load-more-wrapper {
  text-align: center;
  margin-top: 25px;
}

.load-more-btn {
  background: var(--primary-red);
  border: 2px solid var(--primary-red);
  color: white;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease;
  font-family: "Montserrat", serif;
  font-weight: 500;
}

.load-more-btn:hover {
  background: transparent;
  color: var(--primary-red);
  transform: translateY(-2px);
}

.star {
  font-size: 1.4rem;
  color: #ddd;
  position: relative;
  display: inline-block;
}

.star.full {
  color: gold;
}

.star.empty {
  color: #ddd;
}

.star.half {
  color: #ddd;
}

.star.half::before {
  content: "★";
  color: gold;
  position: absolute;
  left: 0;
  width: 50%;
  overflow: hidden;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
  .content-container {
    align-items: center;
    text-align: center;
  }

  .book-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .book-info > * {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .rating {
    justify-content: center;
    margin-bottom: 10px;
  }

  .rating-text {
    text-align: center;
  }

  .stars {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .price {
    justify-content: center !important;
    text-align: center;
  }

  .purchase-box {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 600px) {
  .metadata-grid {
    gap: 12px;
  }

  .metadata-item .value {
    font-size: 1.1rem;
  }

  .metadata-item .label {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .sales-reviews {
    padding: 10px 15px;
  }

  .review-box {
    padding: 18px;
  }

  .review-header {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 12px 16px;
  }

  .nav-title {
    font-size: 1.1rem;
  }

  .logo {
    width: 38px;
  }
}
