body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  background: #0f1419;
  color: #f7fafc;
  line-height: 1.6;
}

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

/* Navigation */
.navbar {
  background: #1a202c;
  border-bottom: 1px solid #2d3748;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

/* Hamburger Menu - Hidden by default */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #f7fafc;
  margin: 3px 0;
  transition: 0.3s;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

.nav-brand {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: "Georgia", serif;
}

.nav-brand a {
  color: #f7fafc;
  transition: color 0.2s ease;
}

.nav-brand a:hover {
  color: #60a5fa;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: #cbd5e0;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: #f7fafc;
  border-bottom-color: #60a5fa;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

header { padding: 40px 0 12px; text-align: center; }
header p { font-size: 1.3rem; color: #9ca3af; max-width: 700px; margin: 0 auto 16px; }
header p:first-child { font-size: 1.8rem; font-weight: 600; color: #f7fafc; }

section { margin-top: 56px; }
section h2 { font-size: 1.5rem; margin-bottom: 20px; font-weight: 500; }

/* Tighten spacing right after the hero header */
  header + section {
  margin-top: 16px;
}

.section-block {
  padding-top: 24px;
  border-top: 1px solid #4a5568;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}

.book-card {
  background: #1a202c;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.book-card:hover { transform: translateY(-3px); }

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #2d3748;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

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

.book-title { font-weight: 600; font-size: 0.98rem; }
.book-author { font-size: 0.88rem; color: #a0aec0; margin-top: 4px; }

.book-desc {
  font-size: 0.93rem;
  color: #e2e8f0; 
  margin-top: 8px;
  margin-bottom: 0;
  line-height: 1.4;   /* default is ~1.6 */
}


.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

.category-card {
  background: #1a202c;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  text-align: center;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.category-card:hover { transform: translateY(-3px); }

footer {
  margin-top: 40px;
  padding: 24px 0 30px 0;
  border-top: 1px solid #4a5568;
  background: #1a202c;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand h3 {
  font-family: "Georgia", serif;
  font-size: 1.3rem;
  margin: 0 0 8px 0;
  color: #f7fafc;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #a0aec0;
  margin: 0;
}

.footer-info {
  text-align: right;
}

.footer-info p {
  font-size: 0.85rem;
  color: #718096;
  margin: 4px 0;
}

.book-actions{
  margin-top: auto;     /* pushes Buy to the bottom */
  padding-top: 0px;
  padding-bottom: 2px;
  display: flex;
  justify-content: center; /* 👈 centers the button */
}

.buy-btn {
  display: inline-block;
  width: 80%;
  margin: 0 auto;  
  text-align: center;
  line-height: 1.2;    /* 👈 tighter text box */

  padding: 4px 5px;
  border-radius: 10px;

  background: #709d75;          /* strong button look */
  color: #fff;               /* white text */
  font-size: 0.9rem;
  font-weight: 600;

  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.1s ease;
}

.buy-btn:hover {
  background: #2d6434;
}

.buy-btn:active {
  transform: translateY(1px);
}


.buy-btn.disabled {
  background: #4a5568;
  color: #a0aec0;
  cursor: not-allowed;
}



.book-card{
  display: flex;
  flex-direction: column;
  height: 100%;

  padding: 14px 14px 20px;  /* 👈 add extra bottom padding */
}

.book-actions {
  margin-top: auto;
  padding-top: 8px;
  padding-bottom: 4px;   /* 👈 NEW: prevents overflow */
  display: flex;
  justify-content: center;
}



.book-card:hover {
  transform: translateY(-2px);
}



/* Responsive */
@media (max-width: 1200px) { .books-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  {
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 80px; }
  header { padding: 24px 0 12px; }
  section { margin-top: 28px; }
  .section-block { padding-top: 32px; }
  
  .navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: #1a202c;
    border-bottom: 1px solid #2d3748;
  }
  
  .nav-container {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    max-width: none;
  }
  
  /* Show hamburger menu on mobile */
  .hamburger {
    display: flex !important;
    order: 2;
  }
  
  .nav-brand {
    order: 1;
  }
  
  /* Hide nav links by default on mobile */
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #1a202c;
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-top: 1px solid #2d3748;
    order: 3;
  }
  
  /* Show nav links when menu is active */
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links a {
    font-size: 1rem;
    padding: 12px 24px;
    border-bottom: 1px solid #2d3748;
    display: block;
  }
  
  .nav-links a:last-child {
    border-bottom: none;
  }
  
  /* Add top padding to container to account for fixed navbar */
  .container {
    padding-top: 100px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  
  .footer-info {
    text-align: center;
  }
}

/* Subcategory grids (Kids / Teens) */
.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}

/* Subcategory title and description styling */
.subcategory-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 18px 0 8px;
  color: #f7fafc;
}

.subcategory-desc {
  font-size: 1rem;
  margin: 0 0 20px;
  color: #cbd5e0;
  line-height: 1.5;
  font-style: italic;
}

/* Kids/Teens subcategory section spacing */
.subcategory-section {
  margin-top: 48px;
  padding-top: 9px;
  border-top: none
}

/* Don't add divider above the first subcategory */
.subcategory-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 600px) {
  .subcategory-section {
    margin-top: 36px;
    padding-top: 24px;
  }
}

@media (max-width: 1200px) {
  .subcategory-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .subcategory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .subcategory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 40px;
  }
}

@media (max-width: 600px) {
  .buy-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

.site-logo {
  height: 48px;
  width: auto;
}
