/* ==========================================================================
   PRODUCTS PAGE
   ========================================================================== */

/* ---- Hero ---- */
.products-hero { background: var(--color-white); padding: 90px 0 60px; }
.products-hero__eyebrow .eyebrow__dot { border-radius: 2px; }
.products-hero__title { margin: 30px 0 20px; }
.products-hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-18);
  line-height: 30px;
  color: var(--color-text-secondary);
  margin: 0 0 40px;
  max-width: 720px;
}

.category-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: center;
  border-top: 1px solid var(--color-stroke);
  padding-top: 24px;
}
.category-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-14);
  color: var(--color-text);
  text-decoration: none;
  padding: 0 10px;
  white-space: nowrap;
}
.category-nav a:first-child { padding-left: 0; }
.category-nav a:not(:first-child) { border-left: 1px solid var(--color-stroke); }
.category-nav a:hover { color: var(--color-primary-green); }

/* ---- Category blocks ---- */
/* overflow: hidden clips each section's own bounds -- product cards get a
   translateY entrance animation from the site-wide scroll-reveal system,
   and without this the animating card can visually spill past the section
   edge into the block above/below while it's still moving into place. */
.category-block { padding: 40px 0; overflow: hidden; }
.category-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-stroke);
}
.category-block__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-24);
  color: var(--color-primary-green);
  margin: 0;
}
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-14);
  color: var(--color-text-secondary);
  text-decoration: none;
  flex-shrink: 0;
}
.view-all svg { width: 18px; height: 18px; }
.view-all:hover { color: var(--color-primary-green); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.category-card {
  position: relative;
  display: block;
  aspect-ratio: 318 / 400;
  background: #ededed;
  border-radius: 8px;
  overflow: hidden;
}
.category-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.category-card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.category-card__arrow svg { width: 20px; height: 20px; }
.category-card__arrow--prev { left: 6px; }
.category-card__arrow--next { right: 6px; }

/* "View all" expands its category grid in place -- chevron rotates to
   signal the open state. */
.view-all { cursor: pointer; }
.view-all svg { transition: transform .3s ease; }
.view-all[aria-expanded="true"] svg { transform: rotate(90deg); }

/* Per-card photo carousel: prev/next crossfade between a card's photos.
   A card wired up with only one photo (the common case until more photos
   exist per product) gets its arrows hidden entirely instead of showing
   controls that do nothing. */
.category-card__arrow { transition: opacity .2s ease, transform .2s ease; }
.category-card__arrow:hover { transform: translateY(-50%) scale(1.15); }
.category-card.is-single .category-card__arrow { display: none; }
.category-card img { transition: opacity .2s ease; }
.category-card img.is-fading { opacity: 0; }

/* Products beyond the first 4 in a category stay hidden until "View all"
   expands the grid -- none exist yet, so this is a no-op until some do. */
.category-card--extra { display: none; }
.category-grid.is-expanded .category-card--extra { display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-nav { gap: 4px 0; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .category-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
  .category-block__head { flex-wrap: wrap; gap: 12px; }
}
