/* =========================
   Estilos para Catálogo - Tarjetas
   Guarda como: ../Estilos/StyleProductos.css
   ========================= */

#catalogo {
  background: #eef2f7;
  padding: 48px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #1f2937;
}

#catalogo h1 {
  text-align: center;
  margin: 0 0 6px;
  font-size: 1.9rem;
  letter-spacing: -0.5px;
}

#catalogo p {
  text-align: center;
  margin: 0 0 28px;
  color: #475569;
}

/* Grid responsivo de tarjetas */
.grid-catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  width: min(1180px, 94%);
  margin: 0 auto;
  align-items: start;
  justify-items: stretch;
}
/* ---------- ENLACE DE TARJETA (todo clickeable) ---------- */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ---------- TARJETA + DESPLIEGUE INTERNO ---------- */
/* ---------- TARJETA + DESPLIEGUE INTERNO ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  will-change: transform;
  height: 100%;              /* fuerza altura pareja dentro del grid */
  min-height: 320px;         /* altura mínima igual para todas */
}

/* efecto hover */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  z-index: 5;
}

/* imagen con altura uniforme */
.card img {
  width: 100%;
  height: 180px;             /* fijo = todas iguales visualmente */
  object-fit: cover;
  display: block;
  background-color: #e2e8f0; /* por si la imagen no carga */
}

/* cuerpo del contenido */
.card-content {
  flex: 1;                   /* ocupa el espacio restante */
  padding: 12px 14px;
  color: #1f2937;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.card-content h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #0f172a;
}
.card-content p {
  margin: 0;
  font-size: .92rem;
  color: #475569;
}

/* despliegue del overlay */
.overlay {
  background: #f8fafc;
  color: #0f172a;
  border-top: 1px solid #e2e8f0;
  padding: 0 14px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height .35s ease, opacity .25s ease, transform .25s ease, padding .25s ease;
}
.card:hover .overlay {
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
  padding: 12px 14px 14px;
}

/* lista del overlay */
.overlay ul {
  margin: 8px 0 0 18px;
  padding: 0;
  list-style: disc;
  font-size: .92rem;
  line-height: 1.35;
  color: #334155;
}

/* mantener proporciones del grid */
.grid-catalogo {
  align-items: stretch;
}
/* =========================
   Fin de Estilos para Catálogo - Tarjetas
   ========================= */