/* ── Page base ── */
.cookbooks-page {
  background-color: #FDFBD4;
  color: #1a1a1a;
  min-height: 100vh;
}

/* ── Navbar override (no bg image on this page) ── */
.cookbooks-page .navbar-logo {
  color: #2d7a2d;
}
.cookbooks-page .navbar-link {
  color: #1a1a1a;
}
.cookbooks-page .navbar-link--bordered {
  border-color: #2d7a2d;
  color: #2d7a2d;
}
.cookbooks-page .navbar-link--bordered:hover {
  background: #2d7a2d;
  color: #fff;
}
.cookbooks-page .navbar {
  top: 0;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background-color: #FDFBD4;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

/* ── Hero ── */
.cb-hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #FDFBD4 60%);
  padding: 5rem 2rem 3.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cb-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}
.cb-hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d7a2d;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
}
.cb-hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 0.8rem;
  letter-spacing: -1px;
  line-height: 1.1;
}
.cb-hero-sub {
  font-size: 1rem;
  color: #555;
  margin: 0 0 2rem;
  line-height: 1.6;
}

/* Search */
.cb-search-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #2d7a2d;
  border-radius: 50px;
  padding: 0.3rem 0.3rem 0.3rem 1.2rem;
  gap: 0.8rem;
  max-width: 560px;
  margin: 0 auto 1.8rem;
  box-shadow: 0 4px 20px rgba(45,122,45,0.1);
}
.cb-search-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cb-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  background: transparent;
  color: #1a1a1a;
}
.cb-search-input::placeholder {
  color: #aaa;
}
.cb-search-btn {
  background: #2d7a2d;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.65rem 1.4rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.cb-search-btn:hover {
  background: #1f5c1f;
}

/* Pills */
.cb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}
.cb-pill {
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 50px;
  padding: 0.4rem 1.1rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cb-pill:hover,
.cb-pill.active {
  background: #2d7a2d;
  border-color: #2d7a2d;
  color: #fff;
}

/* ── Filter bar ── */
.cb-filterbar {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 0.9rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.cb-filterbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cb-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cb-filter-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
.cb-select {
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  background: #fafafa;
  color: #1a1a1a;
  cursor: pointer;
  outline: none;
}
.cb-select:focus {
  border-color: #2d7a2d;
}
.cb-results-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: #888;
  font-weight: 500;
}

/* ── Main content ── */
.cb-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Section ── */
.cb-section {
  margin-bottom: 4rem;
}
.cb-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.8rem;
  gap: 1rem;
}
.cb-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 0.2rem;
  letter-spacing: -0.3px;
}
.cb-section-sub {
  font-size: 0.85rem;
  color: #777;
  margin: 0;
}
.cb-see-all {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2d7a2d;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid #2d7a2d;
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.cb-see-all:hover {
  opacity: 0.6;
}

/* ── Card grid ── */
.cb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* ── Card ── */
.cb-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.cb-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.12);
}
.cb-card-img {
  position: relative;
  height: 180px;
  background: #e8f5e9;
  overflow: hidden;
}
.cb-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cb-card:hover .cb-card-img img {
  transform: scale(1.05);
}

/* Badge */
.cb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #2d7a2d;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  letter-spacing: 0.3px;
}
.cb-badge--new {
  background: #e65100;
}

/* Card body */
.cb-card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.cb-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #2d7a2d;
  background: #e8f5e9;
  border-radius: 50px;
  padding: 0.15rem 0.6rem;
  width: fit-content;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.cb-tag--quick  { color: #e65100; background: #fff3e0; }
.cb-tag--protein{ color: #1a3fcc; background: #e8eaf6; }
.cb-tag--vegan  { color: #00897b; background: #e0f2f1; }
.cb-tag--budget { color: #7b1fa2; background: #f3e5f5; }

.cb-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}
.cb-card-author {
  font-size: 0.78rem;
  color: #888;
  margin: 0;
  font-weight: 500;
}
.cb-card-desc {
  font-size: 0.82rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
  flex: 1;
}
.cb-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cb-stars {
  font-size: 0.8rem;
  color: #f4a020;
  font-weight: 600;
}
.cb-stars span {
  color: #888;
  font-weight: 500;
  margin-left: 2px;
}

/* Level badge */
.cb-level-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 50px;
  text-transform: capitalize;
}
.cb-level-badge.beginner     { background: #e8f5e9; color: #2d7a2d; }
.cb-level-badge.intermediate { background: #fff3e0; color: #e65100; }
.cb-level-badge.advanced     { background: #fce4ec; color: #c62828; }

/* ── No results ── */
.cb-no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #888;
  font-size: 1rem;
}

/* ── Back to top ── */
.cb-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #2d7a2d;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45,122,45,0.3);
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}
.cb-back-top.visible {
  opacity: 1;
  pointer-events: all;
}
.cb-back-top:hover {
  background: #1f5c1f;
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .cb-hero-title { font-size: 2rem; }
  .cb-filterbar-inner { gap: 1rem; }
  .cb-results-count { margin-left: 0; }
  .cb-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .cb-card-img { height: 130px; }
  .cb-main { padding: 2rem 1rem 4rem; }
  .cb-hero { padding: 3rem 1rem 2.5rem; }
  .cookbooks-page .navbar { gap: 1rem; }
  .cookbooks-page .navbar-list { gap: 1rem; flex-wrap: wrap; }
}