.floating-cart {
    position: fixed;
    bottom: 50%; /* Adjust to move it up or down */
    right: 0;  /* Adjust to move it left or right */
    background-color: #e1e8f2; /* Background color */
    color: #191e3b; /* Icon and text color */
    border: 1px solid #2bb673; /* Border matching background */
    border-radius: 8px; /* Slightly round corners */
    width: 60px; /* Increase width to fit larger icon and text */
    height: auto; /* Adjust height dynamically based on content */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: center;
}

.floating-cart:hover {
    background-color: #e1e8f2; /* Hover background color */
}

.floating-cart:hover p{
    color: #191e3b;
}

#cartDrawer .checkout-btn:hover{
    color: #ffffff !important;
}

.floating-cart p {
    margin: 0;
    padding: 0;
}

.floating-cart i {
    font-size: 30px; /* Increase the font size of the icon */
}

.floating-cart-count {
    font-size: 12px; /* Increase font size for the cart count */
    margin-top: 8px; /* Add margin for spacing */
}

hr {
    width: 90%; /* Line width */
    margin: 1px auto; /* Center the line */
    border: none;
    border-top: 1px solid #ffffff; /* Line color */
}

.floating-cart .amount {
    background-color: #2bb673; /* Background for amount section */
    color: white;
    width: 100%; /* Full width for the amount section */
    padding: 1px 0; /* Padding for the amount section */
    font-size: 14px; /* Increase font size for amount */
    text-align: center;
    border-bottom-left-radius: 5%;
    border-bottom-right-radius: 5%;
}

/* Animation for Cart Update */
.cart-update-animation {
    animation: bounce 0.3s ease 0s 10; /* 5 repetitions */
}

/* Bounce Animation Keyframes */
@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Drawer Styling */
.floating-cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    height: 100%;
    background-color: #f4f4f4;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media only screen and (max-width: 991px) {
    .floating-cart-drawer {
        max-width: 300px;
    }
}

.floating-cart-drawer.open {
    right: 0;
}

/* Drawer Header */
.floating-cart-drawer-header {
    padding: 20px;
    background-color: #2b2d30;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-cart-drawer-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-floating-cart-drawer {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Cart Items */
.floating-cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

.floating-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-color: #ffffff;
    padding: 10px;
}

.floating-cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
}

.item-details {
    flex-grow: 1;
}

.item-name {
    font-size: 14px;
    margin: 0 0 5px;
}

.item-price {
    font-size: 12px;
    font-weight: bold;
    color: #2bb673;
    margin: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
}

.quantity-selector button {
    width: 25px;
    height: 25px;
    border: none;
    background-color: #2bb673;
    color: white;
    cursor: pointer;
}

.quantity-selector input {
    width: 40px !important;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 5px;
}

.remove-item {
    background: none;
    border: none;
    color: #ef3759;
    font-size: 20px;
    cursor: pointer;
}

/* Cart Total */
.cart-total {
    padding: 20px;
    background-color: #2b2d30;
    color: white;
    text-align: center;
}

.total-amount {
    font-weight: bold;
    font-size: 18px;
}

.checkout-btn {
    background-color: #2bb673;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
}
