* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #fdfaf7;
    margin: 0;
    padding: 0;
    text-align: center;
}

.checkout-title {
    font-size: 3rem;
    font-weight: 900;
    margin-top: 9rem;
    margin-bottom: 2rem;
}

/* CHECKOUT CONTAINER */
.checkout-container {
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

/* LEFT: CHECKOUT FORM */
.checkout-form {
    flex: 1;
    padding-right: 2rem;
}

.checkout-form h2 {
    font-size: 1.2rem;
    text-align: left;
    margin: 1rem 0;
}

/* INPUT STYLES */
input {
    width: 100%;
    padding: 0.7rem;
    margin: 0.5rem 0;
    border: 1px solid #fdc5cc;
    border-radius: 8px;
    font-size: 1rem;
    /* border: 3px solid red; */
}

/* Ensure inputs are exactly half of the input-group */
.input-group {
    display: flex;
    width: 100%;
    gap: 10px;
}

/* SHIPPING METHOD */
.shipping-method {
    text-align: left;
}

.shipping-method label {
    display: flex;
    justify-content: space-between;
    background: #fff5f6;
    padding: 12px;
    margin-top: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.shipping-method input {
    width: auto;
}

/* PAY NOW BUTTON */
.pay-now {
    width: 100%;
    background: #fdc5cc;
    color: white;
    font-weight: bold;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    margin-top: 1rem;
    cursor: pointer;
}

.pay-now:hover {
    background: #f8b8c0;
}

/* RIGHT: ORDER SUMMARY */
.checkout-summary {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-left: 2px solid #f5f5f5;
    text-align: left;
}

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

.summary-item img {
    max-width: 50px;
    height: auto;
    border-radius: 8px;
    margin-right: 2rem;
}

.summary-info {
    flex-grow: 1;
    /* Allows title and qty to take available space */
    display: flex;
}

.summary-title {
    font-weight: bold;
}

.summary-price {
    font-weight: bold;
}

/* SUBTOTAL AND TOTAL */
.summary-subtotal,
.summary-total {
    display: flex;
    justify-content: space-between;
}

.summary-subtotal p,
.summary-total p {
    margin: 0;
    padding: 0.8rem 0;
}


.summary-total p {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Mobile only button */
.mobile-only {
    display: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
        width: 100%;
    }

    /* Hide the original Pay Now button in the form */
    .checkout-form .pay-now {
        display: none;
    }

    .checkout-title {
        font-size: 2.4rem;
        margin-top: 12rem;
        margin-bottom: 0rem;
    }

    .checkout-container {
        flex-direction: column;
        padding: 1rem;
    }

    .checkout-form {
        padding-right: 0;
    }

    .checkout-summary {
        border-left: none;
        border-top: 2px solid #f5f5f5;
        padding-top: 1rem;
    }
}