/* Pastel Color Design System for Ebook Hub & Category/Product Pages */
:root {
  /* Pastel Canvas & Neutrals */
  --bg-main: #FAF7F2;          /* Soft warm linen / ivory */
  --bg-card: #FFFFFF;          /* Crisp white */
  --bg-subtle: #F3EFE6;        /* Warm oat milk pastel */
  --bg-banner: #E9ECE5;        /* Soft sage-linen */
  --text-main: #2A2E2B;        /* Soft charcoal */
  --text-muted: #676C63;       /* Muted stone grey */
  --border-color: #E6E1D4;     /* Delicate pastel border */
  --border-subtle: #ECE8DD;

  /* Theme Accents (Soft, Elegant Pastels) */
  --pastel-primary: #D97252;   /* Warm terracotta blush */
  --pastel-primary-hover: #C56243;
  --pastel-primary-soft: #FDF0EB;
  --pastel-primary-border: #F7D4C7;

  --pastel-lavender-accent: #6B73E8;
  --pastel-lavender-soft: #F0F2FD;
  --pastel-lavender-border: #D7DCFA;

  --pastel-mint-accent: #538F75;
  --pastel-mint-soft: #EDF6F1;
  --pastel-mint-border: #CEE8DB;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(70, 60, 50, 0.04);
  --shadow-md: 0 8px 24px rgba(70, 60, 50, 0.06);
  --shadow-lg: 0 16px 36px rgba(70, 60, 50, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
}

header, section, footer {
  padding-inline: max(6vw, calc((100vw - 1200px) / 2));
}

/* Header */
header {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-family: Georgia, serif;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2A2E2B;
}

.brand b {
  color: var(--pastel-primary);
  font-size: 26px;
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

nav a {
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--pastel-primary);
}

.nav-pill {
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  background: #3D443F;
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(61, 68, 63, 0.15);
}

.nav-pill:hover {
  background: var(--pastel-primary);
  transform: translateY(-1px);
}

/* Breadcrumbs */
.breadcrumb-bar {
  padding-block: 16px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: #F4EFE6;
}

.breadcrumb-bar a {
  color: var(--text-main);
  font-weight: 600;
}

.breadcrumb-bar a:hover {
  color: var(--pastel-primary);
  text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: Georgia, serif;
  font-weight: normal;
  line-height: 1.15;
  margin: 14px 0;
  color: var(--text-main);
}

h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  letter-spacing: -0.035em;
}

h1 i {
  color: var(--pastel-primary);
  font-style: italic;
}

h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 22px;
}

.badge-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.intro {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 660px;
  margin-top: 10px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  background: var(--pastel-primary);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 114, 82, 0.22);
}

.btn-primary:hover {
  background: var(--pastel-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 114, 82, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: #3D443F;
  background: #FDFCF9;
  transform: translateY(-1px);
}

/* Hero Hub */
.hero-hub {
  padding-block: 70px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(253, 240, 235, 0.8) 0%, rgba(240, 242, 253, 0.6) 45%, rgba(250, 247, 242, 0) 75%);
}

.hero-hub h1 {
  max-width: 860px;
}

.hero-hub .intro {
  text-align: center;
}

/* Featured Banner Section with Call to Action on Index Page */
.banner-section {
  padding-block: 10px 48px;
}

.banner-card {
  position: relative;
  min-height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  background-color: #FAF7F2;
  background-image: linear-gradient(
      to right,
      rgba(250, 247, 242, 0.98) 0%,
      rgba(250, 247, 242, 0.94) 45%,
      rgba(250, 247, 242, 0.45) 75%,
      rgba(250, 247, 242, 0.1) 100%
    ),
    url('/books-banner.jpg');
  background-size: cover;
  background-position: right center;
  display: flex;
  align-items: center;
  padding: 48px 56px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.banner-card:hover {
  box-shadow: var(--shadow-lg);
}

.banner-content {
  max-width: 520px;
  z-index: 2;
}

.banner-content h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 10px 0 14px;
  line-height: 1.15;
  color: var(--text-main);
}

.banner-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .banner-card {
    padding: 36px 28px;
    background-image: linear-gradient(
        to bottom,
        rgba(250, 247, 242, 0.96) 0%,
        rgba(250, 247, 242, 0.92) 65%,
        rgba(250, 247, 242, 0.7) 100%
      ),
      url('/books-banner.jpg');
    background-position: center bottom;
    min-height: auto;
  }
}

/* Category Grid on Index Page */
.book-showcase-section {
  padding-block: 40px 84px;
}

.section-header {
  margin-bottom: 38px;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #D6CEC0;
}

/* 1:1 Aspect Ratio Icon */
.icon-container-1to1 {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  background: #F4EFE8;
  display: block;
  border: 1px solid var(--border-subtle);
}

.icon-container-1to1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.icon-container-1to1:hover img {
  transform: scale(1.03);
}

.icon-click-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 14px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
}

.icon-container-1to1:hover .icon-click-badge {
  background: var(--pastel-primary);
  color: #FFFFFF;
}

.category-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-card-title {
  font-size: 24px;
  margin: 6px 0;
}

.category-card-title a {
  color: inherit;
  transition: color 0.2s;
}

.category-card-title a:hover {
  color: var(--pastel-primary);
}

.category-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
  flex: 1;
}

.category-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Category Book List Page (Small 1:1 Icons Grid) */
.category-hero {
  padding-block: 50px 32px;
  text-align: center;
}

.category-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.book-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.book-list-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #D6CEC0;
}

.book-list-card.placeholder-card {
  background: #FCFAF6;
  border-style: dashed;
}

