/* === COMPONENTE: TARJETA DE PRODUCTO (BEM) === */

/* Bloque principal - extiende .card-base */
.product-card {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Elementos: Imagen */
.product-card__img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.product-card__img-wrapper {
  position: relative;
}

/* Cuerpo de la tarjeta  */
.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.25rem;
  min-height: 0; 
}

.product-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-principal, #1E1E1E);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* Badge de categoría */
.product-card__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background-color: #6c757d;
  border-radius: 999px;
}

/* Descripción*/
.product-card__desc {
  font-size: 0.875rem;
  color: var(--text-secundario, #7A746C);
  line-height: 1.5;
  margin-bottom: 1rem;

  max-height: 4.5em; 
  overflow: hidden;
  
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Footer*/
.product-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divider, #E2D9CF);
}

/* Precio */
.product-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-principal, #1E1E1E);
  white-space: nowrap;
}

/* Enlace Ver detalles */
.product-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--btn-latte, #B48A63);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.product-card:hover .product-card__link {
  color: var(--btn-latte-hover, #9F7652);
}

/* Stretched link */
.product-card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card__badge-featured {
  z-index: 2;
}

/* Focus accesible */
.product-card__stretched-link:focus-visible {
  outline: 3px solid var(--btn-latte, #B48A63);
  outline-offset: 2px;
  border-radius: 18px;
}

/* Badge destacado */
.product-card__badge-featured {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(180, 138, 99, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Producto destacado */
.product-card--featured {
  box-shadow: 0 18px 40px rgba(180, 138, 99, 0.18);
}

/* Responsive */
@media (max-width: 576px) {
  .product-card__img {
    height: 210px;
  }

  .product-card__body {
    padding: 1rem;
  }

  .product-card__title {
    font-size: 1rem;
  }

  .product-card__desc {
    -webkit-line-clamp: 2;
  }
}
