/* ==========================================================================
   Purely Sweet — Artisanal Gluten-Free Desserts & Ebook Storefront
   ========================================================================== */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-warm: #f3ece1;
  --surface-tint: #ebe1d2;
  --ink: #231a16;
  --ink-muted: #695950;
  --accent: #8b4526;
  --accent-hover: #6e341a;
  --accent-soft: #f5e6dc;
  --sage: #4a5e48;
  --sage-soft: #e9efe7;
  --border: #e5dcd0;
  --shadow-sm: 0 4px 14px rgba(35, 26, 22, 0.05);
  --shadow-md: 0 14px 36px rgba(35, 26, 22, 0.09);
  --shadow-lg: 0 24px 60px rgba(35, 26, 22, 0.16);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* Announcement Bar */
.announcement-bar {
  background: var(--ink);
  color: #f6efe6;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.announcement-bar p {
  margin: 0;
}

.code-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.08rem 0.48rem;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-mark {
  color: var(--accent);
  font-size: 1.15rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.cart-trigger:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.cart-count {
  background: var(--accent);
  color: #fff;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 5px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 4%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 0.8rem;
}

.mobile-nav.open {
  display: flex;
}

/* Typography Helpers */
.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.12;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.45rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.72rem 1.45rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-lg {
  padding: 0.92rem 1.85rem;
  font-size: 0.98rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(139, 69, 38, 0.24);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface-warm);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-soft);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

/* Hero */
.hero {
  padding: 4rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-muted);
  margin: 1.35rem 0 2rem;
  max-width: 520px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.trust-item strong {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
}

.trust-item span {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.trust-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.4;
  background: var(--surface-warm);
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-floating-card {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.floating-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.floating-title {
  margin: 0.35rem 0 0.1rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.floating-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Value Strip */
.value-strip {
  background: var(--surface-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.2rem 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

.value-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.value-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 0.15rem;
}

.value-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.value-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
}

.section-header.centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-header p {
  margin: 0.55rem 0 0;
  color: var(--ink-muted);
  max-width: 560px;
}

/* Ebook Spotlight & Catalog */
.spotlight-section {
  padding: 5rem 0;
}

.spotlight-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  align-items: center;
}

.spotlight-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-warm);
  aspect-ratio: 3 / 3.7;
}

.spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bestseller-ribbon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.spotlight-desc {
  color: var(--ink-muted);
  margin: 1rem 0 1.4rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.65rem;
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.94rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 700;
}

.spotlight-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.price-current {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--ink);
}

.price-old {
  font-size: 1.1rem;
  color: var(--ink-muted);
  text-decoration: line-through;
  margin-left: 0.45rem;
}

.price-note {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.spotlight-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Ebooks Grid */
.ebooks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.ebook-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ebook-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.ebook-card.bundle-card {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, #fffaf4 0%, #ffffff 100%);
}

.ebook-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-warm);
}

.ebook-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ebook-card:hover .ebook-thumb img {
  transform: scale(1.04);
}

.ebook-tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(35, 26, 22, 0.86);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}

.bundle-card .ebook-tag {
  background: var(--accent);
}

.ebook-body {
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ebook-meta {
  font-size: 0.78rem;
  color: var(--sage);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.ebook-body h3 {
  font-size: 1.5rem;
  margin-bottom: 0.55rem;
}

.ebook-body p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
  flex: 1;
}

.ebook-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.ebook-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
}

.ebook-price .old {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-muted);
  text-decoration: line-through;
  margin-left: 0.35rem;
  font-weight: 500;
}

/* Recipes Section */
.recipes-section {
  padding: 5rem 0;
  background: var(--surface-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.recipe-search-wrap input {
  width: 280px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  outline: none;
}

.recipe-search-wrap input:focus {
  border-color: var(--accent);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.filter-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.recipe-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-tint);
}

.recipe-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.recipe-card:hover .recipe-img-wrap img {
  transform: scale(1.04);
}

.recipe-time-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.recipe-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.diet-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
}

.recipe-body h3 {
  font-size: 1.42rem;
  margin-bottom: 0.45rem;
}

.recipe-body p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.recipe-link {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}

/* About Section */
.about-section {
  padding: 5.5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.about-content p {
  color: var(--ink-muted);
  margin: 1rem 0;
}

.method-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.method-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem;
}

.method-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.method-card h3,
.method-card h4 {
  font-size: 1.2rem;
  margin: 0.25rem 0 0.35rem;
}

.method-card p {
  margin: 0;
  font-size: 0.85rem;
}

/* SEO Flour Reference Table */
.flour-guide-wrap {
  margin-top: 3.5rem;
}

