/**
 * product-card.css
 * -------------------------------------------------------------------------
 * Estilo de la tarjeta de producto (foto + nombre + precio) y de la grilla
 * que las contiene. Se usa en index.html y catalogo.html.
 * -------------------------------------------------------------------------
 */

.grilla-productos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.tarjeta-producto {
  display: block;
  width: 220px;
  text-decoration: none;
  color: var(--color-texto);
}

.tarjeta-producto__imagen-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--color-acento-suave);
  border-radius: var(--radio-borde);
}

.tarjeta-producto__imagen-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transicion-suave), box-shadow var(--transicion-suave);
}

.tarjeta-producto:hover .tarjeta-producto__imagen-wrapper img {
  transform: scale(1.08);
  box-shadow: 0 6px 16px var(--color-sombra);
}

.tarjeta-producto__sin-foto {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #cccccc;
}

.tarjeta-producto__nombre {
  margin: 12px 0 4px 0;
  font-size: 15px;
}

.tarjeta-producto__precio {
  margin: 0;
  font-weight: bold;
  font-size: 15px;
  color: var(--color-acento-oscuro);
}

.mensaje-sin-productos {
  text-align: center;
  color: #777777;
  padding: 40px 0;
  width: 100%;
}

/* En pantallas angostas (celular), una sola columna se ve muy vacía y
   obliga a hacer mucho scroll para ver todo el catálogo. Con una grilla
   de 2 columnas fijas se aprovecha mejor el ancho de pantalla y se ve
   igual de bonito, solo un poco más compacto. */
@media (max-width: 600px) {
  .grilla-productos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .tarjeta-producto {
    width: 100%;
  }

  .tarjeta-producto__nombre {
    font-size: 13px;
    margin: 10px 0 3px 0;
  }

  .tarjeta-producto__precio {
    font-size: 13px;
  }
}
