/* CATEGORY SECTION STYLING */
.section.category {
  padding: 60px 16px;
  background-color: #f4f4f4;
  font-family: 'Inter', sans-serif;
}

.section.category .container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Responsive Grid Layout */
.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0 auto;
}

/* Card Styling */
.category-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  cursor: pointer;
}

.category-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Image Container */
.category-banner {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.category-item:hover img {
  transform: scale(1.05);
}

/* Fade-in Animation */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CTA Button */
.btn.btn-secondary {
  display: block;
  margin: 16px auto 20px;
  padding: 10px 20px;
  background-color: #1a1a1a;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  text-align: center;
  text-transform: capitalize;
  transition: background-color 0.3s ease, transform 0.3s ease;
  width: fit-content;
}

.btn.btn-secondary:hover {
  background-color: #333333;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .category-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 columns */
    grid-auto-rows: 1fr;                    /* equal height rows */
    gap: 16px;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;  /* max width for mobile so it doesn't stretch too much */
  }

  .category-banner {
    width: 100%;
    aspect-ratio: 3 / 4;  /* keep images consistent */
    overflow: hidden;
    position: relative;
  }

  .category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }

  .category-item:hover img {
    transform: scale(1.05);
  }

  .btn.btn-secondary {
    display: block;
    margin: 12px auto 0;
    padding: 10px 20px;
    background-color: #1a1a1a;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    text-align: center;
    text-transform: capitalize;
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: fit-content;
  }

  .btn.btn-secondary:hover {
    background-color: #333;
    transform: translateY(-2px);
  }
}
