.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  padding: 40px;
  background: #f3f4f6;
}

.card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 1px solid #d9d9d9;
}

.card:hover {
  transform: translateY(-6px);
  border: 1px solid #d9d9d9;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.card:hover .title {
  color: #6c63ff;

}

.imageWrapper {
  position: relative;
  height: 220px;
  background: #fff;
  overflow: hidden;
}

.image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.card:hover .image {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #6c63ff;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.stackCount {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #3f3f46;
  color: white;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .overlay {
  opacity: 1;
}

.viewButton {
  background: white;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #181818;
}

.viewButton:hover {
  background: #6c63ff;
  color: white;
}

.content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.metaRow {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #4b5563;
}

.tag {
  background: #e5e7eb;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  width: fit-content;
}

.footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f1f1;
}
