/* Cart Counter Styles */
.cart-counter {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 20;
    font-size: 11px;
    line-height: 1;
    animation: pulse-gentle 2s infinite;
    background-color: #ef4444 !important; /* Red background */
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.cart-counter:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
}

/* Animation for when counter appears */
@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-bounce-in {
    animation: bounce-in 0.5s ease-out;
}

/* Gentle pulsing animation */
@keyframes pulse-gentle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Counter update animation */
@keyframes counter-update {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        background-color: #ff6b6b;
    }
    100% {
        transform: scale(1);
        background-color: #a99ae3;
    }
}

.cart-count-update {
    animation: counter-update 0.6s ease-out;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .cart-counter {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: 0px;
        right: 0px;
    }
}

/* Make sure cart icon container has proper positioning */
.cart-icon-container {
    position: relative;
    display: inline-block;
}

/* Additional hover effects for the cart area */
.cart-icon-container:hover .cart-counter {
    animation: none;
    transform: scale(1.05);
}

/* Hide text counter on very small screens to avoid crowding */
@media (max-width: 480px) {
    .cart-text-counter {
        display: none !important;
    }
}