.categories {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 30px;
}

.categories-header {
  text-align: center;
  margin-bottom: 40px;
}

.categories-header span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #777;
}

.categories-header h2 {
  margin: 8px 0;
  font-size: 36px;
  font-weight: 600;
}

.categories-header p {
  color: #777;
  font-size: 15px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  background: #eee;
}

.category-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75),
    rgba(0, 0, 0, 0.05) 65%
  );
}

.category-overlay {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: #fff;
}

.category-overlay h3 {
  margin: 0 0 5px;
  font-size: 22px;
  font-weight: 600;
}

.category-overlay span {
  font-size: 13px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.category-card:hover img {
  transform: scale(1.07);
}

.category-card:hover .category-overlay span {
  opacity: 1;
}

/* Tablet */
@media (max-width: 1000px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-card {
    height: 280px;
  }
}

/* Mobile */
@media (max-width: 650px) {
  .categories {
    padding: 60px 20px;
  }

  .categories-header h2 {
    font-size: 28px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .category-card {
    height: 220px;
  }

  .category-overlay {
    left: 15px;
    right: 15px;
    bottom: 15px;
  }

  .category-overlay h3 {
    font-size: 18px;
  }
}
