/* Pentecost Publishing - Page Specific Styles */

/* ========================================
   GRADIENT LINKS (matches logo accent)
   ======================================== */
.gradient-link,
.main-nav a,
.footer-section a,
.footer-legal-links a,
.breadcrumb a,
.seo-text a,
.books-faq-answer-inner a,
.description-content a,
.legal-section a,
.level-test-cta a,
a.testimonial-book,
a.view-all-link {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-link:hover,
.main-nav a:hover,
.footer-section a:hover,
.footer-legal-links a:hover,
.breadcrumb a:hover,
.seo-text a:hover,
.books-faq-answer-inner a:hover,
.description-content a:hover,
.legal-section a:hover,
.level-test-cta a:hover,
a.testimonial-book:hover,
a.view-all-link:hover {
  filter: brightness(1.15);
}

/* Prevent horizontal “rubber band” / scroll from off-canvas UI (iPad Safari) */
html:has(.site-header) {
  overflow-x: hidden;
  max-width: 100%;
}

/* Reset body padding for pages using site-header */
body:has(.site-header) {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
}

/* Fallback for browsers that don't support :has() */
.home-page,
.books-page,
.book-page,
.blog-page,
.blog-article-page,
.method-page,
.legal-page,
.placement-page,
.test-page,
.vocab-page,
.matching-page,
.exercise-choice-page,
.flashcards-page,
.admin-page {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
}

/* ========================================
   NAVIGATION & HEADER
   ======================================== */

.site-header {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1.5rem;
  overflow-x: clip;
  max-width: 100%;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-dark);
}

.main-nav a {
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
  text-decoration: none;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  background: var(--color-dark);
}

.site-header .global-lang-selector-container select {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: var(--color-dark);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-dark);
  margin-right: auto;
  background: none;
}

.logo-icon {
  font-size: 1.8rem;
}

.logo-icon-img {
  height: 40px;
  width: auto;
}

