/**
 * Verde Encanto — Productos Modernos
 * Grid refinado, tarjetas con glass-lift, badges dorados, wishlist animada
 */

/* ── Grid ── */
.ve-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2.5rem;
  padding: 1.5rem 0;

}

/* ── Tarjeta ── */
.ve-product-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  /* Borde dorado sutil */
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.06),
    0 1px 3px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Efecto shimmer en hover */
.ve-product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.08),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.ve-product-card:hover::after {
  left: 100%;
}

.ve-product-card:hover,
.ve-product-card:active {
  transform: translateY(-8px);
  box-shadow:
    0 20px 50px rgba(212, 175, 55, 0.18),
    0 8px 20px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(212, 175, 55, 0.4);
}

/* ── Imagen ── */
.ve-product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f9f9f9;

}

.ve-product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  backface-visibility: hidden;

}

.ve-product-card:hover .ve-product-card-image img,
.ve-product-card:active .ve-product-card-image img {
  transform: scale(1.04);

}

/* ── Badges ── */
.ve-product-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;

}

.ve-badge {
  padding: 0.45rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

}

.ve-badge--new {
  background: linear-gradient(135deg, #D4AF37, #FFD700);
  color: #0a1a0a;
  border: 1px solid rgba(255,215,0,0.6);
  box-shadow: 0 2px 12px rgba(212,175,55,0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(212,175,55,0.4); }
  50% { box-shadow: 0 2px 20px rgba(212,175,55,0.7), 0 0 8px rgba(255,215,0,0.5); }
}

/* ── Wishlist ── */
.ve-wishlist {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.06);
  color: #999;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.35s ease;

}

.ve-wishlist:hover {
  background: #fff;
  color: #e74c3c;
  border-color: rgba(231,76,60,0.3);
  box-shadow: 0 4px 16px rgba(231,76,60,0.18);
  transform: scale(1.08);

}

.ve-wishlist[aria-pressed="true"],
.ve-wishlist.is-active {
  color: #e74c3c;
  background: #fff5f5;
  border-color: rgba(231,76,60,0.4);

}

/* ── Info ── */
.ve-product-card-info {
  padding: 1.5rem 1.5rem 1.8rem;
  text-align: center;
  transition: background 0.3s ease;

}

.ve-product-card:hover .ve-product-card-info {
  background: rgba(245,241,232,0.35);

}

.ve-product-card-cat {
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 0.6rem;
  font-weight: 600;

}

.ve-product-card-title {
  margin-bottom: 0.75rem;

}

.ve-product-card-title a {
  color: #1a1a1a;
  font-size: 1.08rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  line-height: 1.35;

}

.ve-product-card-title a:hover {
  color: #D4AF37;

}

.ve-product-card-price {
  color: #B8941F;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: 'Playfair Display', serif;

}

/* Anular el blanco forzado de .ve-bg-forest span (style.css):
   dentro de la tarjeta blanca el precio debe verse dorado */
.ve-product-card-price .amount,
.ve-bg-forest .ve-product-card .ve-product-card-price span {
  color: #B8941F !important;

}

.ve-product-card-price del .amount,
.ve-bg-forest .ve-product-card .ve-product-card-price del span {
  color: #aaa !important;
  font-weight: 400;
  font-size: 0.9rem;

}

.ve-product-card-price ins {
  text-decoration: none;

}

/* ── Botón Comprar ── */
.ve-product-card-btn {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.65rem 2rem;
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #1B5E20 100%);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  /* Sombra dorada sutil */
  box-shadow: 0 4px 15px rgba(27, 94, 32, 0.3);
  position: relative;
  overflow: hidden;
}

/* Efecto shimmer en el botón */
.ve-product-card-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.ve-product-card-btn:hover::before {
  left: 100%;
}

.ve-product-card-btn:hover {
  background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 50%, #2E7D32 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 94, 32, 0.4);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ve-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.8rem;
  }
}

@media (max-width: 480px) {
  .ve-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .ve-product-card-info {
    padding: 1rem 0.8rem 1.2rem;
  }
  .ve-product-card-title a {
    font-size: 0.92rem;
  }
  .ve-product-card-price {
    font-size: 0.95rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BADGES AUTOMÁTICOS DE PRODUCTO
   ═══════════════════════════════════════════════════════════════════════ */

/* Badge NUEVO — solo aparece en productos <30 días */
.ve-product-is-new .ve-product-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%);
  color: #1a1a1a;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Badge ÚLTIMAS PIEZAS — stock ≤ 3 */
.ve-product-low-stock .ve-product-card-badge-low {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Estado agotado */
.ve-product-out-of-stock {
  opacity: 0.7;
  pointer-events: none;
}

.ve-product-out-of-stock::after {
  content: 'AGOTADO';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 20px;
  z-index: 10;
}

/* ═══════════════════════════════════════════════════════════════════════
   WRAPPER DE BADGES
   ═══════════════════════════════════════════════════════════════════════ */
.ve-product-badges-wrapper {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  z-index: 5;
  pointer-events: none;
}

/* Badge NUEVO — dorado premium */
.ve-product-card-badge {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%);
  color: #1a1a1a;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  animation: badgeShine 2s ease-in-out infinite;
}

@keyframes badgeShine {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(212, 175, 55, 0.6); }
}

/* Badge ÚLTIMAS PIEZAS — rojo urgencia */
.ve-product-card-badge-low {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  margin-left: auto; /* Empuja a la derecha */
}
