body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    font-size: 15px;
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
    color: #007bff;
}

.checkout-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #33333300;
    color: #fff;
}

.checkout-logo {
    font-size: 24px;
    font-weight: bold;
}

.checkout-cart {
    position: relative;
    margin-left: auto; /* Move the cart to the right */
}

.checkout-cart img {
    width: 30px;
    height: 30px;
}

.checkout-cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: rgb(0, 26, 255);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 14px;
}

.checkout-main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.checkout-cart-checkout-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    gap: 50px;
}

.checkout-cart-container,
.checkout-checkout-container {
    width: 50%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.checkout-cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 10px;
    box-shadow: 0 10px 20px rgba(85, 85, 85, 0.2);
    border-radius: 20px;
    border: 1px solid #ddd; /* Light border */
}

.checkout-cart-item img {
    height: 80px;
}

.checkout-cart-item-details {
    flex: 1;
}

.checkout-cart-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-cart-item-info p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.checkout-cart-item-info .checkout-remove-from-cart {
    background: none;
    border: none;
    cursor: pointer;
}

.checkout-cart-item-info .checkout-remove-from-cart img {
    height: 20px;
}

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

.checkout-quantity-button {
    padding: 3px 6px;
    background-color: #ddd;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    
}

.checkout-quantity-button:hover {
    background-color: #bbb;
}

.checkout-quantity-input {
    width: 45px;
    padding: 2px;
    border-radius: 5px;
    border: 1px solid #ddd;
    text-align: center;
    
}

.checkout-checkout-container h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout-form-group {
    display: flex;
    flex-direction: column;
}

.checkout-form-group label {
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.checkout-form-group input,
.checkout-form-group select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.checkout-payment-method {
    margin-top: 20px;
}

.checkout-payment-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkout-payment-option input {
    margin-right: 10px;
}

.checkout-totals-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.checkout-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-total-item span {
    font-size: 18px;
    color: #333;
}

.checkout-checkout-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #49D8B9;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-checkout-button:hover {
    background-color: #38b3a0;
}

.checkout-clear-cart-button {
    text-align: center;
    color: #ff0000;
    cursor: pointer;
}

@media (max-width: 768px) {
    .checkout-cart-checkout-container {
        flex-direction: column;
        gap: 20px;
    }

    .checkout-cart-container,
    .checkout-checkout-container {
        width: 100%;
    }

    .checkout-cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 5px;
    }

    .checkout-cart-item img {
        width: 100%;
        height: auto;
    }

    .checkout-cart-item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .checkout-checkout-container {
        margin-top: 20px; /* Add margin to separate cart and checkout on small screens */
    }

    .checkout-quantity-button,
    .checkout-quantity-input {
        position: static; /* Reset fixed position for smaller screens */
    }
}

@media (max-width: 480px) {
    .checkout-navbar {
        flex-direction: column;
        gap: 10px;
    }

    .checkout-cart {
        margin-left: 0;
    }
}

.success-message {
    position: fixed;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #192941ce;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.3rem; /* Adjust based on your design needs */
    text-align: center;
    z-index: 1000;
    animation: fadeIn 0.1s, fadeOut 0.5s 2.5s;
    max-width: 90%; /* Adjusted for better fit on smaller screens */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    word-wrap: break-word; /* Ensures long text wraps properly */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.animated-emoji {
    display: inline-block;
    font-size: 1.5em;
    margin: 0 0.1em;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 600px) {
    .success-message {
        top: 5%; /* Adjust position for smaller screens */
        font-size:0.9rem; /* Smaller font size for better fit */
        padding: 8px 15px; /* Adjust padding for smaller screens */
        max-width: 50%; /* Ensures message does not exceed screen width */
    }

    .animated-emoji {
        font-size: 0.8rem; /* Slightly smaller emojis on small screens */
    }
}
