/* Cart Badge Styles */
.cart-badge {
    display: inline-block;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    position: relative;
    top: -2px;
    margin-left: 5px;
}

.cart-count {
    background-color: #C5282F;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    min-width: 18px;
    text-align: center;
    margin-left: 4px;
    vertical-align: middle;
}

/* Empty cart badge should be less prominent */
.cart-count:empty,
.cart-count:contains('0') {
    background-color: #999;
}

/* Mobile cart badge */
.mobile-cart .cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 2px 5px;
    font-size: 10px;
    min-width: 16px;
}

/* Animation for cart update */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        background-color: #ff6b6b;
    }
    100% {
        transform: scale(1);
    }
}

.cart-badge.pulse {
    animation: cartPulse 0.5s ease;
}

/* Desktop header cart button with badge */
.btn.btn-secondary .cart-count {
    margin-left: 5px;
}

/* Ensure badge is visible on all backgrounds */
.auth-buttons .cart-count,
.mobile-cart .cart-count {
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}