/* Single-row container for grid mode */
.hhd-cat-grid {
  display: flex;
  flex-wrap: nowrap;       /* no wrapping into a second row */
  gap: 10px;
  overflow: hidden;        /* hide any overflow (though grid count ≤ threshold) */
}

/* Single-row wrapper for carousel mode */
.hhd-cat-carousel .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
}

/* Fixed-size cards */
.hhd-cat-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;

  width: 220px;
  height: 140px;
  flex: 0 0 auto;
}

/* Image fills the card */
.hhd-cat-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* 1) Make the overlay cover the card, but don’t slide */
.hhd-cat-overlay {
  display: block !important;       /* ensure it’s visible */
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent !important; /* transparent—no dark bar */
  pointer-events: none;            /* so clicks go through */
  transform: none !important;      /* cancel any translateY */
}

/* 2) Center the title at all times */
.hhd-cat-title {
  position: absolute;
  top: 50%;
  left: 30px;	
  width: calc(100% - 60px);   /* full slide width minus 40px both sides */
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Kumbh Sans', sans-serif;
  text-align: center;
  text-transform: uppercase;	
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  pointer-events: auto;            /* allow hover on count below */
  box-sizing: border-box;
 /* multiline clamp to 3 lines then ellipsis if there's more */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;	
}

/* 3) Position the count at bottom-center, hidden initially */
.hhd-cat-count {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  pointer-events: auto;
}

/* 4) Fade the count in on hover */
.hhd-cat-item:hover .hhd-cat-count {
  opacity: 1;
}


/* 1) Give the carousel container extra bottom padding for the pagination */
.hhd-cat-carousel {
  overflow: hidden;       /* hide extra slides */
  position: relative;     /* for arrows/pagination */
  padding-bottom: 5px;   /* room for pagination */
}

/* 2) Move the pagination below the slides, centered */
.hhd-cat-carousel .swiper-pagination {
  position: absolute !important;
  bottom: 0px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: block !important;
  z-index: 5;
}

/* 3) Position prev/next buttons completely outside the card area */
.hhd-cat-carousel .swiper-button-prev,
.hhd-cat-carousel .swiper-button-next {
  opacity: 1 !important;
  visibility: visible !important;
  width: 20px !important;
  height: 50px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  color: #d00303 !important;
  z-index: 10;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.hhd-cat-carousel .swiper-button-prev {
  border-radius: 8px 0 0 8px !important; }

.hhd-cat-carousel .swiper-button-next {
	border-radius: 0 8px 8px 0 !important; }

/* Tweak their horizontal positions */
.hhd-cat-carousel .swiper-button-prev {
  left: 5px !important;   /* bump inside by 5px */
}
.hhd-cat-carousel .swiper-button-next {
  right: 5px !important;  /* bump inside by 5px */
}

/* Slightly larger dot spacing */
.hhd-cat-carousel .swiper-pagination-bullet {
  margin: 0 6px !important;
}

/* 4) Style the arrows for better visibility */
.hhd-cat-carousel .swiper-button-prev::after,
.hhd-cat-carousel .swiper-button-next::after {
  font-size: 16px;
  color: #d00303;
}