/* ============================================================================
   SchoolNotes - site-v42-all-cats.css
   ----------------------------------------------------------------------------
   Styles for includes/home_categories_full.php - the homepage "All Products,
   Category-wise" section. Loaded last (after app.min.css/site-v10.css etc.)
   from includes/header.php, so it can safely reuse the existing --navy/
   --mustard/--paper/--card-shadow custom properties without redefining them.

   Layout: each category is its own horizontally-scrollable row (NOT a
   marquee/auto-scroll - this is a real product list, so the user drives the
   scrolling, exactly like a product carousel on any major shopping site).
   A left/right arrow pair appears on hover (desktop) or is always visible on
   touch; native scroll-snap makes dragging/swiping land cleanly on a card.
   ========================================================================== */

.all-cats-section { margin: 56px 0 10px; }
.all-cats-section .section-heading { margin-bottom: 6px; }

.cat-row { margin: 34px 0; }
.cat-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cat-row-head h3 {
  margin: 0;
  font-size: 1.12rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', Arial, sans-serif;
}
.cat-row-head h3 i { color: var(--mustard-dark); font-size: 1rem; }
.cat-row-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: 2px;
}
.cat-row-viewall {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.cat-row-viewall:hover { text-decoration: underline; }

.cat-row-scroller { position: relative; }
.cat-row-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 14px;
  scroll-behavior: smooth;
}
.cat-row-track::-webkit-scrollbar { display: none; }
.cat-row-track .product-card {
  flex: 0 0 240px;
  width: 240px;
  scroll-snap-align: start;
}

/* "View all N resources" card at the end of every row - always present so a
   visitor scrolling through a 141-item row has an obvious exit into the full
   filtered /section.php listing instead of scrolling forever. */
.cat-row-more {
  flex: 0 0 150px;
  width: 150px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: linear-gradient(160deg, var(--blue-tint), #fff);
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius-lg);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.3;
  padding: 16px;
  transition: transform .15s ease, background .15s ease;
}
.cat-row-more:hover { transform: translateY(-4px); background: linear-gradient(160deg, #fff, var(--blue-tint)); }
.cat-row-more-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Scroll arrows: hidden on touch (native swipe is enough), visible on
   pointer-capable screens, faded in on row hover/focus. */
.cat-row-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--paper-line);
  background: #fff;
  color: var(--navy);
  box-shadow: var(--card-shadow-lg);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity .15s ease, transform .12s ease;
}
.cat-row-scroller:hover .cat-row-arrow,
.cat-row-scroller:focus-within .cat-row-arrow { opacity: 1; }
.cat-row-arrow:hover { transform: translateY(-50%) scale(1.08); }
.cat-row-arrow-prev { left: -8px; }
.cat-row-arrow-next { right: -8px; }

@media (hover: hover) and (pointer: fine) {
  .cat-row-arrow { display: flex; }
}

@media (max-width: 640px) {
  .cat-row { margin: 26px 0; }
  .cat-row-track .product-card { flex-basis: 66%; max-width: 230px; }
  .cat-row-more { flex-basis: 120px; width: 120px; }
  .cat-row-head h3 { font-size: 1rem; }
}
