/**
 * ============================================================
 * LIVE DEALS MARQUEE TICKER CSS
 * Pure CSS3 Keyframe 60fps GPU Hardware-Accelerated Sliding Animation
 * Fixed Pill Badge, Interactive Actionable Deal Items, & Hover Pause.
 * ============================================================
 */

:root {
  --ticker-bg: linear-gradient(90deg, #064e3b 0%, #065f46 35%, #047857 70%, #064e3b 100%);
  --ticker-border: rgba(255, 255, 255, 0.12);
  --ticker-text: #f0fdf4;
  --ticker-badge-bg: #f59e0b;
  --ticker-badge-text: #0f172a;
  --ticker-badge-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  --ticker-cta-bg: rgba(255, 255, 255, 0.16);
  --ticker-cta-border: rgba(255, 255, 255, 0.28);
  --ticker-cta-hover-bg: #f59e0b;
  --ticker-cta-hover-text: #0f172a;
  --ticker-speed: 36s;
}

/* 1. Gradient Background Bar */
.deals-marquee-bar {
  width: 100%;
  background: var(--ticker-bg);
  background-size: 200% 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid var(--ticker-border);
  padding: 8px 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  user-select: none;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
}

/* Subtle edge gradient fade masks */
.deals-marquee-bar::before,
.deals-marquee-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  pointer-events: none;
  z-index: 10;
}

.deals-marquee-bar::before {
  left: 0;
  background: linear-gradient(90deg, #064e3b 0%, transparent 100%);
}

.deals-marquee-bar::after {
  right: 0;
  background: linear-gradient(270deg, #064e3b 0%, transparent 100%);
}

/* 2. Fixed Left Pill Badge ("🔥 LIMITED DEALS") */
.deals-badge-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  padding: 0 16px 0 14px;
  background: linear-gradient(90deg, #064e3b 85%, transparent 100%);
  display: flex;
  align-items: center;
}

.deals-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ticker-badge-bg);
  color: var(--ticker-badge-text);
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 9999px;
  box-shadow: var(--ticker-badge-shadow);
  white-space: nowrap;
  animation: badge-pulse 2.2s infinite ease-in-out;
}

.deals-badge .flame-icon {
  font-size: 12px;
  display: inline-block;
  animation: flame-flicker 1.4s infinite alternate;
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 3px 14px rgba(245, 158, 11, 0.7);
  }
}

@keyframes flame-flicker {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.15) rotate(6deg); }
}

/* 3. Smooth Infinite Marquee Track */
.deals-marquee-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  white-space: nowrap;
}

.deals-marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: marquee-scroll var(--ticker-speed) linear infinite;
}

/* Smart Hover Interaction: Pause moving track on hover */
.deals-marquee-viewport:hover .deals-marquee-track {
  animation-play-state: paused;
}

/* Non-jittery 60fps horizontal sliding loop */
@keyframes marquee-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* 4. Actionable Deal Items */
.deal-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ticker-text);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.deal-item-icon {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deal-item-title {
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.01em;
}

.deal-item-desc {
  color: rgba(240, 253, 244, 0.95);
}

.deal-item-highlight {
  color: #a7f3d0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 5. Clickable Micro-CTA Buttons */
.deal-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--ticker-cta-bg);
  border: 1px solid var(--ticker-cta-border);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  margin-left: 2px;
}

.deal-cta-btn svg {
  transition: transform 0.2s ease;
}

.deal-cta-btn:hover {
  background: var(--ticker-cta-hover-bg);
  color: var(--ticker-cta-hover-text);
  border-color: var(--ticker-cta-hover-bg);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.deal-cta-btn:hover svg {
  transform: translateX(2px);
}

.deal-separator {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  user-select: none;
  margin: 0 2px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .deals-badge {
    font-size: 9.5px;
    padding: 4px 8px;
    gap: 4px;
  }
  .deals-badge-wrap {
    padding: 0 10px 0 8px;
  }
  .deal-item {
    font-size: 11px;
    gap: 6px;
  }
  .deals-marquee-track {
    gap: 22px;
  }
  .deal-cta-btn {
    font-size: 9.5px;
    padding: 2px 7px;
  }
}