.flour-guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.flour-guide-head p {
  color: var(--ink-muted);
  margin: 0.45rem 0 1.5rem;
  font-size: 0.94rem;
}

.table-scroll {
  overflow-x: auto;
}

.flour-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 620px;
}

.flour-table th {
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}

.flour-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: top;
}

.flour-table tbody tr:last-child td {
  border-bottom: none;
}

.quote-card {
  background: var(--ink);
  color: #f7f1e8;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.quote-text {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-style: italic;
  line-height: 1.38;
  margin: 0 0 1.8rem;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
}

.quote-author span {
  display: block;
  font-size: 0.82rem;
  color: #cbbba9;
}

/* Reviews */
.reviews-section {
  padding: 4.5rem 0;
  background: var(--surface-warm);
  border-top: 1px solid var(--border);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stars {
  color: #c8832a;
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
}

.review-card p {
  margin: 0 0 1.2rem;
  font-size: 0.94rem;
  color: var(--ink);
}

.review-card footer {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Newsletter */
.newsletter-section {
  padding: 4.5rem 0;
}

.newsletter-card {
  background: linear-gradient(135deg, #32231c 0%, #563222 100%);
  color: #faf5ee;
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.newsletter-card .eyebrow {
  color: #e6b89c;
}

.newsletter-card p {
  color: #dfd2c4;
  margin: 0.7rem 0 0;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.newsletter-form input {
  flex: 1;
  min-width: 210px;
  padding: 0.88rem 1.2rem;
  border-radius: 999px;
  border: none;
  font-size: 0.94rem;
}

.form-feedback {
  width: 100%;
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  color: #b7e4c7;
}

/* FAQ */
.faq-section {
  padding: 3.5rem 0 5.5rem;
}

.faq-container {
  max-width: 780px;
}

.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.45rem;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0.85rem 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d9cdc0;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-note {
  font-size: 0.88rem;
  max-width: 290px;
  margin-top: 0.75rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.88rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: #a8998a;
}

/* Cart Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 17, 13, 0.45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  background: var(--surface);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  box-shadow: var(--shadow-lg);
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.icon-close, .modal-close {
  background: var(--surface-warm);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-item-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.2rem;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-weight: 700;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.drawer-footer {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.promo-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.promo-row input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.promo-msg {
  font-size: 0.78rem;
  margin: 0 0 0.8rem;
  min-height: 1.1em;
  color: var(--sage);
}

.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.discount-row {
  color: var(--sage);
  font-weight: 600;
}

.total-final {
  font-weight: 700;
  font-size: 1.15rem;
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1rem;
}

.secure-note {
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin: 0.65rem 0 0;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 17, 13, 0.55);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
}

.recipe-modal-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.4rem;
}

.recipe-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface-warm);
  border-radius: var(--radius-sm);
  margin: 1rem 0 1.5rem;
  font-size: 0.86rem;
}

.recipe-columns {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
}

.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.ingredient-list label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  cursor: pointer;
}

.step-list {
  padding-left: 1.2rem;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.recipe-modal-cta {
  margin-top: 2rem;
  padding: 1.2rem 1.4rem;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.toc-grid {
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0;
}

.toc-chapter {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}

.toc-num {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.toc-chapter h4 {
  font-size: 1.25rem;
  margin: 0.15rem 0 0.25rem;
}

.toc-chapter p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.preview-footer {
  display: flex;
  justify-content: flex-end;
}

/* Checkout Modal */
.checkout-dialog {
  width: min(520px, 100%);
}

.checkout-sub {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 1.25rem;
}

.checkout-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.checkout-form {
  display: grid;
  gap: 0.95rem;
}

.checkout-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.checkout-form input {
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.92rem;
}

.payment-box {
  background: var(--surface-warm);
  padding: 1rem;
  border-radius: var(--radius-sm);
  display: grid;
  gap: 0.65rem;
}

.payment-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.checkout-success {
  text-align: center;
  padding: 1rem 0;
}

.success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.download-list {
  display: grid;
  gap: 0.65rem;
  margin: 1.4rem 0 1.6rem;
  text-align: left;
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  transform: translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  z-index: 95;
  transition: opacity 0.22s, transform 0.22s;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Dedicated Ebook Sales Page & Custom-Styled Payhip Buy Button
   ========================================================================== */

.payhip-hero-btn,
.payhip-nav-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.6rem !important;
  background: linear-gradient(135deg, #8b4526 0%, #6e341a 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 999px !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(139, 69, 38, 0.28) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
  cursor: pointer !important;
}

.payhip-hero-btn {
  padding: 1rem 2rem !important;
  font-size: 1.02rem !important;
}

.payhip-nav-btn {
  padding: 0.55rem 1.2rem !important;
  font-size: 0.86rem !important;
  box-shadow: 0 4px 12px rgba(139, 69, 38, 0.2) !important;
}

.payhip-hero-btn:hover,
.payhip-nav-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 30px rgba(139, 69, 38, 0.36) !important;
  filter: brightness(1.06) !important;
}

.payhip-hero-btn .btn-arrow {
  transition: transform 0.2s ease;
  pointer-events: none;
}

.payhip-hero-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   Embedded Payhip Checkout Window (Loaded inside the website popup)
   ========================================================================== */

.payhip-embed-dialog {
  width: min(680px, 96%);
  height: min(88vh, 780px);
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(35, 26, 22, 0.32);
  overflow: hidden;
  position: relative;
}

.payhip-embed-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.payhip-embed-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.payhip-embed-heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

.payhip-embed-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
  display: block;
  font-weight: 500;
}

.payhip-embed-close {
  position: static !important;
  background: var(--surface-warm) !important;
  border: 1px solid var(--border) !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  color: var(--ink) !important;
  transition: all 0.18s ease !important;
}

.payhip-embed-close:hover {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.payhip-embed-frame-container {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
  overflow: hidden;
}

.payhip-checkout-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #ffffff;
}

.payhip-embed-loader {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  z-index: 5;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: opacity 0.25s ease;
}

.payhip-embed-loader.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface-warm);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: payhipSpin 0.75s linear infinite;
}

@keyframes payhipSpin {
  to {
    transform: rotate(360deg);
  }
}

.payhip-embed-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: var(--surface-warm);
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--ink-muted);
}

