/* Cinco productos con el mismo peso visual y espacio para títulos completos. */
.product-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.product-grid > .product-card {
  grid-column: span 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.product-card h3 {
  font-size: 1.05rem;
  line-height: 1.45;
  min-height: 2.9em;
}
.product-card p {
  min-height: 0;
  flex: 1;
}
.product-card .text-link {
  gap: 10px;
}
/* La última publicación conserva el tamaño de las demás y queda centrada. */
.publication-grid > .publication-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc((100% - 28px) / 2);
  justify-self: center;
}
@media (max-width: 1279px) and (min-width: 851px) {
  .product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .product-grid > .product-card:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .product-grid > .product-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}
@media (max-width: 850px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .product-grid > .product-card:last-child {
    grid-column: 2 / span 2;
  }
}
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .product-grid > .product-card,
  .product-grid > .product-card:last-child {
    grid-column: auto;
  }
  .product-card h3 {
    min-height: 0;
    font-size: 1.15rem;
  }
  .publication-grid > .publication-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }
}
