/*
* Cart specific styles
*/

/* Cart loading states */
.cart-loading {
    font-style: italic;
    opacity: 0.7;
}

.cartitem-badge .bx-loader {
    animation: spin 1s linear infinite;
}

.topbar-badge {
    transition: opacity 0.3s ease;
}

.topbar-badge.d-none {
    opacity: 0;
    visibility: hidden;
}

/* Cart dropdown styling */
.dropdown-menu-cart {
    min-width: 320px;
}

.dropdown-item-cart {
    border-bottom: 1px solid #f3f6f9;
}

.dropdown-item-cart:last-child {
    border-bottom: none;
}

.cart-quantity-input {
    font-size: 11px;
    padding: 2px 6px;
    text-align: center;
}

.cart-quantity-input:focus {
    box-shadow: none;
    border-color: #405189;
}

/* Empty cart state */
.empty-cart {
    padding: 2rem 1rem;
}

.empty-cart .avatar-title {
    margin-bottom: 1rem;
}

/* Cart item styling */
.cart-item-price {
    font-weight: 600;
    color: #405189;
}

/* Remove item button styling */
.remove-item-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.remove-item-btn:hover {
    opacity: 1;
    background-color: #f06548 !important;
    color: white !important;
}

/* Flying to cart animation */
.flying-to-cart {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0ab39c;
}

.flying-to-cart img {
    border-radius: 6px;
}

/* Cart badge bounce animation */
@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse effect for cart icon */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Additional bounce effects */
@keyframes cartBounce {
    0%, 20%, 53%, 80%, 100% {
        transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}
