.commerce-page {
    clear: both;
    background: #f6f8f6;
    padding: 34px 0 70px;
}

.commerce-container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.commerce-messages {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

.commerce-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: 5px;
    line-height: 1.55;
}

.commerce-alert > i { margin-top: 4px; }
.commerce-alert.is-success { background: #e7f6ec; border-color: #c7e8d2; color: #126332; }
.commerce-alert.is-error { background: #fdeaea; border-color: #f3c9c9; color: #9f2323; }
.commerce-alert.is-warning { background: #fff7df; border-color: #f0dfaa; color: #755800; }
.commerce-alert.is-info { background: #eaf4f0; border-color: #cfe3da; color: #245d47; }

.commerce-button,
.physical-cart-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid #087d3e;
    border-radius: 4px;
    background: #087d3e;
    color: #fff;
    padding: 10px 18px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
}

.commerce-button:hover,
.commerce-button:focus,
.physical-cart-form button:hover,
.physical-cart-form button:focus { background: #066b35; border-color: #066b35; color: #fff; }
.commerce-button.is-secondary,
.physical-cart-form button.is-secondary { background: #34424d; border-color: #34424d; }
.commerce-button.is-block { width: 100%; }
.commerce-button.is-outline-danger { background: #fff; border-color: #c84c4c; color: #a72f2f; }
.commerce-button.is-outline-danger:hover,
.commerce-button.is-outline-danger:focus { background: #fff1f1; border-color: #a72f2f; color: #8f2222; }

.commerce-empty {
    border: 1px solid #dce4dd;
    border-top: 3px solid #087d3e;
    border-radius: 5px;
    background: #fff;
    padding: 65px 20px;
    text-align: center;
}

.commerce-empty > i { color: #087d3e; font-size: 52px; }

.commerce-cart-layout,
.commerce-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.35fr) minmax(290px, .85fr);
    align-items: start;
    gap: 28px;
}

.commerce-cart-table-wrap {
    overflow: hidden;
    border: 1px solid #d8e0da;
    border-top: 3px solid #087d3e;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(20, 55, 35, .06);
}

.commerce-cart-table {
    width: 100%;
    float: none;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.commerce-cart-table th {
    background: #eef5f0;
    color: #27553b;
    padding: 13px 12px;
    border-bottom: 2px solid #087d3e;
    font-size: 14px;
    text-align: left;
}

.commerce-cart-table th:first-child { width: 48%; }
.commerce-cart-table th:nth-child(2) { width: 13%; }
.commerce-cart-table th:nth-child(3) { width: 17%; }
.commerce-cart-table th:nth-child(4) { width: 14%; }
.commerce-cart-table th:last-child { width: 8%; text-align: center; }

.commerce-cart-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #e4e9e5;
    color: #27312b;
    vertical-align: middle;
}

.commerce-cart-table tbody tr:last-child td { border-bottom: 0; }
.commerce-cart-table tbody tr:hover { background: #fbfdfb; }
.commerce-cart-table tr.is-unavailable { background: #fafafa; opacity: .8; }

.commerce-book-cell {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.commerce-cart-cover {
    width: 84px;
    height: 112px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid #dce4dd;
    border-radius: 3px;
    background: #eef4ef;
}

.commerce-cart-cover img { width: 100%; height: 100%; object-fit: cover; }
.commerce-cart-cover i { color: #758078; font-size: 34px; }
.commerce-cart-copy { min-width: 0; }
.commerce-cart-copy h2 { margin: 0 0 8px; color: #06743a; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.commerce-cart-copy p { margin: 0; color: #505953; font-size: 14px; line-height: 1.45; }
.commerce-cart-copy p span { font-weight: 600; }

.commerce-quantity-form {
    display: inline-flex;
    align-items: stretch;
    max-width: 116px;
}

.commerce-quantity-form input {
    width: 66px;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #bfc8c1;
    border-radius: 4px 0 0 4px;
    padding: 8px;
    text-align: center;
}

.commerce-quantity-form button {
    width: 40px;
    border: 1px solid #087d3e;
    border-radius: 0 4px 4px 0;
    background: #087d3e;
    color: #fff;
    cursor: pointer;
}

.commerce-line-total { color: #087d3e; white-space: nowrap; }
.commerce-remove-cell { text-align: center; }
.commerce-remove-cell form { margin: 0; }

.commerce-icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid #e5b9b9;
    border-radius: 50%;
    background: #fff5f5;
    color: #aa3030;
    cursor: pointer;
}

.commerce-icon-button:hover,
.commerce-icon-button:focus { background: #aa3030; border-color: #aa3030; color: #fff; }

.commerce-summary {
    position: sticky;
    top: 18px;
    align-self: start;
    overflow: hidden;
    border: 1px solid #d8e0da;
    border-top: 3px solid #087d3e;
    border-radius: 5px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 3px 14px rgba(20, 55, 35, .08);
}

.commerce-summary h2 { margin: 0 0 20px; color: #087d3e; font-size: 25px; }
.commerce-summary-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid #e2e7e3; border-bottom: 1px solid #e2e7e3; }
.commerce-summary-total strong { color: #087d3e; font-size: 20px; white-space: nowrap; }
.commerce-summary-note { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 22px; color: #5a625d; line-height: 1.55; }
.commerce-summary-note i { margin-top: 4px; color: #087d3e; }
.commerce-summary-actions { display: grid; gap: 11px; }
.commerce-summary-actions a,
.commerce-summary-actions form,
.commerce-summary-actions button { width: 100%; margin: 0; }

.commerce-checkout-summary h2 { margin-bottom: 18px; }
.commerce-checkout-count { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #4b554f; line-height: 1.45; }
.commerce-checkout-count i { color: #087d3e; }
.commerce-checkout-summary .commerce-summary-total { margin: 0; }
.commerce-checkout-summary .commerce-summary-note { margin-bottom: 18px; }
.commerce-checkout-edit { display: inline-flex; align-items: center; gap: 7px; color: #087d3e; font-weight: 600; text-decoration: none; }
.commerce-checkout-edit:hover,
.commerce-checkout-edit:focus { color: #066b35; text-decoration: underline; }
.commerce-quote-breakdown { margin: 0; }
.commerce-quote-breakdown > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid #e2e7e3; }
.commerce-quote-breakdown dt { color: #4b554f; font-weight: 500; }
.commerce-quote-breakdown dd { margin: 0; color: #202722; font-weight: 600; white-space: nowrap; }
.commerce-quote-breakdown .is-total { border-bottom: 1px solid #e2e7e3; padding: 14px 0; }
.commerce-quote-breakdown .is-total dt,
.commerce-quote-breakdown .is-total dd { color: #087d3e; font-size: 18px; font-weight: 700; }

.commerce-field-error { display: block; margin-top: 5px; color: #b3261e; font-size: 13px; }

.commerce-checkout-form {
    border: 1px solid #dce4dd;
    border-top: 3px solid #087d3e;
    border-radius: 5px;
    background: #fff;
    padding: 24px;
}

.commerce-checkout-form fieldset { border: 0; border-top: 1px solid #dce4dd; margin: 0 0 25px; padding: 22px 0 0; }
.commerce-checkout-form legend { padding-right: 12px; color: #087d3e; font-size: 20px; font-weight: 600; }
.commerce-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.commerce-form-grid label { font-weight: 600; }
.commerce-form-grid label.is-wide { grid-column: 1 / -1; }
.commerce-form-grid input,
.commerce-form-grid select { display: block; width: 100%; box-sizing: border-box; margin-top: 7px; border: 1px solid #bfc8c1; border-radius: 3px; background: #fff; padding: 11px; }
.commerce-check { display: block; margin: 16px 0; font-weight: 600; }

.commerce-checkout-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    margin: 0 0 26px;
    border: 1px solid #d8e0da;
    border-top: 3px solid #087d3e;
    border-radius: 5px;
    background: #fff;
}

.commerce-checkout-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 18px 14px 16px;
    color: #8a928d;
    text-align: center;
}

.commerce-checkout-step:not(:last-child)::after { content: ''; position: absolute; top: 34px; left: calc(50% + 28px); width: calc(100% - 56px); height: 2px; background: #dfe5e1; }
.commerce-step-number { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #cfd7d1; border-radius: 50%; background: #fff; font-weight: 700; }
.commerce-checkout-step strong { color: inherit; font-size: 15px; }
.commerce-checkout-step small { font-size: 12px; }
.commerce-checkout-step.is-current { color: #087d3e; box-shadow: inset 0 -3px #087d3e; }
.commerce-checkout-step.is-current .commerce-step-number { border-color: #087d3e; background: #087d3e; color: #fff; }
.commerce-checkout-step.is-complete { color: #397653; }
.commerce-checkout-step.is-complete .commerce-step-number { border-color: #79aa8d; background: #e8f5ed; color: #087d3e; }
.commerce-checkout-step.is-complete::after { background: #79aa8d; }

.commerce-stage-card {
    overflow: hidden;
    border: 1px solid #d8e0da;
    border-top: 3px solid #087d3e;
    border-radius: 5px;
    background: #fff;
    padding: 26px;
    box-shadow: 0 3px 14px rgba(20, 55, 35, .06);
}

.commerce-stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.commerce-stage-heading h2 { margin: 3px 0 0; color: #087d3e; font-size: 25px; }
.commerce-stage-heading a { color: #087d3e; font-weight: 600; }
.commerce-stage-kicker { color: #68716b; font-size: 13px; font-weight: 600; }
.commerce-shipping-service { display: flex; align-items: center; gap: 9px; max-width: 52%; color: #435048; text-align: right; }
.commerce-shipping-service i { color: #087d3e; }

.commerce-review-table-wrap { overflow-x: auto; border: 1px solid #d8e0da; border-radius: 4px; }
.commerce-review-table { width: 100%; float: none; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; }
.commerce-review-table th { padding: 14px; border-bottom: 2px solid #087d3e; background: #eef5f0; color: #27553b; text-align: left; }
.commerce-review-table td { padding: 15px 14px; border-bottom: 1px solid #e4e9e5; color: #27312b; vertical-align: middle; }
.commerce-review-table tbody tr:last-child td { border-bottom: 0; }
.commerce-review-table th:first-child { width: 52%; }
.commerce-review-table th:not(:first-child),
.commerce-review-table td:not(:first-child) { text-align: center; }

.commerce-stage-summary,
.commerce-final-summary { width: min(430px, 100%); margin: 20px 0 0 auto; }
.commerce-stage-summary > div,
.commerce-final-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 11px 14px; border-bottom: 1px solid #dce3de; }
.commerce-stage-summary .is-total,
.commerce-final-summary .is-total { border-top: 2px solid #087d3e; border-bottom: 0; color: #087d3e; font-size: 19px; }
.commerce-stage-summary strong,
.commerce-final-summary strong { white-space: nowrap; }
.commerce-stage-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 30px; }
.commerce-stage-actions form { margin: 0; }
.commerce-stage-actions .commerce-button { min-width: 190px; }
.commerce-button:disabled { border-color: #aab3ad; background: #aab3ad; color: #f7f8f7; cursor: not-allowed; }

.commerce-contact-review { margin-bottom: 24px; padding: 20px; border: 1px solid #dce4dd; border-radius: 4px; background: #fbfdfb; }
.commerce-contact-review .commerce-stage-heading { margin-bottom: 16px; }
.commerce-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.commerce-contact-grid > div { display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }
.commerce-contact-grid i { color: #087d3e; }
.commerce-contact-grid address { grid-column: 1 / -1; margin: 4px 0 0; color: #3f4943; font-style: normal; line-height: 1.65; }
.commerce-payment-boundary { display: flex; align-items: flex-start; gap: 9px; width: min(610px, 100%); margin: 24px 0 0 auto; color: #5b655e; line-height: 1.55; }
.commerce-payment-boundary i { margin-top: 4px; color: #087d3e; }

.physical-cart-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.physical-cart-form input { width: 72px; border: 1px solid #c8d2ca; border-radius: 4px; padding: 10px; }

@media (max-width: 980px) {
    .commerce-cart-layout,
    .commerce-checkout-layout { grid-template-columns: 1fr; }
    .commerce-summary { position: static; }
}

@media (max-width: 720px) {
    .commerce-page { padding-top: 24px; }
    .commerce-cart-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .commerce-cart-table,
    .commerce-cart-table tbody,
    .commerce-cart-table tr,
    .commerce-cart-table td { display: block; width: 100%; box-sizing: border-box; }
    .commerce-cart-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .commerce-cart-table tr { margin-bottom: 16px; overflow: hidden; border: 1px solid #d8e0da; border-top: 3px solid #087d3e; border-radius: 5px; background: #fff; }
    .commerce-cart-table td { display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid #e7ebe8; text-align: right; }
    .commerce-cart-table td::before { content: attr(data-label); color: #526158; font-size: 13px; font-weight: 600; text-align: left; }
    .commerce-cart-table td:first-child { display: block; text-align: left; }
    .commerce-cart-table td:first-child::before { display: none; }
    .commerce-cart-table td:last-child { border-bottom: 0; }
    .commerce-book-cell { grid-template-columns: 72px minmax(0, 1fr); }
    .commerce-cart-cover { width: 72px; height: 96px; }
    .commerce-quantity-form { justify-self: end; }
    .commerce-remove-cell form { justify-self: end; }
    .commerce-form-grid { grid-template-columns: 1fr; }
    .commerce-form-grid label.is-wide { grid-column: auto; }
    .commerce-summary { padding: 20px; }
    .commerce-checkout-step { padding: 14px 6px 12px; }
    .commerce-checkout-step:not(:last-child)::after { display: none; }
    .commerce-checkout-step strong { font-size: 12px; }
    .commerce-checkout-step small { display: none; }
    .commerce-stage-card { padding: 18px 14px; }
    .commerce-stage-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .commerce-shipping-service { max-width: none; text-align: left; }
    .commerce-review-table-wrap { overflow: visible; border: 0; }
    .commerce-review-table,
    .commerce-review-table tbody,
    .commerce-review-table tr,
    .commerce-review-table td { display: block; width: 100%; box-sizing: border-box; }
    .commerce-review-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .commerce-review-table tr { margin-bottom: 14px; border: 1px solid #d8e0da; border-top: 3px solid #087d3e; border-radius: 4px; }
    .commerce-review-table td,
    .commerce-review-table td:not(:first-child) { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(0, 1.2fr); gap: 10px; padding: 10px 12px; text-align: right; }
    .commerce-review-table td::before { content: attr(data-label); color: #526158; font-size: 12px; font-weight: 600; text-align: left; }
    .commerce-stage-actions { flex-direction: column-reverse; }
    .commerce-stage-actions form,
    .commerce-stage-actions .commerce-button { width: 100%; }
    .commerce-contact-grid { grid-template-columns: 1fr; }
    .commerce-contact-grid address { grid-column: auto; }
}
