/* ─── Homepage Category Carousel ─── */
.cat-carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE/Edge */
  gap: 12px;
  padding: 4px 0;
}
.cat-carousel-container::-webkit-scrollbar {
  display: none; /* WebKit/Chrome */
}
.cat-carousel-item {
  flex: 0 0 82px;
  width: 82px;
  max-width: 82px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .cat-carousel-item {
    flex: 0 0 96px;
    width: 96px;
    max-width: 96px;
  }
  .cat-carousel-container {
    gap: 18px;
  }
}
.cat-icon-wrapper {
  position: relative;
  border-radius: 50%;
  background-color: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #f8fafc, 0 0 0 3.5px var(--theme-secondary);
  width: 68px;
  height: 68px;
  overflow: hidden;
  transition: transform 0.3s;
}
@media (min-width: 1024px) {
  .cat-icon-wrapper {
    width: 78px;
    height: 78px;
    box-shadow: 0 0 0 2.5px #f8fafc, 0 0 0 4.5px var(--theme-secondary);
  }
}
.cat-carousel-item:hover .cat-icon-wrapper {
  transform: scale(1.05);
}
.cat-nav-fade-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 10;
  display: none; /* Controlled by JS */
  align-items: center;
  pointer-events: none;
}
.cat-nav-fade-left {
  left: 0;
  justify-content: flex-start;
}
.cat-nav-fade-right {
  right: 0;
  justify-content: flex-end;
}
.cat-nav-fade-btn {
  pointer-events: auto;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--theme-secondary);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: transform 0.15s;
  opacity: 0.85;
}
.cat-nav-fade-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}
.cat-title-text {
  font-size: 0.58rem;
  font-weight: 700;
  color: #1e293b !important; /* Force highly visible slate dark text */
  text-align: center;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  max-width: 80px;
  word-break: break-word;
  transition: color 0.2s;
}
.cat-carousel-item:hover .cat-title-text {
  color: var(--theme-secondary) !important;
}
.home-category-section {
  content-visibility: auto;
  contain-intrinsic-size: 780px;
}
