/* Feeder Product Grid — labelled group of product cards. */

.feederproductgrid-block {
  background: var(--bellco-bg-alt);
  border-top: 1px solid var(--bellco-divider);
  padding: 128px 0 0;
}

/* A second instance under the same header: no border, no top padding, and it
   sits directly under the group above it. */
.feederproductgrid-block--continued {
  border-top: none;
  padding-top: 48px;
}

/* The last grid on the page needs the section's bottom padding back. */
.feederproductgrid-block:last-of-type,
.feederproductgrid-block--continued:last-of-type {
  padding-bottom: 128px;
}

.feederproductgrid-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.feederproductgrid-head .bellco-sechead {
  margin-bottom: 64px;
}

.feederproductgrid-viewall {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 68px;
  font-family: var(--font1);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 242, 240, 0.5);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.feederproductgrid-viewall:hover {
  color: #ffffff;
}

/* ── Group label ── */

.feederproductgrid-grouplabel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.feederproductgrid-grouplabel-rule {
  width: 32px;
  height: 1px;
  background: rgba(139, 217, 186, 0.4);
  flex-shrink: 0;
}

.feederproductgrid-grouplabel-text {
  font-family: var(--font1);
  font-size: var(--bellco-micro);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bellco-mint);
  white-space: nowrap;
}

.feederproductgrid-grouplabel-line {
  flex: 1;
  height: 1px;
  background: var(--bellco-hairline);
}

/* ── Cards ── */

.feederproductgrid-grid {
  display: grid;
  gap: var(--bellco-gap);
}

.feederproductgrid-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.feederproductgrid-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.feederproductgrid-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.feederproductgrid-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }

/*
 * A column, not a block. The grid stretches every card to the tallest in the
 * row, but a `display: block` card just stacks its content from the top -- so
 * a two-line title or a three-line description pushed "Learn more" down and
 * the row's CTAs stepped across three different baselines. As a flex column
 * with the body growing into the spare height, the CTA can be pinned to the
 * bottom and every card in the row agrees on where it sits.
 */
.feederproductgrid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bellco-bg-card);
  border: 1px solid var(--bellco-hairline);
  border-radius: var(--bellco-radius);
  text-decoration: none;
}

a.feederproductgrid-card {
  cursor: pointer;
}

.feederproductgrid-media {
  display: block;
  flex-shrink: 0;
  height: 240px;
  overflow: hidden;
  background: var(--bellco-bg-card);
}

.feederproductgrid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.feederproductgrid-card:hover .feederproductgrid-img {
  transform: scale(1.05);
}

.feederproductgrid-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 24px;
}

/*
 * The chip wraps under the title rather than being clipped by it.
 *
 * The row is title + chip with `space-between`, and the chip is
 * `flex-shrink: 0` -- so once the two together outgrow the card the chip is
 * pushed past the card's right edge and the card's own `overflow: hidden`
 * cuts it off. On the 5-up accessories row that meant "TRANS…", "PRE…",
 * "NOISE…" and no chip at all on Manufactured Parts anywhere from 1200 to
 * about 1400. It was already happening at 10px; putting the type up to the
 * 12px floor widened every chip by ~20px and made it reach further.
 *
 * `flex-wrap` costs nothing where the two fit -- they stay on one line, title
 * left, chip right -- and drops the chip onto its own line where they do not.
 */
.feederproductgrid-titlerow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feederproductgrid-title {
  font-family: var(--font1);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  color: #ffffff;
}

.feederproductgrid-tag {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 3px 8px;
  font-family: var(--font1);
  font-size: var(--bellco-micro);
  /* Tracking trimmed with the size bump: at 12px the old 0.12em pushed the
     chip wide enough to squeeze the title beside it on a 5-up row. */
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--bellco-mint);
  border: 1px solid rgba(139, 217, 186, 0.35);
}

.feederproductgrid-desc {
  display: block;
  font-family: var(--font1);
  font-size: 16px;
  line-height: 1.5;
  color: var(--bellco-dim);
  margin-bottom: 20px;
}

.feederproductgrid-more {
  /* Takes the card's spare height, which is what lands every CTA in the row
     on one baseline. The description's own margin-bottom stays the minimum
     gap for the card that happens to be the tallest. */
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font1);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bellco-mint);
  transition: gap 0.2s;
}

.feederproductgrid-card:hover .feederproductgrid-more {
  gap: 10px;
}

.feederproductgrid-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bellco-mint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feederproductgrid-card:hover .feederproductgrid-underline {
  transform: scaleX(1);
}

/*
 * 1200-1365 is the only band that runs five cards across a container narrower
 * than ~1270, which leaves each card about 170-205px of content. At 20px,
 * "MANUFACTURED" alone measures 175px and clips. Below 1200 the grid drops to
 * two columns and the cards are wide again, so the step is bounded on both
 * sides rather than left to cascade down.
 */
@media (min-width: 1200px) and (max-width: 1365px) {
  .feederproductgrid-grid[data-columns="5"] .feederproductgrid-title {
    font-size: 17px;
    letter-spacing: 0;
  }
}

@media (max-width: 1199px) {
  .feederproductgrid-block {
    padding-top: 88px;
  }

  .feederproductgrid-block:last-of-type {
    padding-bottom: 88px;
  }

  .feederproductgrid-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .feederproductgrid-head .bellco-sechead {
    margin-bottom: 20px;
  }

  .feederproductgrid-viewall {
    margin-bottom: 48px;
  }

  .feederproductgrid-grid[data-columns="3"],
  .feederproductgrid-grid[data-columns="4"],
  .feederproductgrid-grid[data-columns="5"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .feederproductgrid-block {
    padding-top: 64px;
  }

  .feederproductgrid-block:last-of-type {
    padding-bottom: 64px;
  }

  .feederproductgrid-grid,
  .feederproductgrid-grid[data-columns="2"],
  .feederproductgrid-grid[data-columns="3"],
  .feederproductgrid-grid[data-columns="4"],
  .feederproductgrid-grid[data-columns="5"] {
    grid-template-columns: 1fr;
  }

  .feederproductgrid-media {
    height: 200px;
  }
}
