/* Overlay container */
#categoryOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #f5f1e6, #e7efe9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

/* Title */
#categoryOverlay h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #333;
  text-align: center;
}

.category-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Each Category Card */
.category-block {
  background: #faf4ec;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  width: 330px;
  height: 440px;
  text-align: center;
  text-decoration: none;
  color: #111;
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  flex-shrink: 0;
  
}

.category-block img {
  width: 100%;
  height: 70%;
  object-fit: contain;
  border-radius: 5px;
}

/* Text inside card */
.category-block h3 {
  margin-top: 1rem;
  font-size: 1.4rem;
}

.category-block:hover {
  background: #f5eada;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Responsive grid */
#categoryOverlay .category-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.overlay-intro {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  font-size: 1rem;
  color: #333;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}


/* Stack cards on small screens */
@media (max-width: 768px) {
  .category-block {
    width: 90%;
    height: auto;
  }

  .category-block img {
    height: auto;
  }

  .overlay-intro {
    font-size: 0.95rem;
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .overlay-intro {
    font-size: 0.95rem;
    padding: 1rem;
  }
}

body, html {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f0e7db, #dbe9e4);
  background-attachment: fixed;
  background-size: cover;
  color: #222;
}