:root {
  --scarlet: #8b0000;
  --gold: #c9a24d;
  --brown: #5a3b1e;
  --gray-light: #f4f4f4;
  --gray-medium: #cccccc;
  --white: #ffffff;
  --text: #222222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
}

/* ===== TOP BAR ===== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--scarlet);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.topbar img {
  height: 34px;
}

.topbar .donate {
  background: var(--gold);
  color: var(--brown);
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

/* ===== CAROUSEL ===== */

.carousel {
  position: relative;
  height: 420px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  cursor: pointer;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 26px;
  padding: 10px 14px;
  cursor: pointer;
}

.carousel .prev { left: 10px; }
.carousel .next { right: 10px; }

/* ===== SECTIONS ===== */

.section-title {
  padding: 30px 20px 10px;
  font-size: 22px;
  font-weight: 700;
}

/* ===== GRID ===== */

.grid {
  padding: 20px;
  display: grid;
  gap: 24px;
}

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

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

.book-item {
  background: var(--gray-light);
  padding: 18px;
  border-radius: 12px;
}

.book-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-medium);
}

.book-item h3 {
  margin: 12px 0 6px;
}

.book-item p {
  margin: 0 0 12px;
  color: #555;
}

.book-item a {
  text-decoration: none;
  color: var(--scarlet);
  font-weight: 600;
}

/* ===== PAGINATION ===== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 30px 0 60px;
}

.pagination button {
  background: var(--scarlet);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

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

.footer {
  margin-top: 60px;
  padding: 40px 20px;
  background: var(--gray-light);
  border-top: 1px solid var(--gray-medium);
  text-align: center;
  color: #555;
}

