/*
 * Alf Theme — Product Portfolio Explorer Section
 * Figma node: 830:2912
 *
 * White background section with product categories (red left border)
 * and 3-column flex-wrap product card grids.
 *
 * Product card (.pcard) styles are shared with products-platforms.css
 * via the universal .pcard class — do NOT redeclare them here.
 */

/* ═══════════════════════════════════════════════════════════════════
   SECTION
   ═══════════════════════════════════════════════════════════════════ */
.products-portfolio {
  background-color: #ffffff;
}

/* ── Section header (title + subtitle, max 896px) ──────────────── */
.products-portfolio__header {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: var(--header-max-width, 896px);
  margin-bottom: 48px;
}

.products-portfolio__title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-dark, #252525);
  margin: 0;
}

.products-portfolio__subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-dark, #252525);
  margin: 0;
}

/* ── Categories container ───────────────────────────────────────── */
.products-portfolio__categories {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ── Single category block ──────────────────────────────────────── */
.products-portfolio__category {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Category heading with 8px red left border ──────────────────── */
.products-portfolio__cat-header {
  border-left: 8px solid var(--color-primary, #cd261d);
  padding: 0 24px;
}

.products-portfolio__cat-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-dark, #252525);
  margin: 0;
}

/* ── Product card grid — strict 3-column CSS Grid ───────────────── */
.products-portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .products-portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .products-portfolio__title {
    font-size: 32px;
  }

  /* Switch from CSS Grid to horizontal-scroll flex row per Figma 837:1903 */
  .products-portfolio__grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding-bottom: 8px;
    /* scrollbar breathing room */
  }

  .products-portfolio__grid::-webkit-scrollbar {
    display: none;
  }

  /* Fixed 280px wide cards — Figma spec */
  .products-portfolio__grid .pcard {
    flex-shrink: 0;
    width: 280px;
  }
}