/* Shopping bag and order summary. */

/* ========================================
   SHOPPING BAG
======================================== */

.bag-page {
    max-width: 1400px;
}

.bag-header {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    align-items: flex-start;
    margin-bottom: 42px;
}

.bag-header h1 {
    margin-bottom: 8px;
    font-size: 48px;
}

.checkout-steps {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 42px;
    margin: 0;
    list-style: none;
}

.checkout-steps li {
    display: grid;
    justify-items: center;
    gap: 8px;
    color: #626b64;
}

.checkout-steps span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #354738;
    border-radius: 50%;
}

.checkout-steps [aria-current="step"] {
    color: #354738;
    font-weight: 600;
}

.checkout-steps [aria-current="step"] span {
    background: #354738;
    color: #ffffff;
}

.bag-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 30px;
    align-items: start;
}

.bag-items,
.order-summary,
.bag-empty {
    padding: 24px;
    border: 1px solid #cfd5cf;
    background: #ffffff;
}

.bag-table-header,
.bag-item {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) 0.65fr 1fr 0.65fr;
    gap: 18px;
    align-items: center;
}

.bag-table-header {
    padding: 0 0 18px;
    border-bottom: 1px solid #cfd5cf;
    font-weight: 600;
}

.bag-item {
    padding: 24px 0;
    border-bottom: 1px solid #cfd5cf;
}

