/* ─────────────────────────────── */
/* PRODUCTO CARD                   */
/* ─────────────────────────────── */
.producto {
  display: flex;
  flex-direction: column;
  background: var(--color-superficie, #222);
  border-radius: var(--radio-md, 12px);
  overflow: hidden;
  flex: 0 0 220px;
  width: 220px !important;
  max-width: 220px;
  color: var(--color-texto, #f0f0f0);
  text-align: left;
  border: 1px solid var(--color-borde, #2e2e2e);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.producto:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-card-hover, 0 8px 24px rgba(0, 0, 0, 0.45));
  border-color: rgba(255, 116, 0, 0.3);
}

/* Imagen wrapper */
.img-wrapper {
  position: relative;
  min-height: 160px;
  max-height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  overflow: hidden;
  border-bottom: 1px solid var(--color-borde, #2e2e2e);
}

.img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.img-wrapper img.visible {
  opacity: 1;
}

/* Fallback para img directa sin wrapper */
.producto > img {
  min-height: 160px;
  max-height: 160px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  object-fit: contain;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--color-acento, #ff7400);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Detalle */
.detalle {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 3px;
}

/* Badge */
.badge {
  background: var(--color-acento, #ff7400);
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Titulo y marca */
.titulo {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-texto, #f0f0f0);
  margin-top: 3px;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marca {
  font-size: 0.8rem;
  color: var(--color-texto-suave, #999);
}

/* Info baja (push al fondo) */
.info-baja {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Rating */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffb400;
  font-size: 0.85rem;
}

.rating .reseñas {
  color: var(--color-texto-suave, #999);
  font-size: 0.78rem;
}

/* Precios */
.precios {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 6px;
  margin-bottom: 4px;
}

.precio-anterior-linea {
  line-height: 1;
}

.precio-anterior {
  text-decoration: line-through;
  color: var(--color-texto-suave, #999);
  font-size: 0.85rem;
}

.precio-actual-linea {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.precio-actual {
  color: var(--color-exito, #2ecc71);
  font-weight: 700;
  font-size: 1.15rem;
}

.descuento {
  color: var(--color-exito, #2ecc71);
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(46, 204, 113, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Envío */
.envio {
  color: var(--color-exito, #2ecc71);
  font-size: 0.8rem;
  margin-top: 6px;
}

.icono-envio {
  font-weight: 700;
}
