/* Store — Categories */


/* ============================================
   CATEGORIES NAVIGATION - Premium Scrollable Pills
   ============================================ */
.categories-nav {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--space-4) var(--space-5);
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background: linear-gradient(180deg, var(--background-color) 0%, transparent 100%);
  margin: 0 -16px;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

/* Scroll fade indicators */
.categories-nav::before,
.categories-nav::after {
  content: '';
  position: sticky;
  top: 0;
  bottom: 0;
  width: 40px;
  flex-shrink: 0;
  pointer-events: none;
  z-index: var(--z-float);
}

.categories-nav::before {
  left: 0;
  background: linear-gradient(90deg, var(--background-color) 20%, transparent 100%);
  margin-right: -40px;
}

.categories-nav::after {
  right: 0;
  background: linear-gradient(-90deg, var(--background-color) 20%, transparent 100%);
  margin-left: -40px;
}

.category-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.category-btn i {
  font-size: var(--text-base);
  color: inherit;
  transition: var(--transition);
}

.category-btn:hover {
  background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-muted) 100%);
  color: var(--primary-color);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-btn:active {
  transform: translateY(0) scale(0.98);
  transition: transform 0.1s ease;
}

.category-btn.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px color-mix(in oklch, var(--primary-color) 35%, transparent);
  transform: translateY(-2px);
  font-weight: 700;
}

.category-btn.active i {
  color: white;
}

.category-btn.active:hover {
  opacity: 0.95;
  box-shadow: 0 6px 24px color-mix(in oklch, var(--primary-color) 40%, transparent);
}

/* Category count badge */
.category-btn .category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  min-width: 20px;
  height: 20px;
  margin-left: 2px;
}

.category-btn.active .category-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ============================================
   STICKY CATEGORY NAVIGATION - App Style
   ============================================ */
.categories-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: var(--space-3) var(--space-4);
  margin: 0 -24px;
  width: calc(100% + 48px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.categories-nav::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
}

.categories-nav.scrolled::before {
  opacity: 1;
}

/* Enhanced Category Buttons with Icons */
.category-btn {
  position: relative;
  min-width: max-content;
  padding: var(--space-3) var(--space-5);
  background: var(--background-white);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
}

.category-btn .category-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-color);
  font-size: var(--text-xs);
  transition: var(--transition);
}

.category-btn.active .category-icon {
  background: rgba(255, 255, 255, 0.3);
}

.category-btn .category-count {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  background: var(--background-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 700;
}

.category-btn.active .category-count {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}


/* ============================================
   PHASE 3 UX IMPROVEMENTS
   ============================================ */

/* 1. Sticky Categories at ALL breakpoints */
.categories-section {
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  background: var(--glass-bg, rgba(255, 255, 255, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}

.categories-section.scrolled {
  box-shadow: var(--shadow-md);
}

/* 2. Scroll-spy active state for category tabs */
.category-btn.scroll-active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: var(--shadow-primary);
}

/* 3. Category Section Headers */
.category-section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-6) 0 var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 2px solid var(--border-light, var(--border-light));
}

.category-section-header:first-child {
  padding-top: var(--space-4);
}

.category-section-header h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-color, #0f172a);
  margin: 0;
  line-height: var(--leading-snug);
}

.category-section-header .category-count {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted, var(--text-muted));
}