/* Small 1:1 Aspect Ratio Icon */
.small-icon-1to1 {
  width: 96px;
  height: 96px;
  min-width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #F4EFE8;
  border: 1px solid var(--border-subtle);
  display: block;
  box-shadow: 0 2px 8px rgba(70, 60, 50, 0.06);
}

.small-icon-1to1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-list-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-list-title {
  font-size: 19px;
  margin: 4px 0;
}

.book-list-title a:hover {
  color: var(--pastel-primary);
}

.book-list-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.book-list-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.book-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-sm-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-sm-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-sm-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.btn-sm-secondary:hover {
  border-color: #3D443F;
  background: #FDFCF9;
}

.btn-sm-disabled {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: #F3F1EC;
  color: #8C9188;
  font-size: 12.5px;
  font-weight: 600;
}

/* Feature/Value Props Section */
.why-section {
  padding-block: 68px;
  background: #F3EFE6;
  border-block: 1px solid var(--border-color);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.why-box {
  background: #FFFFFF;
  padding: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid #E6E1D4;
  box-shadow: var(--shadow-sm);
}

.why-box h3 {
  margin-top: 0;
  font-size: 19px;
  color: var(--text-main);
}

.why-box p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Product Hero (Claude Playbook) */
.product-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 5vw;
  padding-block: 56px;
}

.product-hero-cover {
  margin: 0;
  background: radial-gradient(ellipse at center, #FDF3EC 0%, #F5E5D8 100%);
  border-radius: 24px;
  text-align: center;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 1px solid #EFE4D6;
}

.product-hero-cover img {
  width: 82%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(70, 60, 50, 0.12);
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 16px;
  flex-wrap: wrap;
}

.micro {
  font-size: 13px;
  color: var(--text-muted);
}

.micro em {
  padding: 0 6px;
}

/* Inside the Book / Features Section */
.inside-section {
  background: #EEF3EA;
  padding-block: 68px;
  border-top: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 24px;
}

.features-grid article {
  border-top: 2px solid #C9D5C3;
  padding-top: 16px;
}

.features-grid article h3 {
  font-size: 20px;
  margin-top: 6px;
}

.features-grid article p {
  font-size: 15px;
  color: var(--text-muted);
}

/* Chapter Breakdown Section */
.chapters-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.chapter-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.chapter-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #D6CEC0;
}

.chapter-num-badge {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--pastel-primary-soft);
  color: var(--pastel-primary);
  border: 1px solid var(--pastel-primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.chapter-content {
  flex: 1;
}

.chapter-content h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--text-main);
  line-height: 1.35;
}

.chapter-content p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

details {
  border-block: 1px solid #C9D5C3;
  padding: 18px 0;
  margin-top: 32px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-main);
}

ol.chapter-list {
  margin: 16px 0 8px;
  padding-left: 24px;
}

ol.chapter-list li {
  padding: 6px 0;
  color: #383D3A;
}

/* Sample Previews Section */
.preview-section {
  padding-block: 68px;
}

.samples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

.samples-grid a {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
  box-shadow: var(--shadow-sm);
}

.samples-grid a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #D6CEC0;
}

.samples-grid a div {
  padding: 18px;
  background: #F5EFE6;
  border-radius: 8px;
  height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.samples-grid img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(70, 60, 50, 0.08);
}

.samples-grid h3 {
  font-size: 18px;
  margin: 14px 0 4px;
  color: var(--text-main);
}

/* Final Banner / Ending */
.ending-banner {
  background: linear-gradient(135deg, #EEF4F0 0%, #F5EFE8 50%, #ECEEF9 100%);
  color: var(--text-main);
  padding-block: 72px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.ending-banner h2 {
  color: var(--text-main);
}

.ending-banner p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 580px;
  margin: 12px auto 30px;
}

/* Scenario Box in Hero */
.scenario-box {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--pastel-primary);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 20px 0 24px;
  box-shadow: var(--shadow-sm);
}

.scenario-box p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #383D3A;
}

/* Book Overview Narrative */
.book-overview-section {
  padding-block: 64px;
  background: #FFFFFF;
  border-block: 1px solid var(--border-color);
}

.overview-text {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 840px;
  margin-bottom: 18px;
}

/* Audience Grid ("Who can benefit from this book?") */
.audience-section {
  padding-block: 68px;
  background: #FAF7F2;
  border-bottom: 1px solid var(--border-color);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.audience-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.audience-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #D6CEC0;
}

.audience-role {
  font-size: 16px;
  font-weight: 700;
  color: var(--pastel-primary);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audience-use {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Advantages Section ("What are the advantages of buying it?") */
.advantages-section {
  padding-block: 68px;
  background: #F3EFE6;
  border-bottom: 1px solid var(--border-color);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.advantage-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.advantage-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.35;
}

.advantage-title b {
  color: var(--pastel-primary);
  font-size: 18px;
}

.advantage-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Footer */
footer {
  padding-block: 28px;
  font-size: 14px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #FAF7F2;
}

footer a:hover {
  color: var(--pastel-primary);
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .category-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }
  .category-books-grid {
    grid-template-columns: 1fr;
  }
  .chapters-container {
    grid-template-columns: 1fr;
  }
  .audience-grid, .advantages-grid {
    grid-template-columns: 1fr;
  }
  .why-grid, .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: left;
  }
  .product-hero-cover {
    max-width: 380px;
    margin-inline: auto;
  }
  .samples-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  header {
    height: 64px;
  }
  .brand {
    font-size: 18px;
  }
  nav a:not(.nav-pill) {
    display: none;
  }
  section {
    padding-block: 40px;
  }
  .book-list-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .book-list-actions {
    justify-content: center;
  }
}
