/* Tarjeta de producto. Portado de lizi/src/components/ProductCard.astro y Price.astro. */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  display: grid;
  place-items: center;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.card .placeholder {
  font-size: 3rem;
  opacity: 0.4;
}

.card .tag {
  position: absolute;
  top: 10px;
  left: 10px;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card .brand {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card h3 a:hover {
  color: var(--green-600);
}

.card .btn-sm {
  margin-top: auto;
  padding: 9px 12px;
  font-size: 0.85rem;
}

.price .amount {
  white-space: nowrap;
}

/* En celular se muestra el nombre completo, sin cortar con "…". */
@media (max-width: 520px) {
  .card-body {
    padding: 10px 10px 12px;
  }

  .card h3 {
    display: block;
    overflow: visible;
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .card-body .price {
    font-size: 0.9rem;
  }

  .card .btn-sm {
    text-align: center;
    font-size: 0.8rem;
    padding: 9px 8px;
    line-height: 1.3;
  }
}
