/* Cart Animation Keyframes */
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes cartFlash {
    0% { background-color: rgb(239 68 68); } /* red-500 */
    50% { background-color: rgb(34 197 94); } /* green-500 */
    100% { background-color: rgb(239 68 68); } /* red-500 */
}

@keyframes cartPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    }
}

/* Animation Classes */
.cart-bounce {
    animation: cartBounce 0.6s ease-in-out;
}

.cart-flash {
    animation: cartFlash 0.8s ease-in-out;
}

.cart-pulse {
    animation: cartPulse 2s ease-in-out infinite;
}

/* Smooth transitions */
#cart-count {
    transition: all 0.3s ease;
}

/* Prevent gray background on hamburger button only */
[data-hamburger-menu] button {
    background-color: transparent !important;
}

[data-hamburger-menu] button:hover,
[data-hamburger-menu] button:focus,
[data-hamburger-menu] button:active {
    background-color: transparent !important;
}

/* Ensure navigation bar background stays white */
nav.bg-white {
    background-color: white !important;
}

/* Rotating Background Images */
.rotating-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 30px;
    animation: scrollLeft 80s linear infinite;
    will-change: transform;
}

.rotating-img {
    height: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    filter: grayscale(30%) blur(0.5px) saturate(1.2);
    transition: all 0.3s ease;
}

@keyframes scrollLeft {
    0% { 
        transform: translateX(0);
    }
    100% { 
        transform: translateX(-50%);
    }
}

/* Create two rows that fill full height */
.rotating-images:nth-child(1) {
    top: 0;
    height: 50%;
    animation-duration: 80s;
    animation-delay: 0s;
}

.rotating-images:nth-child(2) {
    top: 50%;
    height: 50%;
    animation-duration: 90s;
    animation-delay: -20s;
    animation-direction: reverse;
}

.rotating-images:nth-child(3) {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rotating-img {
        height: 100%;
    }
    
    .rotating-images {
        gap: 20px;
    }
    
    .rotating-images:nth-child(1) {
        animation-duration: 60s;
    }
    
    .rotating-images:nth-child(2) {
        animation-duration: 65s;
    }
    
    .rotating-images:nth-child(3) {
        animation-duration: 55s;
    }
}