/* ==========================================================================
   TARJETA DE PRODUCTO (2026-10-28)
   Orden de lectura: NOMBRE → foto → categoría → precio con el carrito a la derecha.
   La usan las dos tarjetas (React en la tienda, Astro en portada, fichas y blog), con las clases
   zc-*. Se carga DESPUÉS de las otras hojas: pisa lo viejo de .product-card / .pcard sin tocarlo.
   ========================================================================== */
.zc.zc {
  position: relative;
  min-width: 0; /* sin esto, el texto de una línea (categoría) estira la grilla fuera de la pantalla */
  display: flex;
  flex-direction: column;
  padding: 14px 14px 12px;
  border: 0;
  border-radius: 20px;
  background: var(--color-bg-elevated, #fff);
  box-shadow: none;
  overflow: visible;
  transform: none;
  color: var(--color-text);
  font-size: 1rem;
  transition: box-shadow 0.3s ease;
}
.zc.zc:hover { transform: none; box-shadow: 0 10px 28px rgba(31, 26, 28, 0.08); }
html.dark .zc.zc:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }

/* Menos espacio entre tarjetas en PC: cada una gana ancho para el precio y el carrito */
@media (min-width: 992px) { .product-grid:has(> .zc) { gap: 20px; } }

/* Nombre: arriba, dos líneas siempre (las tarjetas de una fila quedan parejas) */
.zc-enlace { display: block; color: inherit; text-decoration: none; }
.zc-nombre {
  margin: 0 0 10px;
  font-family: var(--font-primary, inherit);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tinta, var(--color-black));
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.5em;
}
.zc-enlace:hover .zc-nombre { color: var(--color-brand); }

/* Foto */
.zc-caja { position: relative; }
.zc-foto.zc-foto {
  position: relative;
  display: block;
  aspect-ratio: 1;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-bg-alt, #f8f0eb);
}
.zc-foto img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
  transition: transform 0.4s ease;
}
/* En oscuro las fotos (casi todas con fondo blanco) van en un recuadro blanco: se ven enteras */
html.dark .zc-foto.zc-foto { background: #fff; }
html.dark .zc-foto img { mix-blend-mode: normal; }
.zc.zc:hover .zc-foto img { transform: scale(1.04); }

.zc-sello {
  position: absolute;
  left: 8px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.zc-sello--agotado { top: 8px; background: #1f1a1c; }
.zc-sello--oferta { bottom: 8px; background: var(--color-brand); }
html.dark .zc-sello--oferta { color: #0f0f0f; }

/* Corazón sobre la foto, arriba a la derecha (se esconde solo si no hay cuentas: arreglos.css) */
.zc-fav { position: absolute; top: 0; right: 0; z-index: 2; }
.zc-fav .fav-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9999px;
  background: transparent; box-shadow: none;
  color: var(--color-brand);
}
html[data-cuentas="no"] .zc-fav { display: none !important; }

/* Categoría */
.zc-cat {
  margin: 10px 0 2px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pie: precio a la izquierda, carrito a la derecha */
.zc-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
}
.zc-precio {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--font-primary, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-brand);
  white-space: nowrap;
}
.zc-antes { font-size: 0.75rem; font-weight: 500; color: var(--color-text-light); }
.zc-precio-wa { font-size: 0.78rem; white-space: normal; color: var(--color-text); }
/* «IVA incluido» (lo prende ZAPHUB): se lee, pero no compite con el precio */
.zc-iva { font-size: 0.68rem; font-weight: 500; color: var(--color-text-light); }

.zc .add-to-cart-btn {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--color-brand);
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.08s ease;
}
html.dark .zc .add-to-cart-btn { color: #0f0f0f; }
.zc .add-to-cart-btn:hover { background: var(--color-brand-dark, var(--color-brand)); }
.zc .add-to-cart-btn svg { width: 18px; height: 18px; }
.zc .add-to-cart-btn.disabled,
.zc .add-to-cart-btn:disabled {
  background: var(--color-border);
  color: var(--color-text-light);
  cursor: not-allowed;
}
/* Área de toque de 44 px sin agrandar el círculo */
.zc .add-to-cart-btn::after { content: ""; position: absolute; inset: -4px; }

/* ---------- Celular: dos tarjetas por fila ---------- */
@media (max-width: 640px) {
  .zc.zc { padding: 10px 10px 10px; border-radius: 16px; }
  .zc-nombre { font-size: 0.8rem; margin-bottom: 8px; }
  .zc-foto.zc-foto { border-radius: 12px; }
  .zc-foto img { padding: 4px; }
  .zc-cat { font-size: 0.62rem; margin-top: 8px; }
  .zc-precio { font-size: 0.9rem; }
  .zc-antes { font-size: 0.68rem; }
  .zc-iva { font-size: 0.62rem; }
  .zc .add-to-cart-btn { width: 36px; height: 36px; }
  .zc .add-to-cart-btn svg { width: 16px; height: 16px; }
  .zc-fav .fav-btn { width: 36px; height: 36px; }
}
@media (max-width: 360px) {
  .zc-precio { font-size: 0.82rem; }
}
