.cart-drawer {
    display: flex;
    flex-direction: column;
    height: min(760px, 100dvh);
    max-height: 100dvh;
    overflow: hidden;
}

.cart-head,
.cart-foot {
    flex: 0 0 auto;
}

#cartItems {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 20px;
}

.cart-items {
    display: grid;
    gap: 10px;
}

.cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dfe7df;
    border-radius: 8px;
    background: #fff;
}

.cart-line-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.cart-line-info strong,
.cart-line-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-line-info small {
    color: var(--muted);
}

.cart-line-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd7cc;
    border-radius: 8px;
    overflow: hidden;
}

.cart-quantity button,
.cart-remove {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.cart-quantity button {
    width: 30px;
    height: 30px;
    color: var(--green);
}

.cart-quantity span {
    min-width: 28px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
}

.cart-remove {
    color: #a33;
    font-size: 12px;
    padding: 7px 0 7px 4px;
}

.cart-foot {
    position: relative;
    z-index: 1;
    border-top: 1px solid #dfe7df;
    box-shadow: 0 -10px 24px rgba(23, 34, 28, 0.08);
}

@media (max-width: 600px) {
    .cart-drawer {
        width: min(100%, 420px);
    }

    #cartItems {
        padding: 12px;
    }

    .cart-line {
        align-items: flex-start;
    }

    .cart-line-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
    }
}
/* W5.6-WORLD-CLASS-COMMERCE-JOURNEY */

.w56-cart-foot {
    padding: 0;
    background: #fff;
}

.w56-cart-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px 8px;
}

.w56-cart-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.w56-cart-summary strong {
    font-size: 22px;
    line-height: 1;
}

.w56-cart-note {
    margin: 0;
    padding: 0 20px 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.w56-cart-continue,
.w56-whatsapp-checkout {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.w56-cart-continue {
    padding: 11px 20px;
    border-top: 1px solid #edf1ed;
    border-bottom: 1px solid #edf1ed;
    color: var(--green);
    font-weight: 800;
}

.w56-checkout-section {
    padding: 17px 20px 20px;
}

.w56-checkout-heading {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
}

.w56-checkout-heading span,
.w56-quote-context > span {
    color: var(--green);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
}

.w56-checkout-heading strong {
    font-size: 15px;
}

.w56-checkout-fields {
    display: grid;
    gap: 10px;
}

.w56-checkout-fields label {
    display: grid;
    gap: 5px;
}

.w56-checkout-fields label > span {
    color: #344039;
    font-size: 11px;
    font-weight: 800;
}

.w56-checkout-fields label > span small {
    color: var(--muted);
    font-weight: 500;
}

.w56-checkout-fields input {
    width: 100%;
    min-height: 42px;
    padding: 10px 11px;
    border: 1px solid #d7e0d8;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.w56-checkout-fields input:focus {
    outline: 2px solid rgba(15,81,50,.16);
    border-color: var(--green);
}

.w56-order-submit {
    display: grid;
    gap: 2px;
    margin-top: 14px;
    text-align: center;
}

.w56-order-submit small {
    font-size: 10px;
    font-weight: 500;
    opacity: .84;
}

.w56-order-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.w56-whatsapp-checkout {
    padding: 13px 0 3px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.w56-order-status {
    display: none;
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.w56-order-status:not(:empty) {
    display: block;
}

.w56-order-status.is-working {
    background: #f5f7f5;
    color: #465149;
}

.w56-order-status.is-success {
    background: #edf7f0;
    color: #185b32;
}

.w56-order-status.is-error {
    background: #fff1f0;
    color: #8a2f29;
}

.w56-quote-context {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #dbe7dd;
    border-radius: 10px;
    background: #f7faf7;
}

.w56-quote-context strong {
    font-size: 15px;
}

.w56-quote-context small {
    color: var(--muted);
}

@media (max-width: 600px) {
    .w56-cart-summary {
        padding-left: 16px;
        padding-right: 16px;
    }

    .w56-cart-note {
        padding-left: 16px;
        padding-right: 16px;
    }

    .w56-cart-continue {
        padding-left: 16px;
        padding-right: 16px;
    }

    .w56-checkout-section {
        padding-left: 16px;
        padding-right: 16px;
    }
}
/* W5.6R1-BROWSER-RED-CART-REPAIR
   Neutralise the legacy .cart-foot>div flex rule for the structured
   W5.6 checkout workspace. */
.w56-cart-foot > .w56-checkout-section {
    display: block;
    margin-bottom: 0;
    min-width: 0;
}

.w56-cart-foot > .w56-checkout-section .w56-checkout-heading,
.w56-cart-foot > .w56-checkout-section .w56-checkout-fields,
.w56-cart-foot > .w56-checkout-section .w56-order-submit,
.w56-cart-foot > .w56-checkout-section .w56-whatsapp-checkout,
.w56-cart-foot > .w56-checkout-section .w56-order-status {
    width: 100%;
    min-width: 0;
}

.w56-cart-foot > .w56-checkout-section .w56-checkout-fields label {
    min-width: 0;
}

.w56-cart-foot > .w56-checkout-section .w56-checkout-fields input {
    display: block;
    max-width: 100%;
}
/* W5.6R3-DEDICATED-CHECKOUT-JOURNEY */

.w56r3-cart-foot {
    display: block;
}

.w56r3-checkout-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    margin-top: 14px;
    padding: 15px 18px;
    text-decoration: none;
}

.w56r3-checkout-cta span {
    font-weight: 800;
}

.w56r3-checkout-cta small {
    font-size: 12px;
    font-weight: 500;
    opacity: .8;
}

.w56r3-checkout-main {
    background: #f7f8f5;
}

.w56r3-checkout-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 28px 34px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.w56r3-checkout-hero h1 {
    max-width: 680px;
    margin: 10px 0 14px;
    font-size: clamp(32px, 3vw, 42px);
    line-height: 1.08;
}

.w56r3-checkout-hero p {
    max-width: 680px;
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
}

.w56r3-back-shop,
.w56r3-edit-cart {
    color: #0f6b46;
    font-weight: 800;
    text-decoration: none;
}

.w56r3-checkout-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px 80px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
    gap: 32px;
    align-items: start;
}

.w56r3-checkout-details,
.w56r3-order-summary {
    background: #fff;
    border: 1px solid #dde3dc;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(21,38,29,.07);
}

.w56r3-checkout-details {
    padding: 32px;
}

.w56r3-order-summary {
    position: sticky;
    top: 96px;
    padding: 28px;
}

.w56r3-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 26px;
}

.w56r3-section-heading > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #e9f3ed;
    color: #0f6b46;
    font-weight: 900;
}

