.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
}

.coupon-card {
  aspect-ratio: 14 / 10;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.05);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.coupon-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.1);
}

/* Background Gradients */
.coupon-card.style-1 { background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%); }
.coupon-card.style-2 { background: linear-gradient(135deg, #A96BFF 0%, #5300FF 100%); }
.coupon-card.style-3 { background: linear-gradient(135deg, #FF6B93 0%, #FF004D 100%); }
.coupon-card.style-4 { background: linear-gradient(135deg, #ff6b6b 0%, #ff5600 100%); }
.coupon-card.style-5 { background: linear-gradient(135deg, #6bff8d 0%, #029327 100%); }

/* Chip Effect */
.coupon-card::before {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, #d4af37, #ffd700);
  width: 50px;
  height: 40px;
  left: 30px;
  top: 75px;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}
.coupon-card::after {
  content: '';
  position: absolute;
  background: url('https://www.svgrepo.com/show/339037/chip-debit.svg');
  width: 50px;
  height: 40px;
  left: 30px;
  top: 75px;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4;
}
/* NEW: Image Container */
.card-image {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 165px;
  height: 120px;
  background-size: cover;
  background-position: left;
  background-repeat: no-repeat;
  border-radius: 200px 0 0 0;
  border: 0;
  box-shadow: none;
  opacity: 1;
}

/* Card Content */
.card-header {
  min-height: 40px; /* Ensures space for the title */
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  margin: 0;
  color: #121212;
}

.card-body {
  text-align: left;
  z-index: 1;
}

.offer-text {
  font-size: 36px;
  font-weight: 700;
  margin: 13px 0 10px 60px;
  line-height: 1.1;
  text-shadow: 0 2px 5px rgba(0,0,0,0.2);
  color: #fff;
}

.description {
  font-size: 13px;
  opacity: 0.8;
  margin: 0;
  max-width: 80%;
}

.card-footer {
  margin-top: 10px;
}

.coupon-code {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 8px 8px 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(5px);
}

.coupon-code span {
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  user-select: all;
}

.copy-btn {
  background: white;
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.copy-btn:hover {
  background: #f0f0f0;
}

.copy-btn.copied {
  background: #28a745;
  color: white;
}

@media (max-width: 768px) {
  .coupon-grid {
    grid-template-columns: 1fr;
    margin-bottom: 80px;
  }
}