@media (max-width: 680px) {
  .payhip-embed-dialog {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  .payhip-embed-topbar {
    padding: 0.85rem 1rem;
  }
  .payhip-embed-heading {
    font-size: 1.15rem;
  }
}

/* In-Page Checkout Modal Fallback */
.payhip-inline-dialog {
  width: min(640px, 100%);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.payhip-inline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.payhip-iframe-wrap {
  position: relative;
  width: 100%;
  height: min(76vh, 660px);
  background: #ffffff;
}

.payhip-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.payhip-iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  color: var(--ink-muted);
  background: var(--surface);
  z-index: 2;
}

.ebook-sales-hero {
  padding: 3.75rem 0 4.5rem;
}

.ebook-sales-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 3.5rem;
  align-items: start;
}

.ebook-cover-showcase {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1b1512;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
}

.ebook-cover-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-price-pill {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  background: #f2b749;
  color: #1f1611;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.ebook-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.ebook-quick-stats div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.75rem;
  text-align: center;
}

.ebook-quick-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.05;
  color: var(--accent);
}

.ebook-quick-stats span {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.ebook-highlights {
  margin: 1.25rem 0 1.75rem;
}

.buy-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-md);
}

.buy-box-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.buy-box-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: 0.2rem;
}

.buy-box-price {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.save-badge {
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.buy-box-rating {
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.buy-box-rating .stars {
  display: block;
  margin-bottom: 0.1rem;
}

.checkout-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 1.4rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.dietary-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.dietary-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.dietary-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.dietary-stat-card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.3rem;
}

.dietary-stat-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.chapters-section {
  padding: 5rem 0 2.5rem;
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.chapter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  box-shadow: var(--shadow-sm);
}

.chapter-card-wide {
  grid-column: 1 / -1;
}

.chapter-card h3 {
  font-size: 1.65rem;
  margin: 0.25rem 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.chapter-list {
  margin: 0;
  padding-left: 1.35rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.chapter-list.two-col-list {
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
}

.mid-cta-banner {
  margin-top: 2.75rem;
  background: linear-gradient(135deg, #2a1e18 0%, #4d2c1e 100%);
  color: #faf5ee;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.mid-cta-banner h3 {
  font-size: 1.85rem;
  margin-bottom: 0.25rem;
}

.mid-cta-banner p {
  margin: 0;
  color: #dfd2c4;
  font-size: 0.94rem;
}

/* Responsive */
@media (max-width: 960px) {
  .ebook-sales-grid,
  .dietary-strip-grid {
    grid-template-columns: 1fr;
  }

  .chapters-grid,
  .chapter-list.two-col-list {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .spotlight-card,
  .about-grid,
  .newsletter-card {
    grid-template-columns: 1fr;
  }

  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ebooks-grid,
  .recipes-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .value-grid,
  .ebooks-grid,
  .recipes-grid,
  .reviews-grid,
  .recipe-columns,
  .method-stats,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .recipe-search-wrap,
  .recipe-search-wrap input {
    width: 100%;
  }

  .spotlight-card,
  .newsletter-card {
    padding: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.4rem;
  }
}
