@keyframes slideUp {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-100%); opacity: 0; }
}

@keyframes slideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes zoomOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0); opacity: 0; }
}

@keyframes spinOut {
  from { transform: rotate(0deg); opacity: 1; }
  to { transform: rotate(360deg); opacity: 0; }
}

@keyframes fadeSlideUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-100%); }
}

@keyframes fadeSlideDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(100%); }
}

@keyframes fadeZoomOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0); }
}

@keyframes fadeRotateOut {
  from { opacity: 1; transform: rotate(0deg); }
  to { opacity: 0; transform: rotate(360deg); }
}

@keyframes fadeOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-100%); }
}

@keyframes fadeOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

@keyframes fadeOutDiagonal {
  from { opacity: 1; transform: translate(0, 0); }
  to { opacity: 0; transform: translate(100%, 100%); }
}

@keyframes fadeOutSpiral {
  from { opacity: 1; transform: rotate(0deg) scale(1); }
  to { opacity: 0; transform: rotate(720deg) scale(0); }
}

@keyframes fadeOutBounce {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(0); }
}

/* New simple fade in keyframe */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.8; }
}

/* New animation for floating effect (up 2px, down 2px) - Must combine with centering transform */
@keyframes floatVertical {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-2px); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* New animation for floating effect (2px up, 2px down past original point) */
@keyframes floatSlow {
    0% { transform: translateY(2px); } /* Start 2px DOWN from origin */
    50% { transform: translateY(-2px); } /* Move 2px UP past origin */
    100% { transform: translateY(2px); } /* Return to 2px DOWN from origin */
}

/* New pulse animation for slideshow pause button */
@keyframes pulseExpand {
    /* Keep the pulse fully inside the button by only scaling slightly */
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}

/* NEW: Vertical float 5px */
@keyframes floatVertical5px {
    /* Reduced total travel to ~3px (±1.5px from center) */
    0% { transform: translateY(1.5px); }
    50% { transform: translateY(-1.5px); }
    100% { transform: translateY(1.5px); }
}

/* NEW: Image pulse using box shadow */
@keyframes pulseImage {
    /* Reduced glow radius and spread by 50% */
    0% { box-shadow: 0 0 0px 0px rgba(var(--primary-color-rgb), 0.5); }
    50% { box-shadow: 0 0 10px 2.5px rgba(var(--primary-color-rgb), 1); }
    100% { box-shadow: 0 0 0px 0px rgba(var(--primary-color-rgb), 0.5); }
}

.closing {
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

.closing-slideUp { animation-name: slideUp; }
.closing-slideDown { animation-name: slideDown; }
.closing-fadeOut { animation-name: fadeOut; }
.closing-zoomOut { animation-name: zoomOut; }
.closing-spinOut { animation-name: spinOut; }

/* Idle carousel line entrance animation */
@keyframes idleLineIn {
  0%   { opacity: 0; transform: translateY(8px); }
  60%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.category-idle-carousel.idle-line-in {
  animation: idleLineIn 0.9s ease-out;
}