/* =============================================
   CATEGORIES (Horizontal Scroll / Netflix Style — Portrait Cards)
   ============================================= */

.categories-section {
  padding-block: var(--space-10);
  background: var(--color-bg);
}

.categories-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory;
}

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

/* Netflix-style: tall, narrow, poster-shaped cards */
.category-chip {
  position: relative;
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  width: 140px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-bg-3), var(--color-bg-2));
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
  color: var(--color-text);
  scroll-snap-align: start;
}

.category-chip:hover,
.category-chip.active {
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-xl);
}

/* Gradient so the label stays legible over a photo */
.category-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
  pointer-events: none;
}

.category-chip:not(.has-image)::after {
  background: linear-gradient(to top, rgba(0,0,0,.25) 0%, transparent 60%);
}

.category-chip .cat-icon {
  position: absolute;
  top: var(--space-4);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 44px;
  line-height: 1;
  z-index: 1;
}

.category-chip .cat-label {
  position: relative;
  z-index: 1;
  padding: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  width: 100%;
}

.category-chip:not(.has-image) .cat-label {
  color: var(--color-text);
  text-shadow: none;
}

@media (max-width: 600px) {
  .category-chip {
    width: 112px;
  }
}