.bag-item__product {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.bag-item__product img {
    width: 120px;
    height: 130px;
    object-fit: contain;
    background: #f7f5f0;
}

.bag-item__product h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.bag-item__product p,
.bag-item__price,
.bag-item__total {
    margin: 0;
}

.stock-warning {
    color: #8a4b16;
}

.bag-variant-edit summary {
    color: #354738;
    cursor: pointer;
    text-decoration: underline;
}

.bag-variant-edit form {
    margin: 12px 0;
}

.bag-variant-edit select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.bag-variant-edit button {
    padding: 0 12px;
    margin-bottom: 8px;
    background: #354738;
    border-color: #354738;
}

.bag-variant-edit .bag-variant-cancel {
    background: transparent;
    color: #354738;
}

.bag-variant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bag-item__product .bag-stock {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #e1efdf;
    color: #24522b;
    font-weight: 600;
}

.bag-item__product .bag-stock.stock-warning {
    background: #fbe4e1;
    color: #922c25;
}

.bag-feedback .message {
    margin-bottom: 20px;
    padding: 14px 20px;
    background: #edf5ee;
    color: #28543c;
}

.bag-feedback .message.error {
    background: #fff2f1;
    color: #a12622;
}

.bag-item__quantity form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bag-item__quantity button {
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid #71806f;
    background: #ffffff;
    color: #354738;
    font-size: 22px;
}

.bag-item__quantity span {
    min-width: 40px;
    text-align: center;
}

.bag-item__remove,
.bag-continue {
    color: #354738;
    text-decoration: underline;
}

.bag-note {
    margin: 20px 0 0;
}

.order-summary h2 {
    padding-bottom: 18px;
    border-bottom: 1px solid #cfd5cf;
    font-size: 30px;
}

.order-summary p {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.order-summary__total {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #cfd5cf;
    font-size: 20px;
}

.order-summary .button {
    width: 100%;
    margin-top: 20px;
}

.order-summary small {
    display: block;
    margin-top: 14px;
    text-align: center;
}

.bag-continue {
    display: inline-block;
    margin-top: 34px;
}

.bag-empty {
    text-align: center;
}

/* Shipping checkout */

.checkout-page {
    max-width: 1400px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 30px;
    align-items: start;
}

.shipping-form {
    padding: 24px;
    border: 1px solid #cfd5cf;
    background: #ffffff;
}

.shipping-form fieldset {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.shipping-form legend {
    margin-bottom: 14px;
    color: #2f3e34;
    font-size: 24px;
    font-weight: 600;
}

.form-row {
    display: grid;
    gap: 20px;
}

.form-row--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row--address {
    grid-template-columns: 1.5fr 0.8fr 0.65fr;
}

.shipping-form input,
.shipping-form select {
    width: 100%;
    margin-bottom: 8px;
}

.shipping-errors,
.shipping-form .error-message {
    color: #a12622;
}

.shipping-errors {
    margin-bottom: 20px;
    padding: 12px 16px;
    border: 1px solid #d9534f;
    background: #fff2f1;
}

.shipping-submit {
    width: 100%;
    margin: 0;
    background: #354738;
    border-color: #354738;
}

.checkout-summary > p:first-of-type {
    padding-bottom: 16px;
    border-bottom: 1px solid #cfd5cf;
}

.summary-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.summary-item img {
    width: 72px;
    height: 82px;
    object-fit: contain;
    background: #f7f5f0;
}

.summary-item span {
    display: block;
    color: #626b64;
}

.delivery-form {
    padding: 24px;
    border: 1px solid #cfd5cf;
    background: #ffffff;
}

.delivery-form h2 {
    font-size: 30px;
}

.delivery-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid #cfd5cf;
    border-radius: 3px;
    cursor: pointer;
}

.delivery-option:has(input:checked) {
    border-color: #354738;
    background: #f2f5f1;
}

.delivery-option input {
    margin: 0;
}

.delivery-option small {
    display: block;
    margin-top: 4px;
    color: #626b64;
    font-weight: 400;
}

.delivery-note {
    padding: 14px;
    border: 1px solid #cfd5cf;
}

.payment-demo-note {
    max-width: 1400px;
    padding: 12px 16px;
    border: 1px solid #71806f;
    background: #f2f5f1;
}

.payment-form,
.payment-confirmation {
    padding: 24px;
    border: 1px solid #cfd5cf;
    background: #ffffff;
}

.payment-form fieldset {
    margin: 0 0 24px;
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid #cfd5cf;
}

.payment-form legend {
    margin-bottom: 14px;
    color: #2f3e34;
    font-size: 22px;
    font-weight: 600;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.payment-methods label {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 0;
    padding: 20px;
    border: 1px solid #cfd5cf;
    cursor: pointer;
}

.payment-methods label:has(input:checked) {
    border-color: #354738;
    background: #f2f5f1;
}

.payment-methods input,
.billing-same input {
    margin: 0;
}

.payment-methods small {
    display: block;
    color: #626b64;
    font-weight: 400;
}

.billing-same {
    display: flex;
    gap: 12px;
    align-items: center;
}

.billing-address {
    margin-top: 20px;
}

.payment-message {
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid;
}

.payment-message--error {
    border-color: #d9534f;
    background: #fff2f1;
    color: #a12622;
}

.payment-confirmation {
    text-align: center;
}

.payment-confirmation > span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border: 2px solid #354738;
    border-radius: 50%;
    color: #354738;
    font-size: 34px;
}

.payment-confirmation .button {
    margin-top: 18px;
}

@media (max-width: 900px) {
.bag-header,
    .bag-layout {
        grid-template-columns: 1fr;
    }

.bag-header {
        display: grid;
    }

.checkout-steps {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

.bag-layout {
        display: grid;
    }

.bag-table-header {
        display: none;
    }

.bag-item {
        grid-template-columns: 1fr 1fr;
    }

.checkout-layout {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 650px) {
.bag-header h1 {
        font-size: 38px;
    }

.checkout-steps {
        font-size: 12px;
    }

.checkout-steps span {
        width: 34px;
        height: 34px;
    }

.bag-item {
        grid-template-columns: 1fr;
    }

.bag-item__product {
        grid-template-columns: 90px minmax(0, 1fr);
    }

.bag-item__product img {
        width: 90px;
        height: 100px;
    }

.form-row--two,
    .form-row--address {
        grid-template-columns: 1fr;
    }

.delivery-option {
        grid-template-columns: auto 1fr;
    }

    .delivery-option > strong:last-child {
        grid-column: 2;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

}
