/* ==================================================
   Floating Cart Widget — Sticky Bottom Bar
   ================================================== */

/* Bar base — position/display set by JS, only transitions here */
#floatingCart {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
    box-shadow: 0 -4px 24px rgba(0,0,0,.10);
}

/* Bounce animation when item is added */
@keyframes fcCartBounce {
    0%, 100% { transform: translateY(0); }
    30%       { transform: translateY(-6px); }
    60%       { transform: translateY(-2px); }
}
#floatingCart.fc-animate {
    animation: fcCartBounce 0.5s ease;
}

/* Cart dropdown items */
.fc-cart-dropdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.fc-cart-dropdown-item:last-child {
    border-bottom: none;
}

/* Empty state */
.fc-empty-cart-msg {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

/* Flying item animation */
.fc-flying-item {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
}
.fc-flying-item.fly {
    opacity: 0;
    transform: scale(0.2);
}

/* Badge pop on qty bubble */
@keyframes fcCountPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}
#cartCount.fc-pop {
    animation: fcCountPop 0.4s ease;
}

/* Cart backdrop */
#cartBackdrop:not(.d-none) {
    display: block !important;
}

/* Mobile — dropdown opens full-width above the bar */
@media (max-width: 768px) {
    #cartBackdrop:not(.d-none) {
        display: block !important;
    }
    #cartDropdown {
        bottom: 80px !important;
        top: auto !important;
        right: 0 !important;
        left: 0 !important;
        max-width: none !important;
        width: auto !important;
        padding: 0 12px !important;
        max-height: calc(100vh - 100px) !important;
    }
    #cartDropdown .card-footer {
        max-height: calc(100vh - 280px) !important;
    }
}
