

.cart-float-btn {
    position: fixed;

    right: max(
        18px,
        calc((100vw - 480px) / 2 + 18px)
    );
    bottom: 102px;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #17a2b8;
    color: #fff;

    border-radius: 50%;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);

    font-size: 23px;
    text-decoration: none;

    z-index: 900;
}


/* 購物車數量 */
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;

    min-width: 20px;
    height: 20px;
    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ef4056;
    color: #fff;

    border: 2px solid #fff;
    border-radius: 10px;

    font-size: 11px;
    font-weight: 700;
    line-height: 16px;

    box-sizing: border-box;
}


.cart-float-btn:hover,
.cart-float-btn:focus {
    color: #fff;
    text-decoration: none;
}

/* 飛向購物車的小圖示 */
.cart-fly {
    position: fixed;
    z-index: 9999;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #13a9bd;
    color: #fff;

    border-radius: 50%;

    font-size: 14px;

    pointer-events: none;

    transition:
        left .55s cubic-bezier(.4, 0, .6, 1),
        top .55s cubic-bezier(.4, 0, .6, 1),
        transform .55s ease,
        opacity .55s ease;
}


/* 抵達後購物車彈一下 */
.cart-float-btn.cart-bounce {
    animation: cartBounce .4s ease;
}

@keyframes cartBounce {

    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.22);
    }

    65% {
        transform: scale(.92);
    }

    100% {
        transform: scale(1);
    }
}