#aiTemplateGrid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 20px;
}

/* Category heading */
#aiTemplateGrid h2 {
  font-size: 22px;
  margin: 10px 0;
  text-transform: capitalize;
}

/* Grid layout */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  align-items: start;
}

/* Card */
.template-card {
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Image (fixes "massive images") */
.template-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

/* Title */
.template-card h3 {
  font-size: 15px;
  margin: 10px 10px 5px;
}

/* Description */
.template-card p {
  font-size: 13px;
  margin: 0 10px 10px;
  opacity: 0.7;
  line-height: 1.4;
}

/* Button */
.template-card a {
  margin: 10px;
  padding: 10px;
  text-align: center;
  background: #222222;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
}

.template-card a:hover {
  background: #333;
  color: #fff;
}

.template-image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #f5f5f5; /* fallback background */
}

.template-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#categoryFilter {
    width: 200px;
    margin-left: 40px;
}

select:focus {
    border-color: #484848 !important;
}