/* Checkout and cart layout. Keep body-level WooCommerce classes out of component grids. */
body.woocommerce-checkout,
body.woocommerce-cart {
    display: block;
}

body.woocommerce-checkout .qoy-page,
body.woocommerce-cart .qoy-page {
    min-height: 560px;
    padding-top: 0;
}

body.woocommerce-checkout .qoy-content,
body.woocommerce-cart .qoy-content {
    width: 100%;
    max-width: none;
    font-size: 14px;
    line-height: 1.5;
}

body.woocommerce-checkout .qoy-page > h1,
body.woocommerce-cart .qoy-page > h1 {
    margin: 8px 0 42px;
}

/* Classic checkout. */
body.woocommerce-checkout form.checkout.woocommerce-checkout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
    gap: 48px;
    align-items: start;
}

body.woocommerce-checkout form.checkout #customer_details {
    grid-column: 1;
}

body.woocommerce-checkout form.checkout #order_review_heading,
body.woocommerce-checkout form.checkout #order_review {
    grid-column: 2;
}

/* WooCommerce Checkout block. */
body.woocommerce-checkout .wp-block-woocommerce-checkout,
body.woocommerce-cart .wp-block-woocommerce-cart {
    margin: 0;
    padding: 0;
}

body.woocommerce-checkout .wc-block-components-sidebar-layout,
body.woocommerce-cart .wc-block-components-sidebar-layout {
    align-items: flex-start;
    gap: 48px;
}

body.woocommerce-checkout .wc-block-components-main,
body.woocommerce-cart .wc-block-components-main {
    min-width: 0;
    padding-right: 0;
}

body.woocommerce-checkout .wc-block-components-sidebar,
body.woocommerce-cart .wc-block-components-sidebar {
    min-width: 0;
    padding-left: 0;
}

body.woocommerce-checkout .wc-block-components-checkout-step,
body.woocommerce-checkout .wc-block-checkout__order-notes,
body.woocommerce-checkout .wc-block-checkout__terms {
    margin-bottom: 30px;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__shipping-option .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-checkout__payment-method .wc-block-components-checkout-step__title {
    color: var(--ink);
    font-weight: 500;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input,
body.woocommerce-checkout .wc-block-components-address-form__country select {
    min-height: 48px;
    border: 1px solid var(--brown);
    border-radius: 6px;
    box-shadow: none;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input:focus {
    outline: 1px solid var(--brown);
    outline-offset: 1px;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    width: 100%;
    min-height: 50px;
    justify-content: center;
}

body.woocommerce-checkout .wc-block-components-order-summary,
body.woocommerce-cart .wc-block-components-totals-wrapper {
    border-color: var(--line);
}

@media (max-width: 900px) {
    body.woocommerce-checkout form.checkout.woocommerce-checkout {
        display: block;
    }

    body.woocommerce-checkout .wc-block-components-sidebar-layout,
    body.woocommerce-cart .wc-block-components-sidebar-layout {
        display: block;
    }

    body.woocommerce-checkout .wc-block-components-main,
    body.woocommerce-checkout .wc-block-components-sidebar,
    body.woocommerce-cart .wc-block-components-main,
    body.woocommerce-cart .wc-block-components-sidebar {
        width: 100%;
    }

    body.woocommerce-checkout .wc-block-components-sidebar,
    body.woocommerce-cart .wc-block-components-sidebar {
        margin-top: 34px;
    }
}

@media (max-width: 700px) {
    body.woocommerce-checkout .qoy-page > h1,
    body.woocommerce-cart .qoy-page > h1 {
        margin-bottom: 26px;
    }

    body.woocommerce-checkout .wc-block-components-checkout-step,
    body.woocommerce-checkout .wc-block-checkout__order-notes,
    body.woocommerce-checkout .wc-block-checkout__terms {
        padding-left: 0;
        padding-right: 0;
    }
}
