/**
 * Checkout component.
 *
 * Mobile source order is summary, coupon, delivery details, payment and submit.
 * Desktop uses the same markup in a balanced two-column grid.
 */

body.woocommerce-checkout {
    background: #fff;
}

.ic-commerce-page--checkout {
    width: 100%;
    background: #fff;
}

.ic-checkout {
    margin: 0;
}

.ic-checkout-page-header {
    width: min(100% - 24px, 1040px);
    margin: 0 auto;
    padding: 22px 0 0;
}

.ic-checkout-page-header h1 {
    margin: 0;
    color: #171512;
    font-size: 2rem;
    line-height: 1.08;
    letter-spacing: 0;
}
.ic-checkout-flow {
    display: grid;
    gap: 12px;
    width: min(100% - 24px, 1040px);
    margin: 0 auto;
    padding: 14px 0 36px;
}

.ic-checkout-hero {
    text-align: center;
}

.ic-checkout-hero h1 {
    margin: 0;
    color: #171512;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.ic-checkout-hero p {
    margin: 4px 0 0;
    color: #71675c;
    font-family: "Hind Siliguri", sans-serif;
    font-size: 0.85rem;
    line-height: 1.3;
}

.ic-checkout-summary,
.ic-checkout-coupon,
.ic-checkout-fields,
.ic-checkout-payment-panel {
    min-width: 0;
}

.ic-checkout-review {
    width: 100%;
    margin: 0;
    border: 1px solid #e4d4c0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 7px;
    background: #fffdf9;
    overflow: hidden;
}

.ic-checkout-review tbody,
.ic-checkout-review tfoot {
    display: block;
}

.ic-checkout-review tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.ic-checkout-review tbody tr {
    min-height: 72px;
    padding: 8px 10px;
    border-bottom: 1px solid #eadfce;
}

.ic-checkout-review tbody tr:last-child {
    border-bottom: 0;
}

.ic-checkout-review th,
.ic-checkout-review td {
    padding: 0;
    border: 0;
}

.ic-checkout-review__product {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.ic-checkout-review__image,
.ic-checkout-review__image img {
    display: block;
}

.ic-checkout-review__image img {
    width: 62px;
    height: 62px;
    border-radius: 5px;
    object-fit: cover;
}

.ic-checkout-review__name {
    display: -webkit-box;
    overflow: hidden;
    color: #171512;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ic-checkout-review__name a {
    color: inherit;
    text-decoration: none;
}

.ic-checkout-review__body .variation {
    display: none;
}

.ic-checkout-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: #766c61;
    font-size: 0.72rem;
}

.ic-checkout-qty__input {
    width: 44px;
    height: 28px;
    padding: 2px 5px;
    border: 1px solid #dbc7aa;
    border-radius: 5px;
    background: #fff;
    text-align: center;
}

.ic-checkout-review .product-total {
    padding-left: 10px;
    color: #171512;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.ic-checkout-review tfoot tr {
    min-height: 42px;
    padding: 10px;
    border-top: 1px solid #eadfce;
    font-size: 0.82rem;
}

.ic-checkout-review tfoot tr:first-child {
    border-top: 0;
}

.ic-checkout-review tfoot th {
    text-align: left;
}

.ic-checkout-review tfoot td {
    text-align: right;
}

.ic-checkout-review tfoot .order-total {
    color: #171512;
    font-size: 0.9rem;
}

.ic-checkout-review tfoot .order-total strong {
    font-size: 1rem;
}

.ic-checkout-coupon {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
}

.ic-checkout-coupon input,
.ic-checkout-coupon button {
    min-width: 0;
    height: 42px;
    border: 1px solid #dbc7aa;
    border-radius: 6px;
    font: inherit;
}

.ic-checkout-coupon input {
    width: 100%;
    padding: 0 12px;
    background: #fff;
}

.ic-checkout-coupon button {
    background: #c59a68;
    color: #171512;
    font-weight: 700;
}

.ic-checkout-fields {
    padding-top: 2px;
}

.ic-checkout-fields h2 {
    margin: 0 0 10px;
    color: #171512;
    font-size: 1.05rem;
    line-height: 1.2;
}

.ic-checkout-fields .woocommerce-additional-fields > h3,
.ic-checkout-fields .woocommerce-shipping-fields > h3 {
    display: none;
}

.ic-checkout-fields .woocommerce-billing-fields__field-wrapper,
.ic-checkout-fields .woocommerce-additional-fields__field-wrapper {
    display: grid;
    gap: 9px;
}

