#cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    background-color: rgba(0, 0, 0, 0.85);
    border-top: none;
    border-radius: 0;
    padding: 2%;
    box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-left: none;
    border-right: none;
    z-index: 100;
    transition: all 0.5s ease-in-out;
    color: white;
    box-sizing: border-box;
    max-height: 60vh;
    overflow-y: auto;
    transition: bottom 0.5s ease-in-out;
}
#cart.minimized {
    height: 50px;
    overflow: hidden;
    padding-top: 10px;
    padding-bottom: 10px;
}

#cart-toggle {
    position: fixed;
    right: 30px;
    bottom: 30px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px;
    /* Increased padding */
    border-radius: 3px;
    /* Changed back to square (was 50%) */
    border: none;
    /* Remove border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Subtle shadow */
    cursor: pointer;
    transition: opacity 0.5s ease-out, transform 0.3s ease-out, background-color 0.3s;
    opacity: 0;
    /* Keep initial opacity for JS control */
    display: flex;
    /* For centering icon */
    align-items: center;
    justify-content: center;
}

#cart-toggle:hover {
    transform: scale(1.1);
    /* Slightly smaller hover scale for subtle effect */
    background-color: rgba(255, 255, 255, 0.9);
    /* More opaque on hover */
}

#cart-toggle img {
    width: 25px;
    /* Slightly larger icon */
    height: 25px;
    position: static;
    /* Remove relative positioning */
}

#minimise {
    margin: 0;
    float: right;
    margin-right: 15px;
    /* Adjust margin */
    width: auto;
    /* Let content dictate width */
    font-size: 20px;
    /* Larger arrow */
    cursor: pointer;
    display: block;
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    /* White text */
    transition: color 0.3s ease;
}

#minimise:hover {
    color: rgba(255, 255, 255, 1);
}

#cart h2 {
    margin-bottom: 15px;
    /* More space */
    color: rgba(255, 255, 255, 0.9);
    /* White text */
    text-align: center;
    /* Center the heading */
    font-size: 1.8em;
    /* Larger heading */
    font-weight: 600;
    /* Semi-bold */
}

#cart-items {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    /* More space */
}

#cart-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    /* Adjusted spacing */
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    /* Lighter, more subtle transparent border */
    padding-right: 5%;
    /* Responsive padding */
    padding-left: 5%;
    /* Responsive padding */
    color: rgba(255, 255, 255, 0.8);
    /* White text */
    font-size: 1.1em;
}

.cart-item-details {
    flex-shrink: 1;
    line-height: 1.4;
    /* Better readability */
}

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

.cart-quantity-controls button {
    background-color: black;
    /* Changed to black */
    color: white;
    /* Changed to white */
    border: none;
    /* No outline */
    padding: 6px 12px;
    /* Slightly larger buttons */
    border-radius: 8px;
    /* More rounded */
    cursor: pointer;
    margin: 0 5px;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.cart-quantity-controls button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    /* Slightly lighter black on hover */
    transform: translateY(-1px);
    /* Slight lift on hover */
    color: white;
}

#cart-total {
    font-weight: bold;
    margin-bottom: 20px;
    /* More space */
    text-align: right;
    font-size: 1.2em;
    /* Larger total font */
    color: rgba(255, 255, 255, 0.9);
    /* White text */
    padding-right: 5%;
    /* Align with list items */
    padding-left: 5%;
}

#cart i {
    font-size: small;
    color: rgba(255, 255, 255, 0.6);
    /* More subtle white */
    padding-bottom: 15px;
    /* Increased padding */
    display: block;
    /* Ensure it takes full width */
    text-align: center;
    /* Center the shipping text */
}

#checkout {
    background-color: rgb(255, 255, 255);
    /* Changed to black */
    color: rgb(0, 0, 0);
    /* Changed to white */
    border: 2px solid #000000;
    padding: 12px 25px;
    /* More generous padding */
    border-radius: 12px;
    /* More rounded corners */
    cursor: pointer;
    width: 60%;
    /* Make it more prominent and responsive */
    max-width: 250px;
    /* Max width for larger screens */
    left: 50%;
    /* Center the button */
    transform: translateX(-50%);
    /* Center the button */
    position: relative;
    display: block;
    /* Make it a block element to center easily */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, color 0.3s ease;
    font-size: 1.1em;
    /* Larger font */
    font-weight: 600;
    /* Semi-bold */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    /* Subtle black shadow */
}

#checkout:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: rgb(255, 255, 255);
    border: 2px solid #ffffff;

}

/* Media Queries for better responsiveness on smaller screens */
@media (max-width: 768px) {
    #cart {
        padding: 3%;
    }


    #cart-items li {
        padding-right: 2%;
        padding-left: 2%;
    }

    .cart-quantity-controls button {
        padding: 4px 8px;
    }

    #checkout {
        width: 70%;
        padding: 10px 20px;
    }

    #cart-toggle {
        right: 20px;
        bottom: 20px;
        padding: 8px;
    }

    #cart-toggle img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    #cart {
        padding: 4%;
    }

    #cart h2 {
        font-size: 1.3em;
    }

    #cart-items li {
        flex-direction: column;
        /* Stack items on very small screens */
        align-items: flex-start;
        padding-right: 1%;
        padding-left: 1%;
    }

    .cart-quantity-controls {
        width: 100%;
        justify-content: flex-end;
        margin-top: 5px;
    }

    #checkout {
        width: 80%;
        font-size: 0.9em;
    }
}