.cart-content {
    display: none;
    width: 300px;
    top: 40px;
    right: 0;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.cart-content::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 20px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent white transparent;
    z-index: 1001;
}

#cart-icon:hover+.cart-content,
.cart-content:hover {
    display: block;
}

#cart-icon {
    display: flex;
    align-items: center;
}

#floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#floating-cart .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545;
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transform: translate(50%, -50%);
}

.cart-content2 {
    display: none;
    width: 300px;
    bottom: 70px;
    right: 0;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* 購物車內樣式設計 */

.cart-items .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
}

.cart-total strong {
    color: #17a2b8;
}

.btn-danger {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}
#login-btn {
    margin-left: 16px;
}

@media screen and (max-width: 992px) {
    #cart-nav {
        display: none;
    }

    #login-btn {
        margin-left: 0;
    }
}