/* Colorize SVG logo using mask - allows CSS color control */
.logo-icon-wrapper {
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  -webkit-mask: url('/images/logos/pentecost-logo.svg') no-repeat center;
  mask: url('/images/logos/pentecost-logo.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.logo-text .accent {
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Book page logo uses level color */
.book-page .logo-text .accent {
  background: var(--page-level-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.book-page .logo-icon-wrapper {
  background: var(--page-level-color);
}

/* Book page navigation uses level color */
.book-page .main-nav a {
  color: var(--page-level-color);
  opacity: 1;
}

.book-page .main-nav a:hover {
  color: var(--page-level-color);
  opacity: 0.7;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Hide mobile-only elements on desktop */
.mobile-nav-close {
  display: none;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  position: relative;
  transition: background 0.2s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-icon::before {
  top: -7px;
}

.hamburger-icon::after {
  top: 7px;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active .hamburger-icon {
  background: transparent;
}

.mobile-menu-toggle.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Override global styles for header lang selector */
.site-header .global-lang-selector-container {
  position: static;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  gap: 0.45rem;
}

/* ========================================
   HERO SECTION (Main Page)
   ======================================== */

.hero {
  background: #ffffff;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-slogan {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
}

.hero-slogan .highlight {
  display: block;
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #555;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* GEO: direct answer for AI crawlers — in DOM for SEO, visually hidden to avoid hero clutter */
.geo-direct-answer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.book-finder {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
}

.finder-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
}

.finder-field label {
  color: #666;
  font-size: 0.9rem;
  font-weight: 600;
}

.finder-field select {
  padding: 1rem 1.25rem;
  border: 2px solid #e0e0e0;
  background: white;
  color: var(--color-dark);
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.finder-field select:hover,
.finder-field select:focus {
  border-color: var(--color-level-b2);
  outline: none;
  box-shadow: 0 4px 12px rgba(234, 113, 49, 0.1);
}

.finder-field select option {
  background: white;
  color: var(--color-dark);
}

.btn-find {
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(234, 113, 49, 0.3);
}

.btn-find:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(234, 113, 49, 0.4);
}

/* ========================================
   PENTECOST METHOD SECTION
   ======================================== */

.method-section {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, 
    var(--color-level-a2) 0%, 
    var(--color-level-b2) 50%, 
    var(--color-level-c2) 100%);
  overflow: hidden;
}

.method-container {
  max-width: 1300px;
  margin: 0 auto;
}

.method-header {
  text-align: center;
  margin-bottom: 2rem;
}

.method-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-dark);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.method-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.method-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.method-citation {
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.method-citation a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.method-citation a:hover {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ========================================
   METHOD SHOWCASE (Book + Pillars)
   ======================================== */

.method-showcase {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(400px, 1.3fr);
  gap: 2.5rem;
  align-items: start;
}

/* Book Mockup Container */
.book-mockup-container {
  position: sticky;
  top: 100px;
}

/* Format Toggle Switch */
.format-toggle-switch {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.35rem;
  border-radius: 12px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  backdrop-filter: blur(10px);
}

.format-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.format-btn:hover {
  color: white;
}

.format-btn.active {
  background: white;
  color: var(--color-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.format-icon {
  font-size: 1.1rem;
}

.format-label {
  font-size: 0.9rem;
}

/* Book Mockup */
.book-mockup {
  position: relative;
}

.mockup-page {
  display: none;
  position: relative;
}

.mockup-page.active {
  display: block;
  animation: fadeInMockup 0.4s ease;
}

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

/* Book Image Placeholder */
.book-image-placeholder {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  background-color: #fff;
}

.book-image-placeholder img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 350px;
  object-fit: contain; /* Changed from cover to prevent cropping */
}

/* Ebook view: more vertical/portrait orientation */
.ebook-view .book-image-placeholder {
  max-width: 380px; /* Narrower to emphasize vertical orientation */
  margin: 0 auto;
}

.ebook-view .book-image-placeholder img {
  min-height: 500px; /* Taller minimum for portrait feel */
}

.placeholder-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  text-align: center;
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.placeholder-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.5rem;
}

.placeholder-hint {
  font-size: 0.8rem;
  color: #999;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* ========================================
   PULSATING HOTSPOTS
   ======================================== */

.hotspot {
  all: unset;
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 3px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.hotspot:hover {
  transform: scale(1.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.hotspot-number {
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1rem;
  z-index: 2;
}

.hotspot-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: white;
  animation: pulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Mobile Hotspot Navigation - separate navigation for mobile */
.mobile-hotspot-nav {
  display: none;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.mobile-hotspot {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  border: 3px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-hotspot:hover,
.mobile-hotspot:active {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.mobile-hotspot .hotspot-number {
  font-size: 1.2rem;
  color: var(--color-dark);
}

.mobile-hotspot .hotspot-pulse {
  background: white;
  animation: pulse 2s ease-out infinite;
}

/* Hotspot Positions - Paperback */
.paperback-view .hotspot-1 {
  top: 20%;
  left: 1%;
}

.paperback-view .hotspot-2 {
  bottom: 50%;
  right: 30%;
}

.paperback-view .hotspot-3 {
  top: 55%;
  left: 30%;
}

/* Hotspot Positions - E-Book */
.ebook-view .hotspot-1 {
  top: 12%;
  left: 30%;
}

.ebook-view .hotspot-2 {
  bottom: 15%;
  left: 50%;
}

.ebook-view .hotspot-3 {
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
}

/* ========================================
   METHOD PILLARS
   ======================================== */

.method-pillars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pillar {
  background: white;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e8e4de;
  transition: all 0.3s ease;
  scroll-margin-top: 100px;
  position: relative;
  overflow: hidden;
}

.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary) 0%, #ff6b35 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pillar:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--color-primary);
}

.pillar:hover::before {
  opacity: 1;
}

.pillar.highlight {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(234, 113, 49, 0.2), 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: pillarGlow 0.5s ease;
}

.pillar.highlight::before {
  opacity: 1;
}

@keyframes pillarGlow {
  0% { box-shadow: 0 0 0 0 rgba(234, 113, 49, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(234, 113, 49, 0.2); }
  100% { box-shadow: 0 0 0 3px rgba(234, 113, 49, 0.2), 0 10px 30px rgba(0, 0, 0, 0.1); }
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pillar-number {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #ff6b35 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.pillar-title {
  font-size: 1.1rem;
  color: var(--color-dark);
  margin: 0;
  font-weight: 700;
}

.pillar-text {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  padding-left: 2.5rem;
}

/* Method CTA */
.method-cta {
  text-align: center;
  margin-top: 2rem;
}

.btn-explore {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  color: var(--color-dark);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-explore:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: var(--color-dark);
}

.btn-explore .arrow {
  transition: transform 0.2s ease;
}

.btn-explore:hover .arrow {
  transform: translateX(5px);
}

.method-cta-learn {
  margin: 1rem 0 0.5rem 0;
}

.method-cta-learn a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.method-cta-learn a:hover {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ========================================
   METHOD SECTION RESPONSIVE
   ======================================== */

@media (max-width: 1100px) {
  .method-showcase {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .book-mockup-container {
    position: static;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .method-section {
    padding: 3rem 1rem;
  }
  
  .method-header {
    margin-bottom: 2rem;
  }
  
  .method-subtitle {
    font-size: 1rem;
  }
  
  .format-toggle-switch {
    max-width: 100%;
  }
  
  .format-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.75rem;
  }
  
  .format-label {
    font-size: 0.8rem;
  }
  
  .book-image-placeholder img {
    min-height: 280px;
  }
  
  .placeholder-fallback {
    min-height: 280px;
  }
  
  .placeholder-icon {
    font-size: 3rem;
  }
  
  .placeholder-text {
    font-size: 1.1rem;
  }
  
  /* Keep hotspots visible on mobile in same relative positions */
  .mockup-page .hotspot {
    width: 32px;
    height: 32px;
  }
  
  .mockup-page .hotspot .hotspot-number {
    font-size: 0.85rem;
  }
  
  /* Hide mobile hotspot navigation - keep hotspots on image */
  .mobile-hotspot-nav {
    display: none;
  }
  
  .pillar {
    padding: 1rem 1.25rem;
    scroll-margin-top: 80px;
  }
  
  .pillar-header {
    gap: 0.6rem;
    margin-bottom: 0.5rem;
  }
  
  .pillar-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
  
  .pillar-title {
    font-size: 1rem;
  }
  
  .pillar-text {
    padding-left: 0;
    font-size: 0.88rem;
  }
  
  .method-cta {
    margin-top: 2rem;
  }
  
  .btn-explore {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .ebook-view .ebook-device {
    max-width: 280px;
  }
  
  .ebook-content {
    padding: 1rem;
    min-height: 250px;
  }
  
  .ebook-view .book-text {
    font-size: 0.8rem;
  }
}

/* Method CTA Guarantee Text */
.method-cta-guarantee {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-it-works-section {
  padding: 5rem 2rem;
  background: #f8f9fa;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary, #2563eb);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.step-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
  color: var(--color-dark);
}

.step-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* ========================================
   OBJECTIONS / FAQ SECTION
   ======================================== */
.objections-section {
  padding: 5rem 2rem;
  background: #fff;
}

.objections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.objection-card {
  padding: 1.75rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.objection-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--color-dark);
}

.objection-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* ========================================
   FINAL CTA SECTION
   ======================================== */
.final-cta-section {
  padding: 5rem 2rem;
  background: var(--color-dark, #1a1a2e);
  text-align: center;
  color: #fff;
}

.final-cta-section h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
  color: #fff;
}

.final-cta-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-final-cta {
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
}

.final-cta-guarantee {
  margin-top: 2.5rem !important;
  margin-bottom: 0 !important;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .final-cta-section h2 {
    font-size: 1.5rem;
  }

  .how-it-works-section,
  .objections-section,
  .final-cta-section {
    padding: 3rem 1rem;
  }
}

/* ========================================
   FEATURED BOOKS SECTION
   ======================================== */

.featured-section {
  padding: 5rem 2rem;
  background: #fff;
}

.featured-section .format-badge {
  display: none;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 2rem;
  color: var(--color-dark);
  margin: 0;
}

.view-all-link {
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Carousel wrapper */
.featured-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.featured-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.featured-grid::-webkit-scrollbar {
  display: none;
}

.featured-grid > .book-card {
  flex: 0 0 180px;
  max-width: 180px;
  scroll-snap-align: start;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.95);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn-left {
  left: 6px;
}

.carousel-btn-right {
  right: 6px;
}

/* ========================================
   BOOK CARDS
   ======================================== */

.book-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  color: inherit;
}

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

.book-card-cover {
  aspect-ratio: 176 / 250;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-card-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--color-primary), #ff6b35);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.placeholder-cover .book-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.placeholder-cover .book-title-preview {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.book-level-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-primary);
  color: var(--color-bright);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* CEFR Level colors for book cards */
.book-level-badge.level-a1 { background: var(--color-level-a1); color: #1a1a1a; }
.book-level-badge.level-a2 { background: var(--color-level-a2); color: #1a1a1a; }
.book-level-badge.level-b1 { background: var(--color-level-b1); color: white; }
.book-level-badge.level-b2 { background: var(--color-level-b2); color: white; }
.book-level-badge.level-c1 { background: var(--color-level-c1); color: white; }
.book-level-badge.level-c2 { background: var(--color-level-c2); color: white; }

.book-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-card-language {
  font-size: 0.8rem;
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.book-card-flag {
  -webkit-text-fill-color: initial;
}

.book-card-for-learners {
  font-weight: 400;
  opacity: 0.8;
}

.book-card-title {
  font-size: 1.1rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.book-card-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.star {
  color: #ffc107;
}

.star.empty {
  color: #ddd;
}

/* Level-colored stars for book cards and list items */
.book-card.level-a1 .star,
.book-list-item.level-a1 .star { color: var(--color-level-a1); }

.book-card.level-a2 .star,
.book-list-item.level-a2 .star { color: var(--color-level-a2); }

.book-card.level-b1 .star,
.book-list-item.level-b1 .star { color: var(--color-level-b1); }

.book-card.level-b2 .star,
.book-list-item.level-b2 .star { color: var(--color-level-b2); }

.book-card.level-c1 .star,
.book-list-item.level-c1 .star { color: var(--color-level-c1); }

.book-card.level-c2 .star,
.book-list-item.level-c2 .star { color: var(--color-level-c2); }

.rating-value {
  margin-left: 0.25rem;
  font-weight: 600;
  color: var(--color-dark);
  font-size: 0.9rem;
}

.book-formats {
  display: flex;
  gap: 0.4rem;
}

.format-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: #f0f0f0;
  border-radius: 4px;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

/* ========================================
   BOOKS PAGE - SEARCH & FILTERS
   ======================================== */

.books-page {
  min-height: 100vh;
  background: #f8f9fa;
}

.books-hero {
  background: white;
  padding: 3rem 2rem;
  text-align: center;
}

.books-hero-title {
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.books-hero-subtitle {
  font-size: 1.05rem;
  color: #666;
  max-width: 640px;
  margin: 0 auto 0.75rem;
  line-height: 1.5;
}

.books-formats-notice {
  font-size: 0.95rem;
  color: #444;
  max-width: 720px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
  font-weight: 500;
}

.books-proof-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.books-proof-bar .proof-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
}

.books-proof-bar .proof-item svg {
  flex-shrink: 0;
}

.books-proof-bar #books-proof-rating svg {
  color: #f5a623;
}

.books-proof-bar #books-proof-count svg {
  color: var(--color-primary, #5b4fc4);
}

.search-bar-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-bar:focus-within {
  border-color: var(--color-level-b2);
  box-shadow: 0 4px 15px rgba(234, 113, 49, 0.1);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 1.5rem;
  color: var(--color-dark);
  font-size: 1rem;
  font-family: var(--font-primary);
}

.search-bar input::placeholder {
  color: #999;
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  background: white;
  border: none;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar button:hover {
  background: #f5f5f5;
}

.search-bar button svg {
  width: 20px;
  height: 20px;
}

.search-bar button .search-icon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 50%, var(--color-level-c2) 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.books-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

.books-container.filters-collapsed {
  grid-template-columns: 1fr;
}

.books-container.filters-collapsed .filters-sidebar {
  display: none;
}

.books-container.filters-collapsed .filters-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  grid-column: 1 / -1;
  max-width: 200px;
}

@media (max-width: 900px) {
  .books-container {
    grid-template-columns: 1fr;
  }
}

.filters-sidebar {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
  border: 1px solid #eee;
}

/* Filters toggle button - compact, matches sort-control style */
.filters-toggle {
  display: none;
  width: fit-content;
  padding: 0.4rem 0.75rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  color: #555;
  cursor: pointer;
  margin-bottom: 0.75rem;
  font-family: var(--font-primary);
  text-align: left;
  align-items: center;
  gap: 0.4rem;
}

.filters-toggle:hover {
  border-color: #bbb;
  color: var(--color-dark);
}

.filters-toggle svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

.filters-toggle::after {
  content: '\25BC';
  margin-left: 0.25rem;
  font-size: 0.55em;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.filters-toggle.active::after {
  transform: rotate(180deg);
}

@media (max-width: 900px) {
  .filters-toggle {
    display: flex;
  }
  
  .filters-sidebar {
    display: none;
  }
  
  .filters-sidebar.show {
    display: block;
  }
}

.filters-title {
  font-size: 1.2rem;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  display: block;
}

.filter-group select {
  width: 100%;
  padding: 0.85rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px !important;
  font-family: var(--font-primary);
  background: white;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.checkbox-item label,
.checkbox-item span {
  cursor: pointer;
  font-size: 1rem;
}

.apply-filters {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--color-level-a2) 0%, var(--color-level-b2) 100%);
  border: none;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1.25rem;
}

.apply-filters:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.clear-filters {
  width: 100%;
  padding: 0.6rem;
  background: transparent;
  border: 1px solid #ccc;
  color: #888;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.clear-filters:hover {
  background: #f0f0f0;
  border-color: #888;
  color: #444;
}

/* Book List View */
.books-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-list-item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  border: 1px solid #eee;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.book-list-item:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.book-list-cover {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 176 / 250;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-list-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-list-cover .placeholder-icon {
  font-size: 2.5rem;
  color: white;
}

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

.book-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.book-list-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-dark);
  margin: 0;
}

.book-list-badges {
  display: flex;
  gap: 0.5rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.badge-level {
  background: var(--color-primary);
  color: white;
}

/* CEFR Level colors for list badges */
.badge.badge-level.level-a1 { background: var(--color-level-a1); color: #1a1a1a; }
.badge.badge-level.level-a2 { background: var(--color-level-a2); color: #1a1a1a; }
.badge.badge-level.level-b1 { background: var(--color-level-b1); color: white; }
.badge.badge-level.level-b2 { background: var(--color-level-b2); color: white; }
.badge.badge-level.level-c1 { background: var(--color-level-c1); color: white; }
.badge.badge-level.level-c2 { background: var(--color-level-c2); color: white; }

.badge-language {
  background: white;
  color: #444;
  border: 1.5px solid #ccc;
}

.book-list-item.level-a1 .badge-language,
.book-card.level-a1 .badge-language {
  border-color: var(--color-level-a1);
  color: var(--color-level-a1);
}
.book-list-item.level-a2 .badge-language,
.book-card.level-a2 .badge-language {
  border-color: var(--color-level-a2);
  color: var(--color-level-a2);
}
.book-list-item.level-b1 .badge-language,
.book-card.level-b1 .badge-language {
  border-color: var(--color-level-b1);
  color: var(--color-level-b1);
}
.book-list-item.level-b2 .badge-language,
.book-card.level-b2 .badge-language {
  border-color: var(--color-level-b2);
  color: var(--color-level-b2);
}
.book-list-item.level-c1 .badge-language,
.book-card.level-c1 .badge-language {
  border-color: var(--color-level-c1);
  color: var(--color-level-c1);
}
.book-list-item.level-c2 .badge-language,
.book-card.level-c2 .badge-language {
  border-color: var(--color-level-c2);
  color: var(--color-level-c2);
}

.book-list-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.book-list-description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

/* Rating + price as one visual group (no space-between “floating” price) */
.book-list-footer {
  margin-top: 0.15rem;
}

.book-list-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1rem;
}

.book-list-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  row-gap: 0.15rem;
}

.book-list-formats {
  display: flex;
  gap: 0.5rem;
}

.book-price-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  background: var(--color-primary);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* List row: calmer chip, sits next to stars instead of far right */
.book-price-tag--list {
  font-size: 0.88rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  letter-spacing: normal;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.level-a1 .book-price-tag { background: var(--color-level-a1); color: #1a1a1a; }
.level-a2 .book-price-tag { background: var(--color-level-a2); color: #1a1a1a; }
.level-b1 .book-price-tag { background: var(--color-level-b1); color: white; }
.level-b2 .book-price-tag { background: var(--color-level-b2); color: white; }
.level-c1 .book-price-tag { background: var(--color-level-c1); color: white; }
.level-c2 .book-price-tag { background: var(--color-level-c2); color: white; }

.book-card .book-price-tag--card {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  letter-spacing: normal;
}

.results-info {
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.95rem;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.no-results p {
  color: #666;
}

/* Book Request Form (no-results state) */
.book-request-card {
  margin-top: 2rem;
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.book-request-card h4 {
  margin: 0 0 0.4rem;
  color: var(--color-dark);
  font-size: 1.05rem;
}

.book-request-card > p {
  margin: 0 0 1rem;
  color: #555;
  font-size: 0.9rem;
}

.request-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.request-tag {
  background: var(--color-primary, #3a5a9b);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.book-request-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.book-request-input,
.book-request-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.book-request-input:focus,
.book-request-textarea:focus {
  border-color: var(--color-primary, #3a5a9b);
  outline: none;
}

.book-request-textarea {
  resize: vertical;
  min-height: 60px;
}

.book-request-btn {
  background: var(--color-primary, #3a5a9b);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.book-request-btn:hover:not(:disabled) {
  opacity: 0.88;
}

.book-request-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.book-request-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin: 0;
}

.book-request-success {
  color: #27ae60;
  font-size: 0.95rem;
  margin: 0;
}

/* SEO Content Section */
.seo-content {
  background: #f8f9fa;
  padding: 2.5rem 2rem;
  border-top: 1px solid #eee;
}

.seo-content-inner {
  max-width: 800px;
  margin: 0 auto;
}

.seo-heading {
  font-size: 1.15rem;
  color: #666;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.seo-text {
  color: #888;
  line-height: 1.65;
  font-size: 0.88rem;
}

.seo-text p {
  margin-bottom: 0.75rem;
}

.seo-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-primary);
}

.seo-subheading {
  font-size: 1rem;
  font-weight: 600;
  color: #777;
  margin: 1.5rem 0 0.4rem 0;
}

.seo-subheading:first-of-type {
  margin-top: 1rem;
}

/* Books FAQ Section */
.books-faq-section {
  background: #fff;
  padding: 3rem 2rem 2.5rem;
  border-top: 1px solid #e8e8e8;
}

.books-faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.books-faq-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

.books-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.books-faq-item {
  border-bottom: 1px solid #e8e8e8;
}

.books-faq-item:first-child {
  border-top: 1px solid #e8e8e8;
}

.books-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.4;
  gap: 1rem;
  font-family: inherit;
}

.books-faq-question:hover {
  color: var(--color-accent, #2563eb);
}

.books-faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
  color: #888;
}

.books-faq-item.open .books-faq-chevron {
  transform: rotate(180deg);
}

.books-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.books-faq-item.open .books-faq-answer {
  max-height: 600px;
}

.books-faq-answer-inner {
  padding: 0 0 1.25rem 0;
  color: #555;
  line-height: 1.7;
  font-size: 0.95rem;
}

.books-faq-answer-inner a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-primary);
}

@media (max-width: 768px) {
  .books-faq-section {
    padding: 2rem 1rem 1.5rem;
  }

  .books-faq-title {
    font-size: 1.2rem;
  }

  .books-faq-question {
    font-size: 0.97rem;
    padding: 1rem 0;
  }

  .books-faq-answer-inner {
    font-size: 0.9rem;
  }
}

.seo-testimonials-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 0.75rem 0;
  scrollbar-width: none;
}

.seo-testimonials-grid::-webkit-scrollbar {
  display: none;
}

.seo-testimonials-grid .testimonial-card {
  flex: 0 0 260px;
  max-width: 260px;
  min-width: 0;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .seo-testimonials-grid .testimonial-card {
    flex: 0 0 240px;
    max-width: 240px;
  }
}

.seo-related-links {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  line-height: 1.8;
}

.seo-related-links a {
  color: var(--color-level-b2, #ea7131);
  text-decoration: none;
}

.seo-related-links a:hover {
  text-decoration: underline;
}

/* ========================================
   BOOK DETAIL PAGE
   ======================================== */

.book-page {
  min-height: 100vh;
  background: #f8f9fa;
}

/* Book page level theming */
.book-page.level-a1 { --page-level-color: var(--color-level-a1); --page-level-color-light: var(--color-level-a1-light); --page-level-text: #1a1a1a; }
.book-page.level-a2 { --page-level-color: var(--color-level-a2); --page-level-color-light: var(--color-level-a2-light); --page-level-text: #1a1a1a; }
.book-page.level-b1 { --page-level-color: var(--color-level-b1); --page-level-color-light: var(--color-level-b1-light); --page-level-text: white; }
.book-page.level-b2 { --page-level-color: var(--color-level-b2); --page-level-color-light: var(--color-level-b2-light); --page-level-text: white; }
.book-page.level-c1 { --page-level-color: var(--color-level-c1); --page-level-color-light: var(--color-level-c1-light); --page-level-text: white; }
.book-page.level-c2 { --page-level-color: var(--color-level-c2); --page-level-color-light: var(--color-level-c2-light); --page-level-text: white; }

.book-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb span {
  color: #999;
}

.book-detail-main {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.book-detail-cover {
  position: sticky;
  top: 100px;
  height: fit-content;
  z-index: 1;
}

.cover-image-container {
  aspect-ratio: 176 / 250;
  border-radius: 12px;
  overflow: hidden;
  background: var(--page-level-color, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  margin-bottom: 1.5rem;
}

.cover-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cover-placeholder {
  text-align: center;
  color: white;
  padding: 2rem;
}

.cover-placeholder .icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.cover-placeholder .title {
  font-size: 1.5rem;
  font-weight: 600;
}

.preview-btn {
  width: 100%;
  padding: 1rem;
  background: white;
  border: 2px solid var(--page-level-color, var(--color-primary));
  color: var(--page-level-color, var(--color-primary));
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.preview-btn:hover {
  background: var(--page-level-color, var(--color-primary));
  color: white;
}

.book-detail-info {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid #eee;
}

.book-detail-header {
  margin-bottom: 2rem;
}

.book-detail-language {
  color: var(--page-level-color, var(--color-primary));
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.book-detail-title {
  font-size: 2.2rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.book-detail-author {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1rem;
}

.book-detail-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rating-stars {
  display: flex;
  gap: 0.15rem;
}

/* Book page rating stars use level color */
.book-page .rating-stars .star {
  color: var(--page-level-color, #ffc107);
}

.book-page .rating-stars .star.empty {
  color: #ddd;
}

/* Individual review stars on book page use level color */
.book-page .review-rating .star {
  color: var(--page-level-color, #ffc107);
}

.book-page .review-rating .star.empty {
  color: #ddd;
}

.rating-text {
  font-weight: 600;
  color: var(--color-dark);
}

.review-count {
  color: #666;
}

.book-detail-badges {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.detail-badge {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
}

.detail-badge.level {
  background: var(--color-primary);
  color: white;
  font-weight: 700;
}

/* CEFR Level-specific badge colors */
.detail-badge.level-a1 {
  background: var(--color-level-a1);
  color: #1a1a1a;
}

.detail-badge.level-a2 {
  background: var(--color-level-a2);
  color: #1a1a1a;
}

.detail-badge.level-b1 {
  background: var(--color-level-b1);
  color: white;
}

.detail-badge.level-b2 {
  background: var(--color-level-b2);
  color: white;
}

.detail-badge.level-c1 {
  background: var(--color-level-c1);
  color: white;
}

.detail-badge.level-c2 {
  background: var(--color-level-c2);
  color: white;
}

.detail-badge.format {
  background: #f0f0f0;
  color: #333;
}

.detail-badge.for-learners {
  background: #6c757d;
  color: white;
  font-weight: 500;
  font-size: 0.85rem;
}

.for-learners-text {
  color: #6c757d;
  font-weight: 500;
}

.book-detail-price {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.price-row:last-child {
  border-bottom: none;
}

.price-format {
  font-weight: 500;
  color: #333;
}

.price-value {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-dark);
}

.purchase-section {
  margin-bottom: 2rem;
  background: var(--page-level-color, var(--color-primary));
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.purchase-title {
  font-size: 1.3rem;
  color: white;
  margin: 0 0 1.25rem 0;
  font-weight: 700;
}

/* ── Buy Direct CTA (physical books) ────────────────────── */
/* ── Format Toggle Pills ─────────────────────────────── */
.format-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.25rem;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 4px;
  position: relative;
  z-index: 2;
}

.format-pill {
  flex: 1;
  padding: 0.65rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.format-pill.active {
  background: white;
  color: var(--page-level-color, var(--color-primary));
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.format-pill:hover:not(.active) {
  background: rgba(255,255,255,0.25);
  color: white;
}

/* ── Purchase Panels ─────────────────────────────────── */
.purchase-panel {
  animation: panelFadeIn 0.2s ease;
  position: relative;
  z-index: 2;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.buy-direct-card {
  background: white;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.buy-direct-price {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark, #1a1a1a);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.buy-direct-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  background: var(--page-level-color, var(--color-primary));
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.buy-direct-btn:hover {
  transform: translateY(-2px);
  filter: brightness(110%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: white;
}

.buy-direct-btn svg {
  flex-shrink: 0;
  stroke: white;
}

.buy-direct-shipping-note {
  display: block;
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.6rem;
}

.buy-direct-trust {
  margin-top: 0.75rem;
}

.ebook-external-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Side-by-side format cards ────────────────────────── */
.format-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}

.format-card {
  background: white;
  border-radius: 14px;
  padding: 1.25rem 1.1rem 1.1rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.format-card--solo {
  grid-column: 1 / -1;
  max-width: 340px;
  margin: 0 auto;
  width: 100%;
}

.format-card__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.format-card__type {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}

.format-card__formats {
  font-size: 0.72rem;
  color: #999;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.format-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

/* POD print card while /api/shipping-quote runs (no list price in catalog) */
.format-card--physical-pending .format-card__price {
  font-size: 0.92rem;
  font-weight: 500;
  color: #666;
}
.physical-price-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.physical-price-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--color-primary, #ea7131);
  border-radius: 50%;
  animation: format-card-spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes format-card-spin {
  to { transform: rotate(360deg); }
}

.format-card__price {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.format-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: var(--page-level-color, var(--color-primary));
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.format-card__btn:hover {
  transform: translateY(-2px);
  filter: brightness(110%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: white;
}

.format-card__btn svg {
  flex-shrink: 0;
  stroke: white;
}

.format-card__btn--secondary {
  background: transparent;
  color: var(--page-level-color, var(--color-primary));
  border: 2px solid var(--page-level-color, var(--color-primary));
  box-shadow: none;
}

.format-card__btn--secondary svg {
  stroke: var(--page-level-color, var(--color-primary));
}

.format-card__btn--secondary:hover {
  background: var(--page-level-color, var(--color-primary));
  color: white;
  filter: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.format-card__btn--secondary:hover svg {
  stroke: white;
}

.format-card__note {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.6rem;
}

.format-card__note svg {
  flex-shrink: 0;
  stroke: #aaa;
}

.format-card__cart {
  width: 100%;
  margin-top: 0.5rem;
}

/* Same button height across both cards */
.format-card .add-to-cart-btn {
  min-height: 48px;
}

.format-card__guarantee {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.72rem;
  line-height: 1.45;
  color: #555;
}

.format-card__guarantee .guarantee-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.purchase-trust-shared {
  margin-top: 0.75rem;
  position: relative;
  z-index: 2;
}

.ebook-also-available {
  position: relative;
  z-index: 2;
  margin-top: 0.75rem;
}

.ebook-also-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

@media (max-width: 540px) {
  .format-cards {
    grid-template-columns: 1fr;
  }
  .format-card--solo {
    max-width: none;
  }
}

/* Legacy container (hidden) */
#purchase-platforms {
  display: none;
}

/* Format sections inside purchase area (kept for catalog pages) */
.format-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--page-level-color-light, #f0f0f0);
}

.format-name {
  font-weight: 700;
  color: var(--color-dark);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.format-price {
  font-weight: 700;
  color: var(--color-dark);
  font-size: 1.1rem;
  display: none;
}

.purchase-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.purchase-platforms .platform-link {
  display: flex;
  align-items: center;
}

/* Prominent platform links with CEFR colored backgrounds */
.platform-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 3px solid var(--page-level-color, var(--color-primary));
  background: white;
  color: #1a1a1a;
  min-height: 48px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.platform-link:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: var(--page-level-color-light, rgba(234, 113, 49, 0.1));
  color: #1a1a1a;
}

.platform-link .platform-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.platform-link .platform-name {
  display: none; /* Hide text when logo is present */
}

.platform-link .platform-price {
  color: #1a1a1a;
  font-weight: 800;
  font-size: 1.05rem;
}

/* Platform logo images */
.platform-logo-img {
  height: 20px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
}

.platform-link.apple .platform-logo-img {
  height: 18px;
}

.platform-link.google .platform-logo-img {
  height: 18px;
}

.platform-link.empik .platform-logo-img {
  height: 16px;
}

/* Empik logo swap for mobile */
.empik-mobile {
  display: none;
}

.empik-desktop {
  display: inline-block;
}

@media (max-width: 768px) {
  .empik-mobile {
    display: inline-block;
    height: 22px;
  }
  
  .empik-desktop {
    display: none;
  }
}

/* Feature highlights */
.book-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-bottom: 1.75rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feature-check {
  color: var(--page-level-color, var(--color-primary));
  flex-shrink: 0;
}

.feature-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

/* Full-width description section (above reviews) */
.book-description-section {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid #eee;
  margin-bottom: 3rem;
}

.description-section-title {
  font-size: 1.5rem;
  color: var(--color-dark);
  margin: 0 0 1.5rem 0;
}

.description-content {
  color: #444;
  line-height: 1.8;
  font-size: 1.05rem;
}

.description-content h3 {
  font-size: 1.25rem;
  color: var(--color-dark);
  margin: 1.5rem 0 0.75rem;
}

.description-content h4 {
  font-size: 1.1rem;
  color: var(--color-dark);
  margin: 1.25rem 0 0.5rem;
}

.description-content p {
  margin: 0 0 1rem;
}

.description-content ul,
.description-content ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.5rem;
}

.description-content li {
  margin-bottom: 0.4rem;
}

.description-content a {
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
}

.description-content strong {
  font-weight: 600;
  color: var(--color-dark);
}

.description-content em {
  font-style: italic;
}

/* Book metadata section (bottom, below reviews) */
.book-metadata-section {
  margin-top: 2rem;
  margin-bottom: 3rem;
  opacity: 0.7;
  font-size: 0.9rem;
}

.book-metadata-section .book-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.book-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spec-label {
  font-size: 0.85rem;
  color: #666;
}

.spec-value {
  font-weight: 600;
  color: var(--color-dark);
}

/* Reviews Section */
.reviews-section {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid #eee;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.reviews-title {
  font-size: 1.5rem;
  color: var(--color-dark);
  margin: 0;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reviews-average {
  font-size: 2rem;
  font-weight: 700;
  color: var(--page-level-color, var(--color-dark));
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-item {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-author {
  font-weight: 600;
  color: var(--color-dark);
}

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

.review-rating {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.review-text {
  color: #555;
  line-height: 1.6;
}

/* ========================================
   ADMIN PANEL
   ======================================== */

.admin-page {
  min-height: 100vh;
  background: #f8f9fa;
}

.admin-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-title {
  color: white;
  font-size: 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-logo {
  height: 36px;
  width: auto;
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-add-book {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-add-book:hover {
  transform: translateY(-2px);
  filter: brightness(110%);
}

.admin-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--color-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tr:hover {
  background: #fafafa;
}

.admin-table-row {
  cursor: pointer;
}

.admin-table-title {
  font-weight: 600;
  color: var(--color-dark);
}

.admin-table-metric {
  font-weight: 600;
}

.admin-table-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-section {
  margin-top: 2.5rem;
}

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

.platform-config-editor {
  width: 100%;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.platform-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #555;
}

.admin-table .badge-status {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
}

.admin-table .badge-status-new {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.btn-edit,
.btn-delete {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-edit {
  background: #e8f4fd;
  color: #1976d2;
}

.btn-edit:hover {
  background: #1976d2;
  color: white;
}

.btn-delete {
  background: #fdeaea;
  color: #d32f2f;
}

.btn-delete:hover {
  background: #d32f2f;
  color: white;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0;
}

.admin-tab {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 8px 8px 0 0;
}

.admin-tab:hover {
  color: var(--color-primary);
  background: rgba(233, 69, 96, 0.05);
}

.admin-tab.active {
  color: var(--color-primary);
  background: #fff;
  border: 2px solid #eee;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Admin Filters */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 12px;
  border: 1px solid #eee;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 140px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:hover {
  border-color: #bbb;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

/* Table Metrics */
.admin-table-metric {
  font-weight: 600;
  text-align: center;
}

.admin-table-metric.metric-complete {
  color: #2e7d32;
}

.admin-table-metric.metric-partial {
  color: #f57c00;
}

/* Level Badges */
.badge.level-a1 { background: var(--color-level-a1); color: #1a1a1a; }
.badge.level-a2 { background: var(--color-level-a2); color: #1a1a1a; }
.badge.level-b1 { background: var(--color-level-b1); color: white; }
.badge.level-b2 { background: var(--color-level-b2); color: white; }
.badge.level-c1 { background: var(--color-level-c1); color: white; }
.badge.level-c2 { background: var(--color-level-c2); color: white; }

/* Platforms Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.platform-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eee;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.platform-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.platform-card.disabled {
  opacity: 0.6;
  background: #f8f9fa;
}

.platform-card-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.platform-card-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #4caf50;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.platform-card-body {
  padding: 1.5rem;
}

.platform-formats h4,
.platform-languages h4 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.format-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.format-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.format-check-item:hover {
  background: #eee;
}

.format-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

.format-check-item span {
  font-size: 0.9rem;
  text-transform: capitalize;
}

.platform-languages {
  margin-top: 1.25rem;
}

.language-info {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
}

.lang-count {
  font-weight: 600;
  color: var(--color-primary);
}

.lang-all {
  font-weight: 600;
  color: #4caf50;
}

.btn-edit-languages {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: #e8f4fd;
  color: #1976d2;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-languages:hover {
  background: #1976d2;
  color: #fff;
}

.platform-rules {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rule-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #fff3e0;
  color: #e65100;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Modal Large */
.modal.modal-large {
  max-width: 900px;
}

/* Modal Footer with Delete */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.modal-footer-right {
  display: flex;
  gap: 0.75rem;
}

.modal-footer .btn-delete {
  background: #fdeaea;
  color: #d32f2f;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
}

.modal-footer .btn-delete:hover {
  background: #d32f2f;
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  display: none;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.3rem;
  color: var(--color-dark);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-dark);
}

.modal-body {
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  box-sizing: border-box;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Format sections for platforms */
.form-hint {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
}

.format-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e9ecef;
}

.format-platforms {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.platform-entry {
  display: grid;
  grid-template-columns: 100px 120px 1fr 100px 90px;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.platform-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #495057;
}

.platform-entry input[type="url"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
}

.platform-entry input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: right;
}

.platform-entry select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.8rem;
  background: white;
}

@media (max-width: 768px) {
  .platform-entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .platform-label {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
  }
  
  .platform-entry input,
  .platform-entry select {
    padding: 0.75rem;
  }
}

/* File Upload Styles */
.file-upload-group {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.file-preview {
  width: 100px;
  height: 130px;
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-placeholder {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  padding: 0.5rem;
}

.file-preview-pdf {
  height: 80px;
}

.file-preview-pdf .file-name {
  font-size: 0.7rem;
  color: #666;
  word-break: break-all;
  padding: 0.25rem;
  text-align: center;
}

.file-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  width: fit-content;
}

.file-upload-btn:hover {
  background: #e8e8e8;
  border-color: var(--color-primary);
}

.file-upload-btn input[type="file"] {
  display: none;
}

.file-url-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #666;
}

.file-url-option input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.btn-clear-file {
  background: none;
  border: none;
  color: #999;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  width: fit-content;
}

.btn-clear-file:hover {
  color: #e54;
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  background: #f0f0f0;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: #666;
}

.btn-cancel:hover {
  background: #e0e0e0;
}

.btn-save {
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save:hover {
  filter: brightness(110%);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 2rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  font-weight: normal;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.footer-logo .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-legal-links {
  margin-bottom: 1.5rem;
}

.footer-legal-links a {
  font-weight: normal;
  font-size: 0.85rem;
}

.footer-legal-links a:hover {
  text-decoration: none;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.75rem;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablets and below (max-width: 900px) */
@media (max-width: 900px) {
  .books-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .filters-sidebar {
    position: static;
    margin-bottom: 1rem;
  }
  
  .reviews-section {
    padding: 1.5rem;
  }
}

/* Book detail mobile layout (max-width: 768px) */
@media (max-width: 768px) {
  .book-detail-main {
    grid-template-columns: 1fr;
  }
  
  .book-detail-cover {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .book-detail-info {
    padding: 1.5rem;
  }
  
  .book-detail-title {
    font-size: 1.6rem;
  }
}

/* Mobile devices (max-width: 768px) */
@media (max-width: 768px) {
  /* Header */
  .site-header {
    padding: 0.75rem 1rem;
    flex-wrap: nowrap;
    gap: 0.75rem;
  }
  
  .logo {
    flex: 1;
  }
  
  .logo-icon {
    font-size: 1.5rem;
  }
  
  .logo-icon-img,
  .logo-icon-wrapper {
    height: 32px;
    width: 32px;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
  
  .site-header .global-lang-selector-container {
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
  }
  
  /* Show hamburger menu on mobile */
  .mobile-menu-toggle {
    display: block;
    order: 3;
  }
  
  /* Mobile nav - hidden by default, shown when active */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 4.5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  .main-nav.active {
    transform: translateX(0);
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  
  .main-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-nav li:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-nav a {
    display: block;
    padding: 1.25rem 0.5rem;
    font-size: 1.1rem;
  }
  
  /* Close button inside mobile nav */
  .mobile-nav-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
  }
  
  .mobile-nav-close:hover {
    color: var(--color-primary);
  }
  
  /* Overlay when menu is open */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  
  .menu-overlay.active {
    display: block;
  }
  
  /* Hero */
  .hero {
    min-height: auto;
    padding: 2.5rem 1rem 3rem;
  }
  
  .hero-content {
    width: 100%;
  }
  
  .hero-slogan {
    font-size: 2rem;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }
  
  .book-finder {
    padding: 1.25rem;
    gap: 0.75rem;
    border-radius: 12px;
  }
  
  .finder-field {
    min-width: 100%;
  }
  
  .finder-field label {
    font-size: 0.8rem;
  }
  
  .finder-field select {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
  
  .btn-find {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
  }
  
  /* Method Section */
  .method-section {
    padding: 3rem 1rem;
  }
  
  .method-header {
    margin-bottom: 2.5rem;
  }
  
  .method-badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
  }
  
  .method-title {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
  }
  
  .method-subtitle {
    font-size: 1rem;
  }
  
  .method-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .method-step {
    padding: 1.5rem;
    padding-top: 2rem;
  }
  
  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    top: -12px;
    left: 1.5rem;
  }
  
  .step-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .step-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }
  
  .step-description {
    font-size: 0.95rem;
  }
  
  .method-highlight {
    padding: 1.5rem;
    gap: 1.5rem;
    text-align: center;
  }
  
  .method-highlight-content {
    min-width: 100%;
  }
  
  .method-highlight h3 {
    font-size: 1.4rem;
  }
  
  .method-highlight p {
    font-size: 0.95rem;
  }
  
  .qr-demo {
    padding: 1.25rem;
    width: 100%;
  }
  
  .qr-demo-icon {
    font-size: 3rem;
  }
  
  /* Featured Section */
  .featured-section {
    padding: 3rem 1rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .featured-grid > .book-card {
    flex: 0 0 160px;
    max-width: 160px;
  }

  .carousel-btn-left { left: 4px; }
  .carousel-btn-right { right: 4px; }
  
  /* Book Cards */
  .book-card-content {
    padding: 1rem;
  }
  
  .book-card-language {
    font-size: 0.7rem;
  }
  
  .book-card-title {
    font-size: 0.95rem;
  }
  
  .book-card-description {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
  
  .book-card-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    padding-top: 0.75rem;
  }
  
  .book-formats {
    flex-wrap: wrap;
  }
  
  .format-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }
  
  /* Books Page */
  .books-hero {
    padding: 2rem 1rem;
  }
  
  .books-hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .books-hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 1rem;
  }
  
  .seo-content {
    padding: 1.5rem 1rem;
  }
  
  .seo-heading {
    font-size: 1.05rem;
  }
  
  .search-bar input {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  
  .search-bar button {
    padding: 0.875rem 1rem;
  }
  
  .filters-sidebar {
    padding: 1rem;
    border-radius: 10px;
    position: relative;
    top: auto;
  }
  
  .filters-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .filter-group {
    margin-bottom: 1rem;
  }
  
  .filter-group select {
    padding: 1rem 0.85rem !important;
    font-size: 18px !important;
    min-height: 50px;
    transform: none !important;
    -webkit-transform: none !important;
    line-height: 1.4;
  }
  
  .filter-group select option {
    font-size: 18px !important;
    padding: 12px !important;
  }
  
  .filter-label {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem;
  }
  
  .apply-filters {
    padding: 1rem;
    font-size: 18px !important;
    min-height: 48px;
  }

  .clear-filters {
    padding: 1rem;
    font-size: 18px !important;
  }
  
  .checkbox-item span {
    font-size: 18px !important;
  }
  
  .checkbox-item {
    padding: 0.25rem 0;
  }
  
  .filters-sidebar * {
    transform: none !important;
  }
  
  /* Book List Items */
  .book-list-item {
    padding: 1rem;
    gap: 1rem;
    flex-direction: row;
    text-align: left;
  }
  
  .book-list-cover {
    width: 80px;
    min-width: 80px;
  }
  
  .book-list-cover .placeholder-icon {
    font-size: 1.8rem;
  }
  
  .book-list-title {
    font-size: 1rem;
  }
  
  .book-list-badges {
    margin-top: 0.25rem;
  }
  
  .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
  
  .book-list-meta {
    font-size: 0.8rem;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .book-list-description {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .book-list-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
  
  .book-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  /* Book Detail Page */
  .book-detail-container {
    padding: 1rem;
  }
  
  .breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  
  .book-detail-main {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .cover-image-container {
    margin-bottom: 1rem;
  }
  
  .cover-placeholder .icon {
    font-size: 3.5rem;
  }
  
  .cover-placeholder .title {
    font-size: 1.2rem;
  }
  
  .preview-btn {
    padding: 0.875rem;
    font-size: 0.9rem;
  }
  
  .book-detail-info {
    padding: 1.25rem;
  }
  
  .book-detail-header {
    margin-bottom: 1.5rem;
  }
  
  .book-detail-language {
    font-size: 0.8rem;
  }
  
  .book-detail-title {
    font-size: 1.4rem;
  }
  
  .book-detail-author {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .book-detail-rating {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .book-detail-badges {
    margin-bottom: 1.5rem;
  }
  
  .detail-badge {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .book-detail-price {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .price-row {
    padding: 0.6rem 0;
  }
  
  .price-format {
    font-size: 0.9rem;
  }
  
  .price-value {
    font-size: 1.1rem;
  }
  
  .purchase-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 12px;
  }

  .buy-direct-card {
    padding: 1.25rem;
  }

  .buy-direct-price {
    font-size: 1.7rem;
  }

  .buy-direct-btn {
    font-size: 1.05rem;
    padding: 0.9rem 1.5rem;
  }

  .format-pill {
    font-size: 0.85rem;
    padding: 0.55rem 0.8rem;
  }

  .format-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }
  
  .format-name {
    font-size: 0.9rem;
  }
  
  .ebook-external-platforms,
  .purchase-platforms {
    gap: 0.5rem;
  }
  
  .platform-link {
    padding: 0.5rem 0.85rem;
    min-height: 44px;
    border-radius: 8px;
    border-width: 2px;
    gap: 0.5rem;
  }
  
  .platform-logo-img {
    height: 16px;
    max-width: 60px;
  }
  
  .platform-link .platform-price {
    font-size: 0.9rem;
  }
  
  .book-description {
    margin-bottom: 1.5rem;
  }
  
  .description-title {
    font-size: 1.1rem;
  }
  
  .description-wrapper {
    max-height: 5.1em; /* ~3 lines at 1.7 line-height */
  }
  
  .description-text {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  .description-toggle {
    font-size: 0.9rem;
  }
  
  .book-specs {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .spec-label {
    font-size: 0.75rem;
  }
  
  .spec-value {
    font-size: 0.9rem;
  }
  
  /* Reviews */
  .reviews-section {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
  
  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .reviews-title {
    font-size: 1.25rem;
  }
  
  .reviews-average {
    font-size: 1.5rem;
  }
  
  .reviews-list {
    gap: 1rem;
  }
  
  .review-item {
    padding: 1rem;
  }
  
  .review-author {
    font-size: 0.95rem;
  }
  
  .review-date {
    font-size: 0.75rem;
  }
  
  .review-text {
    font-size: 0.9rem;
  }
  
  /* Footer */
  .site-footer {
    padding: 2.5rem 1rem 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .footer-section p,
  .footer-section a {
    font-size: 0.9rem;
  }
  
  .footer-bottom {
    padding-top: 1.5rem;
  }
  
  .footer-logo {
    font-size: 1.25rem;
  }
  
  /* Admin Panel */
  .admin-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .admin-title {
    font-size: 1.2rem;
  }
  
  .admin-container {
    padding: 1rem;
  }
  
  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-add-book {
    justify-content: center;
  }
  
  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .admin-table {
    min-width: 600px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
  
  /* Modal */
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-start;
  }
  
  .modal {
    max-height: 95vh;
    border-radius: 12px;
    margin-top: 0.5rem;
  }
  
  .modal-header {
    padding: 1rem 1.25rem;
  }
  
  .modal-title {
    font-size: 1.15rem;
  }
  
  .modal-body {
    padding: 1.25rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-group label {
    font-size: 0.85rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.65rem;
    font-size: 0.9rem;
  }
  
  .modal-footer {
    padding: 1rem 1.25rem;
  }
  
  .btn-cancel,
  .btn-save {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
  .hero-slogan {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
  
  .featured-grid > .book-card {
    flex: 0 0 150px;
    max-width: 150px;
  }

  .carousel-btn { display: none !important; }

  .books-main .book-card {
    display: flex;
    flex-direction: row;
  }
  
  .books-main .book-card-cover {
    width: 100px;
    min-width: 100px;
    aspect-ratio: 176 / 250;
  }
  
  .books-main .book-card-content {
    flex: 1;
    padding: 0.75rem;
  }
  
  .book-level-badge {
    top: 5px;
    right: 5px;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
  
  .placeholder-cover .book-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .placeholder-cover .book-title-preview {
    font-size: 0.75rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .purchase-platforms {
    grid-template-columns: 1fr;
  }
  
  .book-specs {
    grid-template-columns: 1fr;
  }
  
  .book-list-item {
    flex-direction: column;
    text-align: center;
  }

  .book-list-content {
    align-items: center;
  }
  
  .book-list-cover {
    width: 120px;
    margin: 0 auto 0.5rem;
  }
  
  .book-list-header {
    align-items: center;
  }

  .book-list-meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
  }

  .book-list-meta-sep {
    display: none;
  }
  
  .book-list-cta-row {
    justify-content: center;
    align-items: center;
  }
  
  .book-list-description {
    text-align: center;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.animate-in {
  animation: fadeIn 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */

@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .book-card:hover,
  .method-step:hover {
    transform: none;
    box-shadow: none;
  }
  
  .book-list-item:hover {
    transform: none;
  }
  
  /* Larger touch targets */
  .btn-find,
  .apply-filters,
  .clear-filters,
  .platform-btn,
  .preview-btn {
    min-height: 48px;
  }
  
  .finder-field select,
  .filter-group select {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .checkbox-item {
    min-height: 44px;
  }
  
  .checkbox-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
  
  .main-nav a {
    padding: 0.5rem;
  }
}

/* ========================================
   ADD REVIEW FORM
   ======================================== */

.add-review-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #eee;
  animation: fadeSlideDown 0.3s ease;
}

.add-review-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1.25rem;
}

.review-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.review-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.review-form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.review-form input[type="text"],
.review-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.review-form input[type="text"]:focus,
.review-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.review-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Star Rating Input */
.star-rating-input {
  display: flex;
  gap: 0.25rem;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #ddd;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, transform 0.15s;
}

.star-btn:hover {
  transform: scale(1.1);
}

.star-btn:focus {
  outline: none;
}

.star-btn:active {
  transform: scale(0.95);
}

.star-btn.active {
  color: var(--page-level-color, #ffc107);
}

/* CEFR Level-colored star buttons */
.book-page.level-a1 .star-btn.active { color: var(--color-level-a1); }
.book-page.level-a2 .star-btn.active { color: var(--color-level-a2); }
.book-page.level-b1 .star-btn.active { color: var(--color-level-b1); }
.book-page.level-b2 .star-btn.active { color: var(--color-level-b2); }
.book-page.level-c1 .star-btn.active { color: var(--color-level-c1); }
.book-page.level-c2 .star-btn.active { color: var(--color-level-c2); }

.btn-submit-review {
  margin-top: 1rem;
  padding: 0.875rem 2rem;
  background: var(--page-level-color, var(--color-primary));
  color: var(--page-level-text, white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, filter 0.2s;
}

.btn-submit-review:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* CEFR Level-colored submit button */
.book-page.level-a1 .btn-submit-review { background: var(--color-level-a1); color: #1a1a1a; }
.book-page.level-a2 .btn-submit-review { background: var(--color-level-a2); color: #1a1a1a; }
.book-page.level-b1 .btn-submit-review { background: var(--color-level-b1); color: white; }
.book-page.level-b2 .btn-submit-review { background: var(--color-level-b2); color: white; }
.book-page.level-c1 .btn-submit-review { background: var(--color-level-c1); color: white; }
.book-page.level-c2 .btn-submit-review { background: var(--color-level-c2); color: white; }

/* New review animation */
.review-item.new-review {
  animation: highlightNew 2s ease-out;
}

@keyframes highlightNew {
  0% {
    background: rgba(255, 107, 53, 0.2);
    transform: scale(1.01);
  }
  100% {
    background: #f8f9fa;
    transform: scale(1);
  }
}

/* ========================================
   RELATED BOOKS SECTION
   ======================================== */

.related-books-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.related-books-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
}

.related-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.related-books-grid .book-card {
  max-width: 100%;
}

/* Mobile adjustments for review form */
@media (max-width: 600px) {
  .review-form .form-row {
    grid-template-columns: 1fr;
  }
  
  .add-review-section {
    padding: 1rem;
  }
  
  .star-btn {
    font-size: 1.5rem;
  }
  
  .related-books-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .related-books-title {
    font-size: 1.25rem;
  }
}

/* ========================================
   LEGAL PAGES (Terms & Privacy)
   ======================================== */

.legal-page {
  padding: 0;
  margin: 0;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.legal-content {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.legal-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.legal-updated {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1rem;
  margin-top: 0;
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
}

.legal-section p {
  color: #444;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-section ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-section li {
  color: #444;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.legal-section a {
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-info-box {
  background: #f8f9fa;
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

.legal-info-box p {
  margin-bottom: 0.25rem;
}

.legal-info-box p:last-child {
  margin-bottom: 0;
}

/* GDPR Rights list styling */
.rights-list {
  margin: 1rem 0;
  padding-left: 0;
  list-style: none;
}

.rights-list li {
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.right-name {
  font-weight: 600;
  color: var(--color-dark);
}

/* Copyright section at bottom of legal pages */
.legal-copyright {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.legal-copyright p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}


/* Mobile adjustments for legal pages */
@media (max-width: 768px) {
  .legal-container {
    padding: 1rem;
  }
  
  .legal-content {
    padding: 1.5rem;
    border-radius: 8px;
  }
  
  .legal-content h1 {
    font-size: 1.5rem;
  }
  
  .legal-section h2 {
    font-size: 1.15rem;
  }
}

/* ========================================
   CRO ENHANCEMENTS
   ======================================== */

/* --- Social Proof Bar (Homepage) --- */
.social-proof-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.95rem;
  font-weight: 600;
}

.proof-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

#proof-rating svg {
  color: #f5a623;
}

/* --- Level Test CTA (Homepage) --- */
.level-test-cta {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: #777;
}

.level-test-cta a {
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.35rem;
}

.level-test-cta a:hover {
  text-decoration: underline;
}

/* --- Trust Signals (Book Page) --- */
.trust-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.trust-item svg {
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, 0.9);
}

/* Book Guarantee Box */
.book-guarantee-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.book-guarantee-box .guarantee-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.book-guarantee-box strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.book-guarantee-box span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Sticky Mobile Purchase CTA --- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: white;
  border-top: 1px solid #e0e0e0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

.sticky-cta-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
}

.sticky-cta-btn {
  background: var(--page-level-color, var(--color-primary));
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.sticky-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(110%);
  text-decoration: none;
  color: white;
}

/* On desktop, anchor sticky CTA to bottom-right as a compact bar */
@media (min-width: 769px) {
  .sticky-cta {
    left: auto;
    right: 2rem;
    bottom: 1.5rem;
    width: auto;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    padding: 0.6rem 1rem 0.6rem 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  }
}

/* Add bottom padding to book page body when sticky is visible */
.book-page {
  padding-bottom: 0;
}

@media (max-width: 768px) {
  .book-page .site-footer {
    padding-bottom: 5rem;
  }
}

/* --- Sort Control (Books Page) --- */
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-control label {
  font-size: 0.85rem;
  color: #777;
  white-space: nowrap;
  font-weight: 600;
}

.sort-control select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  background: white;
  color: var(--color-dark);
  cursor: pointer;
}

.sort-control select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* --- Review Form Toggle --- */
.review-toggle-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.btn-toggle-review {
  background: transparent;
  color: var(--page-level-color, var(--color-primary));
  border: 2px solid var(--page-level-color, var(--color-primary));
  padding: 0.65rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-toggle-review:hover {
  background: var(--page-level-color, var(--color-primary));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-toggle-review.active {
  background: transparent;
  color: #999;
  border-color: #ccc;
}

.btn-toggle-review.active:hover {
  background: #f0f0f0;
  color: #666;
  box-shadow: none;
}

.review-form-wrapper {
  animation: fadeSlideDown 0.3s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


@media (max-width: 480px) {
  .social-proof-bar {
    gap: 1rem;
  }

  .proof-item {
    font-size: 0.85rem;
  }

  .trust-signals {
    flex-direction: column;
    gap: 0.5rem;
  }

  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-control {
    justify-content: flex-end;
  }
}

/* ========================================
   TESTIMONIALS SECTION (Homepage)
   ======================================== */

.testimonials-section {
  padding: 3.5rem 1.5rem 3rem;
  background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 100%);
  overflow: hidden;
}

.testimonials-header {
  text-align: center;
  margin-bottom: 2rem;
}

.testimonials-header .section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary, #2c3e50);
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.testimonials-stars {
  color: #f5a623;
  font-size: 1.2rem;
  letter-spacing: 1px;
  line-height: 1;
}

.testimonials-carousel-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonials-section .section-container {
  overflow: hidden;
}

.testimonials-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
  max-width: 100%;
}

.testimonials-grid::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  flex: 0 0 280px;
  max-width: 280px;
  min-width: 0;
  box-sizing: border-box;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.2s;
}

.testimonial-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.testimonial-stars {
  color: #f5a623;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 0.93rem;
  line-height: 1.55;
  color: #333;
  margin: 0;
  font-style: italic;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testimonial-footer {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}

.testimonial-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: #222;
}

.testimonial-book {
  font-size: 0.8rem;
  text-decoration: none;
}

.testimonial-book:hover {
  text-decoration: underline;
}

.testimonial-book-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-meta {
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
}

/* Mobile: vertical layout, show 3, "show more" button */
@media (max-width: 767px) {
  .testimonials-grid {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .testimonial-card {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .testimonial-hidden-mobile {
    display: none;
  }

  .testimonials-carousel-wrapper .carousel-btn {
    display: none !important;
  }
}

.testimonials-show-more {
  display: none;
  margin: 1.25rem auto 0;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.testimonials-show-more:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 767px) {
  .testimonials-show-more {
    display: block;
  }
}

/* ============================================
   BLOG LISTING PAGE
   Colors: CEFR palette only + black/white/grey
   ============================================ */
.blog-page .blog-listing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.blog-hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.blog-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero p {
  font-size: 1.15rem;
  color: #666;
  margin: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  border-color: var(--color-level-b2);
}

.blog-card-body {
  padding: 1.75rem;
}

.blog-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-level-b2);
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  color: #1a1a1a;
}

.blog-card:hover .blog-card-title {
  color: var(--color-level-b2);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #888;
}

.blog-card-author {
  font-weight: 600;
  color: #555;
}

.blog-empty {
  text-align: center;
  grid-column: 1 / -1;
  padding: 3rem;
  color: #888;
  font-size: 1.1rem;
}

/* ============================================
   BLOG ARTICLE PAGE
   ============================================ */
.blog-article-page .breadcrumb {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
}

.blog-article-page .breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.blog-article-page .breadcrumb li + li::before {
  content: "›";
  margin-right: 0.25rem;
  color: #aaa;
}

.blog-article-page .breadcrumb a {
  color: var(--color-level-b2);
  text-decoration: none;
}

.blog-article-page .breadcrumb a:hover {
  text-decoration: underline;
}

.blog-article-page .breadcrumb li:last-child {
  color: #888;
}

.blog-article-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.blog-article {
  margin-top: 1.5rem;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.article-meta-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.article-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-level-b2);
  background: var(--color-level-a1-light);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

.article-reading-time {
  font-size: 0.8rem;
  color: #888;
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.article-excerpt {
  font-size: 1.15rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.article-author-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.author-title {
  font-size: 0.8rem;
  color: #888;
}

.article-dates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.8rem;
  color: #888;
}

.article-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #333;
}

.article-review-badge svg {
  color: #555;
  flex-shrink: 0;
}

/* Article Body Styles */
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.article-body h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
}

.article-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2rem 0 0.75rem;
}

.article-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body a {
  color: var(--color-level-b2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--color-level-c2);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--color-level-b2);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--color-level-a1-light);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #444;
}

.article-body blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.9rem;
  color: #888;
  font-weight: 600;
}

.article-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.article-body figure {
  margin: 2rem 0;
  text-align: center;
}

.article-body figcaption {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.5rem;
}

/* Article Lead */
.article-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #444;
  border-left: 4px solid var(--color-level-b2);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}

/* Table of Contents */
.table-of-contents {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.table-of-contents h2 {
  font-size: 1.1rem !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  color: #1a1a1a;
}

.table-of-contents ol {
  margin: 0 !important;
  padding-left: 1.25rem !important;
  counter-reset: toc;
}

.table-of-contents li {
  margin-bottom: 0.35rem !important;
  font-size: 0.95rem;
}

.table-of-contents a {
  color: var(--color-level-b2) !important;
  text-decoration: none !important;
}

.table-of-contents a:hover {
  text-decoration: underline !important;
}

/* Article Callout */
.article-callout {
  background: var(--color-level-a1-light);
  border: 1px solid var(--color-level-a1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.article-callout h4 {
  color: #333;
  margin: 0 0 0.75rem !important;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-callout p {
  margin: 0;
  color: #333;
}

/* CEFR Table */
.cefr-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.cefr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.cefr-table th {
  background: #1a1a1a;
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}

.cefr-table th:first-child {
  border-radius: 8px 0 0 0;
}

.cefr-table th:last-child {
  border-radius: 0 8px 0 0;
}

.cefr-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.cefr-table tbody tr:hover {
  background: var(--color-level-a1-light);
}

.cefr-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}

.cefr-a1 { background: var(--color-level-a1); color: #1a1a1a; }
.cefr-a2 { background: var(--color-level-a2); color: #1a1a1a; }
.cefr-b1 { background: var(--color-level-b1); color: white; }
.cefr-b2 { background: var(--color-level-b2); color: white; }
.cefr-c1 { background: var(--color-level-c1); color: white; }
.cefr-c2 { background: var(--color-level-c2); color: white; }

/* Comparison Box */
.comparison-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.comparison-col {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.25rem;
}

.comparison-col h4 {
  margin: 0 0 0.75rem !important;
  color: #1a1a1a;
  font-size: 1rem;
}

.comparison-col ul {
  margin: 0 !important;
  padding-left: 1.25rem !important;
}

/* Roadmap List */
.roadmap-list {
  counter-reset: roadmap;
  list-style: none;
  padding: 0 !important;
}

.roadmap-list > li {
  counter-increment: roadmap;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem !important;
}

.roadmap-list > li::before {
  content: counter(roadmap);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roadmap-list h4 {
  margin: 0 0 0.25rem !important;
}

.roadmap-list p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

/* CTA Box */
.cta-box {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  margin: 2.5rem 0;
}

.cta-box h3 {
  color: #fff !important;
  font-size: 1.5rem;
  margin: 0 0 0.75rem !important;
}

.cta-box p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--color-level-b2);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.cta-button:hover {
  background: var(--color-level-c2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(234,113,49,0.4);
}

/* FAQ */
.faq-list {
  margin: 1.5rem 0;
}

.faq-item {
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-item h3 {
  font-size: 1.05rem !important;
  margin: 0 !important;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  cursor: default;
}

.faq-item div[itemprop="acceptedAnswer"] {
  padding: 0 1.25rem 1rem;
}

.faq-item p {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: #555;
}

/* Sources */
.article-sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.article-sources h2 {
  font-size: 1.25rem !important;
  margin: 0 0 1rem !important;
}

.sources-list {
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

.sources-list li {
  margin-bottom: 0.5rem;
}

.sources-list em {
  color: #333;
}

/* Author Bio Box */
.author-bio-box {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2.5rem;
}

.author-bio-box h3 {
  font-size: 1rem;
  margin: 0 0 1rem;
  color: #1a1a1a;
}

.author-bio-content {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-bio-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-bio-content strong {
  display: block;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 0.35rem;
}

.author-bio-content p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* Article Footer */
.article-footer {
  margin-top: 2rem;
}

/* Video Embed */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Site Footer */
.site-footer {
  background: #1a1a1a;
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-level-a2);
}

.footer-copy {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  margin: 0;
}

/* Blog responsive */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-author-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-dates {
    align-items: flex-start;
  }

  .comparison-box {
    grid-template-columns: 1fr;
  }

  .roadmap-list > li {
    padding-left: 2.5rem;
  }

  .cta-box {
    padding: 1.5rem;
  }

  .author-bio-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }
}

/* ============================================================
   PREVIEW BUTTONS (PDF + EPUB)
   ============================================================ */

.preview-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.preview-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  border: 2px solid var(--page-level-color, var(--color-primary));
  font-family: inherit;
}

.preview-btn-pdf {
  background: #fff;
  color: var(--page-level-color, var(--color-primary));
}

.preview-btn-pdf:hover {
  background: var(--page-level-color, var(--color-primary));
  color: #fff;
}

.preview-btn-epub {
  background: var(--page-level-color, var(--color-primary));
  color: #fff;
}

.preview-btn-epub:hover {
  opacity: 0.85;
}

/* ============================================================
   SHOPPING CART — Icon, Badge, Drawer
   ============================================================ */

/* Cart icon button in header */
.cart-icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  color: var(--color-dark);
  transition: transform 0.15s, opacity 0.15s;
}
.cart-icon-btn:hover { opacity: 0.7; }
.cart-icon-btn:active { transform: scale(0.92); }

.cart-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(234, 113, 49, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-badge.pop {
  animation: badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badge-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Cart overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Cart drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  height: 100dvh;
  background: #fafafa;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.cart-drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-drawer-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  background: #f0f0f0;
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
}
.cart-drawer-close {
  background: #333;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.cart-drawer-close::before,
.cart-drawer-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
}
.cart-drawer-close::before { transform: rotate(45deg); }
.cart-drawer-close::after  { transform: rotate(-45deg); }
.cart-drawer-close:hover {
  background: #111;
}
.cart-drawer-close:active {
  transform: scale(0.92);
}

/* Cart items list */
.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem;
}

.cart-empty-state {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}
.cart-empty-state svg {
  color: #d0d0d0;
  margin-bottom: 1rem;
}
.cart-empty-state p {
  color: #999;
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}
.cart-empty-browse {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  background: #1a1a2e;
  color: #fff;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.cart-empty-browse:hover { background: #2d2d5e; }

.cart-drawer-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eee;
  transition: box-shadow 0.2s;
}
.cart-drawer-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cart-item-cover {
  width: 50px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
.cart-item-cover-placeholder {
  width: 50px;
  height: 66px;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.cart-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-meta {
  font-size: 0.68rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.cart-item-format-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ccc;
}
.cart-item-format-dot.ebook { background: #5b9bd5; }
.cart-item-format-dot.physical { background: #e8a54b; }
.cart-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-dark);
}

.cart-item-remove {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.cart-item-remove:hover {
  background: #fdf2f2;
  color: #e74c3c;
}
.cart-item-remove svg {
  width: 14px;
  height: 14px;
}

/* Cart footer */
.cart-drawer-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 1rem 1.35rem 1.35rem;
}
.cart-drawer-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}
.cart-drawer-subtotal-label {
  font-size: 0.82rem;
  color: #888;
}
.cart-drawer-subtotal-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
}
.cart-drawer-shipping-note {
  font-size: 0.72rem;
  color: #aaa;
  margin-bottom: 1rem;
  display: block;
}

.cart-gratis-hint {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #666;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  background: #faf8f5;
  border-radius: 8px;
  border: 1px solid rgba(234, 113, 49, 0.2);
}

.cart-drawer-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.9rem;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.cart-drawer-checkout-btn:hover { background: #2d2d5e; }
.cart-drawer-checkout-btn:active { transform: scale(0.98); }
.cart-drawer-checkout-btn svg {
  width: 16px;
  height: 16px;
}
.cart-drawer-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.65rem;
}
.cart-drawer-secure svg {
  width: 12px;
  height: 12px;
}

/* "Add to Cart" button on book detail page — secondary CTA (outline) */
.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.add-to-cart-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}
.add-to-cart-btn:active { transform: scale(0.97); }
.add-to-cart-btn svg { stroke: #fff; }
/* In-cart: soft tint of this book's CEFR color (not loud green) */
.add-to-cart-btn.in-cart {
  background: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 26%, white);
  border-color: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 48%, white);
  color: var(--page-level-color, var(--color-primary));
  cursor: default;
}
.add-to-cart-btn.in-cart:hover {
  background: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 26%, white);
  border-color: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 48%, white);
  color: var(--page-level-color, var(--color-primary));
}
.add-to-cart-btn.in-cart svg {
  stroke: var(--page-level-color, var(--color-primary));
}
.add-to-cart-btn.adding {
  animation: cart-btn-flash 0.5s ease;
}
@keyframes cart-btn-flash {
  0% { transform: scale(1); }
  25% { transform: scale(0.95); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.add-to-cart-section {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Book page: inherit level color for outline */
.book-page .add-to-cart-btn {
  background: transparent;
}
.book-page .add-to-cart-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  filter: none;
}

/* Format cards: white background — use accent color for add-to-cart (not white) */
.book-page .format-card .add-to-cart-btn {
  color: var(--page-level-color, var(--color-primary));
  border-color: var(--page-level-color, var(--color-primary));
}
.book-page .format-card .add-to-cart-btn:hover {
  background: var(--page-level-color, var(--color-primary));
  color: white;
  border-color: var(--page-level-color, var(--color-primary));
}
.book-page .format-card .add-to-cart-btn svg {
  stroke: var(--page-level-color, var(--color-primary));
}
.book-page .format-card .add-to-cart-btn:hover svg {
  stroke: white;
}
.book-page .format-card .add-to-cart-btn.in-cart {
  background: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 26%, white);
  border-color: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 48%, white);
  color: var(--page-level-color, var(--color-primary));
}
.book-page .format-card .add-to-cart-btn.in-cart:hover {
  background: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 26%, white);
  border-color: color-mix(in srgb, var(--page-level-color, var(--color-primary)) 48%, white);
  color: var(--page-level-color, var(--color-primary));
}
.book-page .format-card .add-to-cart-btn.in-cart svg {
  stroke: var(--page-level-color, var(--color-primary));
}

/* ── Cart toast notification ─────────────────────────── */
.cart-toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: bottom 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: 460px;
  width: calc(100% - 2rem);
}
.cart-toast.visible {
  bottom: 1.25rem;
}
.cart-toast-text {
  flex: 1;
}
.cart-toast-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
.cart-toast-actions a,
.cart-toast-actions button {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: background 0.15s;
}
.cart-toast-view {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.cart-toast-view:hover {
  background: rgba(255, 255, 255, 0.25);
}
.cart-toast-checkout {
  background: #27ae60;
  color: #fff;
}
.cart-toast-checkout:hover {
  background: #2ecc71;
}

@media (max-width: 768px) {
  .cart-drawer { width: min(88vw, 400px); max-width: 400px; }
  .cart-icon-btn { order: 2; }
}

/* ── Gratis (free) book — cart item badge ────────────────────────────── */
.cart-item-gratis {
  background: linear-gradient(135deg, rgba(234,113,49,0.07), rgba(255,186,31,0.04));
  border: 1px solid rgba(234,113,49,0.2);
  border-radius: 10px;
  padding: 0.5rem;
}
.cart-item-free-badge {
  color: var(--color-primary, #ea7131) !important;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Gratis toast ────────────────────────────────────────────────────── */
.gratis-toast {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-dark, #1a1a1a);
  color: #fff;
  padding: 1.1rem 1.3rem 1rem;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(234,113,49,0.25),
    0 12px 40px rgba(0,0,0,0.35);
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 500px;
  width: calc(100% - 2rem);
  transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gratis-toast.visible { bottom: 1.5rem; }

.gratis-toast-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--gradient-brand, linear-gradient(135deg,#ffba1f,#ea7131,#e54d54));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  animation: gratis-pulse 1.5s ease-in-out 2;
}
@keyframes gratis-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.gratis-toast-body {
  flex: 1; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0;
}
.gratis-toast-headline {
  font-size: 1rem; font-weight: 700;
  color: var(--color-level-a2, #ffba1f);
}
.gratis-toast-sub {
  font-size: 0.82rem; color: rgba(255,255,255,0.75); line-height: 1.45;
}
.gratis-toast-reason {
  font-size: 0.75rem; color: rgba(255,255,255,0.45); font-style: italic;
  margin-top: 0.15rem;
}
.gratis-toast-month {
  font-size: 0.72rem; color: var(--color-level-b1, #f7a05e);
  margin-top: 0.25rem; font-weight: 600;
}

.gratis-toast-btn {
  flex-shrink: 0; align-self: center;
  padding: 0.55rem 1.1rem; border-radius: 10px;
  background: var(--color-primary, #ea7131);
  color: #fff; font-weight: 700; font-size: 0.82rem;
  border: none; cursor: pointer; font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gratis-toast-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(234,113,49,0.4);
}
.gratis-toast-close {
  position: absolute; top: 0.4rem; right: 0.55rem;
  background: none; border: none;
  color: rgba(255,255,255,0.35); font-size: 1.2rem;
  cursor: pointer; padding: 0.2rem; line-height: 1;
}
.gratis-toast-close:hover { color: rgba(255,255,255,0.8); }

@media (max-width: 480px) {
  .gratis-toast { flex-wrap: wrap; gap: 0.6rem; padding: 0.9rem 1rem; }
  .gratis-toast-btn { width: 100%; text-align: center; }
}

/* ── Gratis email capture overlay ────────────────────────────────────── */
.gratis-email-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
  z-index: 10002;
  display: flex; align-items: center; justify-content: center;
  animation: gratis-fade-in 0.25s ease;
}
@keyframes gratis-fade-in { from { opacity: 0; } to { opacity: 1; } }

.gratis-email-card {
  background: #fff; border-radius: 16px;
  padding: 2rem 1.75rem; max-width: 400px; width: calc(100% - 2rem);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center; position: relative;
}
.gratis-email-close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  background: none; border: none; font-size: 1.4rem;
  color: #aaa; cursor: pointer; line-height: 1;
}
.gratis-email-close:hover { color: #333; }

.gratis-email-icon {
  width: 56px; height: 56px; margin: 0 auto 0.75rem;
  background: var(--gradient-brand, linear-gradient(135deg,#ffba1f,#ea7131,#e54d54));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.gratis-email-headline {
  font-size: 1.15rem; font-weight: 700;
  color: var(--color-dark, #1a1a1a); margin: 0 0 0.35rem;
}
.gratis-email-sub {
  font-size: 0.88rem; color: #666; margin: 0 0 1.25rem; line-height: 1.5;
}
.gratis-email-form {
  display: flex; gap: 0.5rem;
}
.gratis-email-input {
  flex: 1; padding: 0.65rem 0.85rem; border: 1.5px solid #ddd;
  border-radius: 10px; font-size: 0.9rem; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.gratis-email-input:focus { border-color: var(--color-primary, #ea7131); }
.gratis-email-btn {
  padding: 0.65rem 1.1rem; border: none; border-radius: 10px;
  background: var(--color-primary, #ea7131); color: #fff;
  font-weight: 700; font-size: 0.85rem; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: background 0.15s;
}
.gratis-email-btn:hover { background: var(--color-level-b2, #ea7131); filter: brightness(1.08); }
.gratis-email-success {
  color: var(--color-primary, #ea7131); font-weight: 700;
  font-size: 1rem; margin: 0.5rem 0 0;
}
@media (max-width: 480px) {
  .gratis-email-form { flex-direction: column; }
  .gratis-email-btn { width: 100%; }
}

/* ── Gratis cross-sell on thank-you page ─────────────────────────────── */
.gratis-cross-sell {
  text-align: center; margin: 1.5rem auto; max-width: 420px;
  padding: 1.25rem; background: #fff;
  border: 1.5px solid rgba(234,113,49,0.15); border-radius: 12px;
}
.gratis-cross-sell h3 {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #999; margin: 0 0 0.85rem;
}
.gratis-cross-sell-btn {
  display: inline-block; padding: 0.6rem 1.3rem;
  background: var(--color-primary, #ea7131); color: #fff;
  border-radius: 10px; text-decoration: none;
  font-weight: 700; font-size: 0.88rem;
  transition: background 0.15s, transform 0.15s;
}
.gratis-cross-sell-btn:hover {
  filter: brightness(1.08); transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   URGENCY, SCARCITY & SOCIAL PROOF — Page-Specific Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Stock Urgency (inside buy-direct-card) ───────────────────────────── */
.stock-urgency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.stock-urgency.stock-critical {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}
.stock-urgency.stock-low {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  color: #b45309;
}
.stock-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Live Viewers Bar (below breadcrumb) ───────────────────────────────── */
.live-viewers-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.84rem;
  color: #713f12;
}
.live-viewers-bar strong {
  color: #92400e;
  font-weight: 700;
  font-size: 0.95rem;
}
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .live-viewers-bar {
    font-size: 0.78rem;
    padding: 0.45rem 0.75rem;
  }
}

/* ── Shipping Urgency Countdown ───────────────────────────────────────── */
.shipping-urgency {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: #f0f9ff;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #1e40af;
  margin: 0.75rem 0;
  line-height: 1.4;
}
.shipping-urgency svg {
  flex-shrink: 0;
  color: #3b82f6;
}

/* ── Pentecost Promise (enhanced guarantee) ───────────────────────────── */
.pentecost-promise {
  border-width: 2px !important;
  border-color: #22c55e !important;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5) !important;
}
.pentecost-promise .guarantee-icon {
  font-size: 1.5rem;
}
.pentecost-promise strong {
  font-size: 0.92rem !important;
  color: #15803d !important;
}
.pentecost-promise span {
  color: #1a5c35 !important;
}

/* ── Book Card Urgency Badges ─────────────────────────────────────────── */
.book-urgency-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 2;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.badge-low-stock {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}
.badge-bestseller {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1a2e;
}
.badge-hot {
  background: #ff6b35;
  color: #fff;
}
.badge-new {
  background: #22c55e;
  color: #fff;
}
.badge-top-rated {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
}

/* ── Checkout Urgency ─────────────────────────────────────────────────── */
.checkout-stock-warning {
  padding: 0.55rem 0.85rem;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #991b1b;
  margin-bottom: 0.75rem;
  font-weight: 500;
  text-align: center;
}
.checkout-shipping {
  margin-bottom: 0.75rem;
}