.ic-checkout-fields .form-row {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.ic-checkout-fields label {
    display: block;
    margin: 0 0 4px;
    color: #29251f;
    font-size: 0.78rem;
    font-weight: 700;
}

.ic-checkout-fields input.input-text,
.ic-checkout-fields textarea,
.ic-checkout-fields select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #dbc7aa;
    border-radius: 6px;
    background: #fff;
    color: #171512;
    font: inherit;
    font-size: 0.85rem;
}

.ic-checkout-fields textarea {
    min-height: 58px;
    max-height: 78px;
    resize: vertical;
}

.ic-checkout-fields .select2-container .select2-selection--single {
    min-height: 42px;
    border-color: #dbc7aa;
    border-radius: 6px;
}

.ic-checkout-fields .woocommerce-invalid input,
.ic-checkout-fields .woocommerce-invalid textarea,
.ic-checkout-fields .woocommerce-invalid select {
    border-color: #a33b32;
}

.ic-checkout-payment {
    background: transparent;
}

.ic-checkout-payment .wc_payment_methods {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ic-checkout-payment .wc_payment_method {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    min-height: 52px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #d8bd99;
    border-radius: 7px;
    background: #fffdf9;
}

.ic-checkout-payment .wc_payment_method > input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #b98448;
}

.ic-checkout-payment .wc_payment_method > label {
    margin: 0;
    color: #171512;
    font-size: 0.86rem;
    font-weight: 700;
}

.ic-checkout-payment .payment_box {
    grid-column: 2;
    margin: 2px 0 0;
    padding: 0;
    background: transparent;
    color: #71675c;
    font-size: 0.72rem;
}

.ic-checkout-payment .payment_box::before {
    display: none;
}

.ic-checkout-payment .payment_box p {
    margin: 0;
}

.ic-checkout-payment .place-order {
    display: flex;
    flex-direction: column;
    margin: 10px 0 0;
    padding: 0;
}

.ic-checkout-payment .woocommerce-terms-and-conditions-wrapper {
    order: 1;
}

.ic-checkout-payment #place_order {
    order: 2;
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 6px;
    background: #c59a68;
    color: #171512;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.ic-checkout-confirmation-note {
    order: 3;
    margin: 7px 0 0;
    color: #5f554a;
    font-family: "Hind Siliguri", sans-serif;
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: center;
}

.ic-checkout-privacy {
    order: 4;
    margin-top: 5px;
    color: #82786d;
    font-size: 0.66rem;
    line-height: 1.35;
    text-align: center;
}

.ic-checkout-privacy p {
    margin: 0;
}

.ic-checkout-privacy a {
    color: #9a6330;
}

.ic-checkout-required-message,
.ic-checkout-submit-lock {
    margin: 8px 0 0;
    font-size: 0.76rem;
    font-weight: 600;
    text-align: center;
}

.ic-checkout-required-message {
    color: #9b2f28;
}

.ic-checkout-submit-lock {
    color: #4b674f;
}

.ic-checkout.is-submitting #place_order {
    opacity: 0.65;
    pointer-events: none;
}

.ic-checkout .woocommerce-error,
.ic-checkout .woocommerce-message,
.ic-checkout .woocommerce-info {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #dfc7a7;
    border-radius: 6px;
    background: #fffaf2;
    font-size: 0.78rem;
    list-style: none;
}

@media (min-width: 900px) {
    .ic-checkout-page-header {
        padding-top: 38px;
    }

    .ic-checkout-page-header h1 {
        font-size: 2.45rem;
    }

    .ic-checkout-flow {
        grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
        grid-template-areas:
            "fields summary"
            "fields coupon"
            "fields payment";
        gap: 14px 30px;
        align-items: start;
        padding: 18px 0 54px;
    }

    .ic-checkout-summary {
        grid-area: summary;
    }

    .ic-checkout-coupon {
        grid-area: coupon;
    }

    .ic-checkout-fields {
        grid-area: fields;
        padding: 18px;
        border: 1px solid #e4d4c0;
        border-radius: 8px;
        background: #fffdf9;
    }

    .ic-checkout-payment-panel {
        grid-area: payment;
    }

    .ic-checkout-review tbody tr {
        min-height: 74px;
    }
}


/* Keep the single COD method compact even when WooCommerce hides its radio. */
.ic-checkout-payment .payment_method_cod {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 1px;
    min-height: 0;
    padding: 5px 10px;
}

.ic-checkout-payment .payment_method_cod > input {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
}

.ic-checkout-payment .payment_method_cod > label {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    white-space: nowrap;
}

.ic-checkout-payment .payment_method_cod > .payment_box {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
}