/* =======================================================
   Wamugunda Farm - Animated Wave Product Card (Uiverse.io inspired)
   ======================================================= */

.e-card {
  position: relative;
  width: 100%;
  height: 410px;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(22, 101, 52, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(22, 101, 52, 0.1);
  margin-bottom: 25px;
}

.e-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(22, 101, 52, 0.35);
}

/* Background Waves */
.e-card .wave {
  position: absolute;
  width: 580px;
  height: 650px;
  opacity: 0.85;
  left: 50%;
  top: 60%;
  margin-left: -290px;
  margin-top: -325px;
  background: linear-gradient(744deg, #15803d, #16a34a 55%, #a0522d 90%);
  border-radius: 40%;
  pointer-events: none;
  z-index: 1;
}

.e-card.playing .wave {
  animation: ec-wave 8s infinite linear;
}

.e-card.playing .wave:nth-child(2) {
  top: 65%;
  opacity: 0.65;
  background: linear-gradient(744deg, #166534, #22c55e 60%, #eab308 95%);
  animation: ec-wave 12s infinite linear;
}

.e-card.playing .wave:nth-child(3) {
  top: 70%;
  opacity: 0.45;
  background: linear-gradient(744deg, #854223, #15803d 50%, #059669);
  animation: ec-wave 16s infinite linear;
}

@keyframes ec-wave {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Card Top: Image Area */
.e-card .card-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #f8fafc;
  z-index: 2;
}

.e-card .card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.e-card:hover .card-image-wrapper img {
  transform: scale(1.08);
}

/* Badges */
.e-card .card-badge-container {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.e-card .badge-tag {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.e-card .badge-tag.badge-hot {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.e-card .badge-tag.badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
}

.e-card .badge-tag.badge-sale {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.e-card .badge-tag.badge-out {
  background: linear-gradient(135deg, #64748b, #475569);
}

/* Hover Floating Actions */
.e-card .card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  z-index: 5;
}

.e-card:hover .card-actions {
  opacity: 1;
  transform: translateX(0);
}

.e-card .card-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.e-card .card-action-btn:hover {
  background: #166534;
  color: #ffffff;
  transform: scale(1.1);
}

.e-card .card-action-btn.wa-btn:hover {
  background: #25d366;
  color: #ffffff;
}

/* Card Bottom: Content Area (Overlaid on Waves) */
.e-card .card-info-content {
  position: relative;
  z-index: 3;
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.45) 100%);
  backdrop-filter: blur(2px);
}

.e-card .card-category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fed7aa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  margin-bottom: 3px;
  display: inline-block;
}

.e-card .card-category:hover {
  color: #ffffff;
}

.e-card .card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.e-card .card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.e-card .card-title a:hover {
  color: #fde047;
}

.e-card .card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #facc15;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.e-card .card-rating .rating-count {
  color: #f1f5f9;
  font-size: 11px;
  margin-left: 2px;
  opacity: 0.9;
}

/* Price & Quick Add Footer */
.e-card .card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.e-card .card-price-block {
  display: flex;
  flex-direction: column;
}

.e-card .card-current-price {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  letter-spacing: -0.3px;
}

.e-card .card-unit {
  font-size: 11px;
  color: #e2e8f0;
  font-weight: 500;
  margin-left: 2px;
}

.e-card .card-old-price {
  font-size: 12px;
  color: #cbd5e1;
  text-decoration: line-through;
  opacity: 0.85;
}

.e-card .card-quick-add {
  padding: 6px 14px;
  background: #ffffff;
  color: #15803d;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.e-card .card-quick-add:hover {
  background: #fde047;
  color: #14532d;
  transform: scale(1.05);
}

.e-card .card-quick-add.out-of-stock {
  background: rgba(255, 255, 255, 0.5);
  color: #64748b;
  cursor: not-allowed;
}
