/* ============================================
   SHOP COUNTDOWN BANNER - Sticky Upper Right
   ============================================ */

.shop-countdown-banner {
  position: fixed;
  top: 160px; /* Increased gap from header for better spacing */
  right: 12px;
  z-index: 999; /* Below header but above content */
  max-width: 320px;
  width: auto;
  
  /* Enhanced Dark Glassmorphism styling */
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 0.8) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px rgba(0, 0, 0, 0.3);
  
  /* Animation */
  opacity: 0;
  transform: translateX(100%) scale(0.9);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.shop-countdown-banner.show {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Banner Content */
.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  position: relative;
}

/* 3D Confetti Image Icon */
.banner-icon-3d {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  transform-style: preserve-3d;
  align-self: center;
}

.confetti-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotateY(-10deg) rotateX(10deg);
  animation: popperFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes popperFloat {
  0%, 100% {
    transform: rotateY(-10deg) rotateX(10deg) translateY(0) scale(1);
  }
  50% {
    transform: rotateY(-5deg) rotateX(5deg) translateY(-3px) scale(1.05);
  }
}

/* Banner Text */
.banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.banner-title {
  font-size: 10px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  line-height: 1.3;
  display: block;
  white-space: normal;
  word-wrap: break-word;
}

/* Countdown wrapper */
.countdown-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.1px;
}

.countdown-note {
  font-size: 7.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-countdown {
  display: flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.countdown-segment {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.countdown-value {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 
    0 0 10px rgba(251, 191, 36, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.5px;
}

.countdown-label {
  font-size: 9px;
  font-weight: 500;
  color: rgba(251, 191, 36, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.countdown-separator {
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
  opacity: 0.6;
  margin: 0 -1px;
}

.banner-countdown.ended {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* Close Button */
.banner-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.banner-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.05);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

.banner-close:active {
  transform: scale(0.95);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .shop-countdown-banner {
    top: 120px; /* Increased gap from header (was 90px) */
    right: 12px;
    max-width: 280px;
  }
  
  .banner-content {
    padding: 8px 10px;
    gap: 8px;
  }
  
  .banner-icon-3d {
    width: 38px;
    height: 38px;
  }
  
  .banner-title {
    font-size: 9.5px;
  }
  
  .countdown-value {
    font-size: 13px;
  }
  
  .countdown-label {
    font-size: 8.5px;
  }
  
  .countdown-note {
    font-size: 7px;
  }
  
  .banner-close {
    width: 22px;
    height: 22px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .shop-countdown-banner {
    top: 160px; /* Position directly below fixed header (matching body padding-top) */
    right: 12px;
    left: auto;
    max-width: 260px;
  }
  
  .banner-content {
    padding: 8px 10px;
    gap: 8px;
  }
  
  .banner-icon-3d {
    width: 36px;
    height: 36px;
  }
  
  .banner-title {
    font-size: 9px;
  }
  
  .countdown-value {
    font-size: 12px;
  }
  
  .countdown-label {
    font-size: 8px;
  }
  
  .countdown-note {
    font-size: 6.5px;
  }
  
  .banner-close {
    width: 20px;
    height: 20px;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .shop-countdown-banner {
    top: 360px; /* Adjust for smaller screens, align with first row */
    right: 10px;
    left: auto;
    max-width: 240px;
  }
  
  .banner-content {
    padding: 7px 9px;
  }
  
  .banner-icon-3d {
    width: 32px;
    height: 32px;
  }
  
  .banner-title {
    font-size: 8px;
  }
  
  .countdown-value {
    font-size: 11px;
  }
  
  .countdown-label {
    font-size: 7.5px;
  }
  
  .countdown-note {
    font-size: 6px;
  }
}

/* ============================================
   SCROLL BEHAVIOR
   ============================================ */

/* Banner stays fixed even when scrolling */
.shop-countdown-banner {
  position: fixed; /* Always fixed to viewport */
}

/* Ensure banner stays above other fixed elements */
.shop-countdown-banner {
  z-index: 999;
}

/* Smooth transitions when scrolling */
@media (prefers-reduced-motion: no-preference) {
  .shop-countdown-banner {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
}

/* For users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .shop-countdown-banner {
    transition: opacity 0.15s ease;
  }
  
  .confetti-popper-svg {
    animation: none;
  }
  
  .confetti-piece {
    animation: none;
  }
}
