.category-nav {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0.6rem 0.5rem; /*0.75rem 0.5rem; */
  z-index: 998;
  transition: all 0.3s ease;
}

/* Sticky state */
.category-nav.sticky {
  position: fixed;
  top: 70px; /* match header height */
  left: 0;
  right: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Links */
.category-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  background-color: #800020;
  padding: 2px 12px;/*8px 14px; */
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.category-nav a.active {
  background-color: #a8324b;
  transform: scale(1.05);
  box-shadow: 0 0 6px rgba(168, 50, 75, 0.3);
}

.category-nav a:hover {
  background-color: #a8324b;
  transform: scale(1.03);
}

/* Mobile scrollable */
@media (max-width: 768px) {
  .category-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .category-nav::-webkit-scrollbar { display: none; }
  .category-nav.sticky { top: 80px; }
}

/* Smooth layout shift fix */
main {
  transition: padding-top 0.3s ease;
}
