/* ─────────────────────────────── */
/* 🛒 PRODUCTO CARD CLIENTE */
/* ─────────────────────────────── */
.producto {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  width: 100% !important;
  color: #1c1c1c;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;

}

.producto:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.producto img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}

.producto > img {
  min-height: 200px; /* altura mínima */
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  object-fit: contain;
}

.detalle {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Badge “Más vendido” */
.badge {
  background: #ff7400;
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  text-transform: uppercase;
}

/* Título y marca */
.titulo {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #222;
  margin-top: 4px;
  min-height: 42px;
}

.marca {
  font-size: 0.85rem;
  color: #777;
}

/* Rating */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffb400;
  font-size: 0.9rem;
}

.rating .reseñas {
  color: #555;
  font-size: 0.8rem;
}

/* Precios */
.precios {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
}

.precio-anterior {
  color: #888;
  text-decoration: line-through;
  font-size: 0.9rem;
}

.precio-actual {
  color: #2e7d32;
  font-weight: 700;
  font-size: 1.4rem;
}

.precios {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 6px;
  margin-bottom: 6px;
}

.precio-anterior-linea {
  line-height: 1;
}

.precio-anterior {
  text-decoration: line-through;
  color: #888;
  font-size: 0.9rem;
}

.precio-actual-linea {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.precio-actual {
  color: #28a745;
  font-weight: 700;
  font-size: 1.3rem;
}

.descuento {
  color: #ff7400;
  font-weight: 700;
  font-size: 0.9rem;
}


.descuento {
  color: #388e3c;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Envío */
.envio {
  color: #00a650;
  font-size: 0.85rem;
  margin-top: 6px;
}

.icono-envio {
  font-weight: 700;
}

.detalle {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.info-baja {
  margin-top: auto; /* 👈 Esto empuja toda la parte baja hacia el fondo */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.img-wrapper {
  position: relative;
  min-height: 200px; /* mantiene el espacio del contenedor */
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff; /* gris suave opcional */
  overflow: hidden;
  border-bottom: 1px solid #ddd;
}

/* Imagen inicial invisible */
.img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  display: block;
}

/* Fade-in cuando carga */
.img-wrapper img.visible {
  opacity: 1;
}

/* Spinner centrado */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #ff7400;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


