:root { 
  --card-radius: 10px; /* Border radius to 10px */
  --accent: #b62323; /* Red color for the border */
  --light-bg: #f0f0f0; /* Light background color for cards without images */
  --overlay-bg: rgba(0, 0, 0, 0.6); /* Darker overlay for text */
}

.wrap 
{
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}
  .grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center; /* center items horizontally */
  align-items: flex-start;
  padding: 0 12px; /* optional */
}

/* desktop and up: 4 per row */
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


#categoryThumbSection {
  display: none;
}


.wrap-thumb
{
      margin-top: 75px;
    padding: 0px 20px;
    margin-bottom: 75px;
}


  /* Mobile default */
.categoryThumbCard {
  width: calc(50% - 11px);   /* 2 cards per row */
  flex: 0 0 calc(50% - 11px);
  border-radius: 17px;
  overflow: hidden;
  background: var(--light-bg);
}

@media (min-width: 768px) {
  .categoryThumbCard {
    width: calc(33.33% - 15px);
    flex: 0 0 calc(33.33% - 15px);
  }
}

@media (min-width: 1024px) {
  .categoryThumbCard {
    width: 280px;
    flex: 0 0 280px;
  }
}

.categoryThumbCard a {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.categoryThumbCard .img {
  width: 100%;
  aspect-ratio: 4/4;
  overflow: hidden;
  position: relative;
  border-radius: 17px;
}

.categoryThumbCard .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay pinned to bottom with fade effect */
.categoryThumbCard .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  text-align: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 30%; /* Covers bottom 30% of the image */
  box-sizing: border-box;
}

.categoryThumbCard .overlay .title {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  line-height: 1.2;
}


.skeleton {
  animation: pulse 1.1s infinite ease-in-out;
  background: linear-gradient(90deg, #ececec, #f6f6f6, #ececec);
  background-size: 200% 100%;
}

@keyframes pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: #666;
}

.hdr {
  font-weight: 700;
  margin: 6px 0 18px 0;
  font-size: 24px;
}

/* Animated card entry */
.categoryThumbCard {
  opacity: 0;
  transform: translateY(60px) scale(0.97);
  transition: all 1.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: opacity, transform;
}

/* When visible */
.categoryThumbCard.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered delay */
.categoryThumbCard.visible {
  transition-delay: var(--delay, 0s);
}
