#products {
  background-color: var(--gray);
  padding-block: 5rem 3.6rem;

  & .products-header {
    text-align: center;
    margin: 0 auto 4rem;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  margin: 0 auto;
}

@media (width <= 62.5rem) {
  .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  /* hover usa "translate" (e não transform): o transform fica livre para o parallax do GSAP */
  transition: translate .3s, box-shadow .3s;
}

.product-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0.1875rem;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform .4s;
}

.product-card:hover {
  /* !important: o GSAP escreve "translate: none" no elemento ao animar o transform */
  translate: 0 -4px !important;
  box-shadow: var(--shadow);
  border-color: rgba(240,120,32,.2);
}

.product-card:hover::before { 
  transform:scaleX(1); 
}

.product-icon {
  width: 3rem;
  height: 3rem;
  background: var(--navy);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.125rem;

  & svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: var(--white);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

.product-icon.orange { 
  background: var(--orange); 
}

.product-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.8rem;
}

.product-card p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.55;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  padding-top: 1.25rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--orange-txt);

  /* mesma seta dos botões, desenhada em SVG e pintada com a cor do texto */
  &::after {
    content: "";
    width: 1rem;
    height: 1rem;
    background-color: currentColor;
    -webkit-mask: var(--seta) center / contain no-repeat;
    mask: var(--seta) center / contain no-repeat;
    transition: transform .3s;
  }
}

.product-card:hover .product-link::after {
  transform: translateX(4px);
}

.product-cta {
  text-align: center;
  margin-top: 3rem;
}

@media (width <= 40rem) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