.w56r3-section-heading small {
    display: block;
    margin-bottom: 5px;
    color: #0f6b46;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
}

.w56r3-section-heading h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.2;
}

.w56r3-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.w56r3-fields label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
}

.w56r3-fields label:last-child {
    grid-column: 1 / -1;
}

.w56r3-fields label > span {
    font-size: 13px;
}

.w56r3-fields label small {
    font-weight: 500;
}

.w56r3-fields input {
    width: 100%;
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #cfd8d1;
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

.w56r3-fields input:focus {
    outline: 3px solid rgba(15,107,70,.12);
    border-color: #0f6b46;
}

.w56r3-fulfilment-note {
    margin: 24px 0;
    padding: 17px 18px;
    border-radius: 12px;
    background: #f2f6f2;
}

.w56r3-fulfilment-note strong {
    display: block;
    margin-bottom: 4px;
}

.w56r3-fulfilment-note p {
    margin: 0;
    line-height: 1.55;
}

.w56r3-submit {
    width: 100%;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.w56r3-submit span {
    font-weight: 900;
}

.w56r3-submit small {
    font-weight: 500;
    opacity: .8;
}

.w56r3-whatsapp {
    width: 100%;
    margin-top: 10px;
}

.w56r3-summary-items {
    display: grid;
    gap: 0;
}

.w56r3-summary-line {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 20px;
    padding: 17px 0;
    border-bottom: 1px solid #e5e9e5;
}

.w56r3-summary-line > div:first-child {
    min-width: 0;
}

.w56r3-summary-line strong,
.w56r3-summary-line small {
    display: block;
}

.w56r3-summary-line small {
    margin-top: 4px;
    color: #667168;
}

.w56r3-summary-line-meta {
    text-align: right;
    white-space: nowrap;
}

.w56r3-summary-line-meta span {
    display: block;
    margin-bottom: 5px;
    color: #667168;
    font-size: 12px;
}

.w56r3-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 22px 0 10px;
}

.w56r3-summary-total span {
    color: #667168;
    font-weight: 700;
}

.w56r3-summary-total strong {
    font-size: 26px;
}

.w56r3-summary-note {
    margin: 4px 0 20px;
    color: #667168;
    font-size: 13px;
    line-height: 1.55;
}

.w56r3-empty-checkout {
    padding: 22px 0;
}

.w56r3-empty-checkout p {
    color: #667168;
}

.w56r3-empty-checkout a {
    color: #0f6b46;
    font-weight: 800;
}

@media (max-width: 900px) {
    .w56r3-checkout-hero {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 40px;
    }

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

    .w56r3-order-summary {
        position: static;
        order: -1;
    }
}

@media (max-width: 620px) {
    .w56r3-checkout-hero,
    .w56r3-checkout-shell {
        padding-left: 18px;
        padding-right: 18px;
    }

    .w56r3-checkout-hero {
        padding-top: 28px;
    }

    .w56r3-checkout-hero h1 {
        font-size: 30px;
        line-height: 1.1;
    }

    .w56r3-checkout-details,
    .w56r3-order-summary {
        padding: 20px;
        border-radius: 14px;
    }

    .w56r3-fields {
        grid-template-columns: 1fr;
    }

    .w56r3-fields label:last-child {
        grid-column: auto;
    }

    .w56r3-summary-line {
        gap: 12px;
    }
}
/* W5.6R4-CART-REVIEW-DRAWER
   Content-driven cart review workspace.
   Preserve scrolling for genuinely long baskets without forcing
   short baskets to occupy the full viewport height. */

.cart-drawer {
    height: auto;
    max-height: 100dvh;
}

#cartItems {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(360px, calc(100dvh - 250px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cart-line {
    align-items: flex-start;
}

.cart-line-info {
    flex: 1 1 auto;
    min-width: 0;
}

.cart-line-info strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.3;
}

.cart-line-info small {
    white-space: normal;
    line-height: 1.35;
}

.w56-continue-shopping {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 20px;
    border: 0;
    border-top: 1px solid #edf1ed;
    border-bottom: 1px solid #edf1ed;
    background: #fff;
    color: var(--green);
    font: inherit;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    appearance: none;
}

.w56-continue-shopping:hover,
.w56-continue-shopping:focus-visible {
    background: #f5f8f5;
}

.w56r3-cart-foot {
    padding-bottom: 0;
}

.w56r3-cart-foot .w56r3-checkout-cta {
    margin: 14px 12px 12px;
    width: calc(100% - 24px);
}

@media (max-width: 600px) {
    #cartItems {
        max-height: min(42dvh, 320px);
    }

    .w56-continue-shopping {
        padding-left: 16px;
        padding-right: 16px;
    }

    .w56r3-cart-foot .w56r3-checkout-cta {
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
    }
}