/* ============================================
   PROMOTIONS SYSTEM STYLES
   ============================================ */

/* Promotion Badges on Products */
.promotion-pulse {
  animation: promotionPulse 2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes promotionPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }
}

/* Featured Promotions Section - Homepage */
.promotions-showcase {
  padding: 2rem 0;
}

.promotion-card-home {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.promotion-card-home:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.2);
}

.promo-icon-home {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.promotion-card-home:hover .promo-icon-home {
  background: rgba(var(--bs-primary-rgb), 0.1);
  transform: rotate(5deg) scale(1.1);
}

/* Sidebar Promotions (Existing) */
.promotion-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4) !important;
}

.promotion-badge {
  background: rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.promotion-image {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.promotion-card:hover .promotion-image {
  transform: scale(1.1) rotate(-5deg);
}

/* Ad Boxes */
.ad-box {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.ad-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ad-box.tall {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ad-box.mini {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  min-height: 120px;
}

.ad-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ad-desc {
  font-size: 0.9rem;
  opacity: 0.95;
}

.ad-button {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border: 2px solid white;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ad-button:hover {
  background: white;
  color: #667eea;
  transform: scale(1.05);
}

/* Cart Promotions Section */
.promotions-section {
  background: linear-gradient(135deg, #f6f9fc 0%, #e9f2f9 100%);
  padding: 1rem;
  border-radius: 0.75rem;
  margin: 1rem 0;
  border: 2px solid #e3f2fd;
}

.promotions-section h6 {
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #28a745;
}

.promotions-section .text-success {
  color: #28a745 !important;
}

/* Free Delivery Badge */
.free-delivery-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: freeBounce 2s ease-in-out infinite;
}

@keyframes freeBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Promotion Tags */
.promotion-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff3cd;
  color: #856404;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #ffeaa7;
}

.promotion-tag.applied {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

/* Color variants for different promotion types */
.bg-purple {
  background-color: #764ba2 !important;
}

.btn-purple {
  background-color: #764ba2;
  border-color: #764ba2;
  color: white;
}

.btn-purple:hover {
  background-color: #5f3c85;
  border-color: #5f3c85;
  color: white;
}

.btn-outline-purple {
  border-color: #764ba2;
  color: #764ba2;
}

.btn-outline-purple:hover {
  background-color: #764ba2;
  border-color: #764ba2;
  color: white;
}

.text-purple {
  color: #764ba2 !important;
}

/* Promotion Highlight Animation */
.promo-highlight {
  animation: highlightFade 3s ease-in-out;
}

@keyframes highlightFade {
  0% {
    background-color: rgba(255, 235, 59, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .promotion-card-home {
    margin-bottom: 1rem;
  }

  .promo-icon-home {
    width: 45px;
    height: 45px;
  }

  .ad-box.tall {
    min-height: 250px;
  }

  .promotions-section {
    padding: 0.75rem;
  }
}

/* Product Card Promotion Badges */
.product-card .badge.promotion-pulse {
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
}

/* Promotion Expiry Countdown */
.promotion-countdown {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.promotion-countdown i {
  animation: clockTick 1s infinite;
}

@keyframes clockTick {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

/* Stacked Promotions Indicator */
.stacked-promotions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border-left: 4px solid #28a745;
}

.stacked-promotions .promotion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

/* Promotion Loading State */
.promotion-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 0.5rem;
  height: 80px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Success Checkmark Animation */
.promo-success-check {
  color: #28a745;
  animation: checkPop 0.5s ease-out;
}

@keyframes checkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Print Styles - Hide promotions in print */
@media print {
  .promotions-showcase,
  .promotion-card,
  .ad-box,
  .promotions-section {
    display: none !important;
  }
}
