/* =========================================================
   FARMERKART CHECKOUT
   ========================================================= */

.checkout-page {
    background: #f5f7f6;
    min-height: calc(100vh - 100px);
    padding: 50px 20px 80px;
}

.checkout-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

.checkout-container > h1 {
    font-size: 36px;
    font-weight: 700;
    color: #222;
    margin: 0 0 30px;
}

/* =========================================================
   MAIN CHECKOUT GRID
   ========================================================= */

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: 30px;
    align-items: start;
}

/* =========================================================
   CARD
   ========================================================= */

.checkout-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8ece9;
}

.checkout-card h2 {
    margin: 0 0 25px;
    font-size: 24px;
    color: #222;
}

/* =========================================================
   FORM
   ========================================================= */

.checkout-details {
    min-width: 0;
}

#checkoutForm {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7ddd9;
    border-radius: 9px;
    background: #fff;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 15px;
    color: #222;
    outline: none;
    transition: 0.2s;
}

.form-group input {
    height: 48px;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.10);
}

.form-group input[readonly] {
    background: #f5f6f5;
    color: #666;
}

/* =========================================================
   PAYMENT
   ========================================================= */

.payment-section {
    margin-top: 10px;
    padding-top: 25px;
    border-top: 1px solid #e8e8e8;
}

.payment-section h2 {
    margin-bottom: 18px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    border: 2px solid #2e7d32;
    border-radius: 12px;
    background: #f5fbf5;
    cursor: pointer;
}

.payment-option input {
    width: 18px;
    height: 18px;
    accent-color: #2e7d32;
    flex-shrink: 0;
}

.payment-option span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-option strong {
    color: #222;
    font-size: 16px;
}

.payment-option small {
    color: #666;
    font-size: 13px;
}

/* =========================================================
   PLACE ORDER
   ========================================================= */

.place-order-btn {
    width: 100%;
    margin-top: 25px;
    padding: 16px 20px;
    border: none;
    border-radius: 10px;
    background: #2e7d32;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
}

.place-order-btn:hover {
    background: #256428;
    transform: translateY(-1px);
}

/* =========================================================
   ORDER SUMMARY
   ========================================================= */

.checkout-summary {
    position: sticky;
    top: 100px;
}

.checkout-summary .checkout-card {
    padding: 26px;
}

.checkout-products {
    margin-bottom: 20px;
}

.checkout-product {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eeeeee;
}

.checkout-product:first-child {
    padding-top: 0;
}

.checkout-product > div {
    min-width: 0;
}

.checkout-product strong {
    display: block;
    color: #222;
    font-size: 15px;
    line-height: 1.4;
}

.checkout-product small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 13px;
}

.checkout-product > strong:last-child {
    color: #2e7d32;
    white-space: nowrap;
}

/* =========================================================
   SUMMARY ROWS
   ========================================================= */

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    font-size: 15px;
}

.summary-row span {
    color: #555;
}

.summary-row strong {
    color: #222;
}

.summary-divider {
    height: 1px;
    background: #dddddd;
    margin: 10px 0;
}

.checkout-total {
    padding-top: 18px;
    font-size: 20px;
}

.checkout-total span {
    color: #222;
    font-weight: 700;
}

.checkout-total strong {
    color: #2e7d32;
    font-size: 24px;
}

/* =========================================================
   DELIVERY NOTE
   ========================================================= */

.checkout-note {
    margin-top: 20px;
    padding: 14px;
    border-radius: 9px;
    background: #f1f8e9;
    color: #2e7d32;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* =========================================================
   SUCCESS PAGE
   ========================================================= */

.order-success-page {
    min-height: calc(100vh - 100px);
    background: #f5f7f6;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.order-success-box {
    width: 100%;
    max-width: 650px;
    background: #fff;
    padding: 50px 40px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.success-icon {
    font-size: 70px;
    color: #2e7d32;
    margin-bottom: 20px;
}

.order-success-box h1 {
    margin: 0 0 12px;
    font-size: 32px;
    color: #222;
}

.order-success-box > p {
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
}

.order-number {
    display: inline-block;
    padding: 14px 22px;
    background: #f1f8e9;
    border-radius: 10px;
    color: #333;
    margin-bottom: 20px;
}

.order-number strong {
    color: #2e7d32;
    margin-left: 5px;
}

.success-message {
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.success-actions .btn {
    text-decoration: none;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }

}

@media (max-width: 600px) {

    .checkout-page {
        padding: 30px 14px 60px;
    }

    .checkout-container > h1 {
        font-size: 30px;
        margin-bottom: 20px;
    }

    .checkout-card {
        padding: 20px;
        border-radius: 12px;
    }

    .checkout-card h2 {
        font-size: 21px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group input {
        height: 46px;
    }

    .checkout-product {
        gap: 10px;
    }

    .checkout-total {
        font-size: 18px;
    }

    .checkout-total strong {
        font-size: 22px;
    }

    .order-success-page {
        padding: 50px 15px;
    }

    .order-success-box {
        padding: 35px 20px;
    }

    .order-success-box h1 {
        font-size: 27px;
    }

    .success-icon {
        font-size: 58px;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }

}