.woocommerce-cart .woocommerce table.cart td.product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: auto;
    height: auto;
    min-width: 44px;
    min-height: 44px;
    padding: .5rem .7rem;
    border: 1px solid #e3c9c2;
    border-radius: .6rem;
    box-sizing: border-box;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    opacity: 1;
    color: #963a2b !important;
    background: #fffaf8;
}

/* Keep the native desktop table. Astra's stacked cart becomes booking cards. */
@media (max-width: 921px) {
    .woocommerce-cart.amp-view-cart .amp-main {
        padding-top: .8rem;
    }

    .woocommerce-cart .amp-cart-page .amp-trail {
        margin-bottom: .4rem;
    }

    .amp-cart-page .amp-cart-heading {
        align-items: center;
        gap: .4rem .6rem;
        margin-bottom: .8rem;
    }

    .amp-cart-page .amp-cart-heading h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .amp-cart-heading p,
    .woocommerce-cart .woocommerce .aj-journey-note {
        display: none;
    }

    .amp-cart-heading .amp-cart-continue {
        min-height: 44px;
        padding: .5rem .65rem;
        font-size: 13px;
    }

    .woocommerce-cart .woocommerce-cart-form:has(tr.ajb-cart-booking):not(:has(tr.cart_item:not(.ajb-cart-booking))) {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) {
        display: block;
        width: 100%;
        border: 0;
        border-spacing: 0;
        border-collapse: separate;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) > tbody {
        display: block;
        width: 100%;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) tr:has(> td.actions) {
        display: block;
        width: 100%;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) td.actions {
        display: flow-root !important;
        width: 100%;
        margin: 0;
        padding: 0 0 12px !important;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) td.actions .coupon {
        display: flex;
        float: none;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 0;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) .coupon :is(.input-text, .button) {
        float: none;
        flex: 1 1 130px;
        width: auto !important;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        box-sizing: border-box;
        line-height: 1.35;
        white-space: normal;
    }

    .woocommerce-cart .woocommerce table.cart:has(tr.ajb-cart-booking) .coupon .input-text {
        font-size: 16px;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        margin: 0 0 .75rem;
        padding: 12px;
        border: 1px solid var(--amp-line, #dce4db);
        border-radius: 12px;
        background: #fff;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1.45;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking > td {
        width: auto;
        margin: 0;
        padding: 0 !important;
        border: 0;
        background: transparent;
        box-sizing: border-box;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking > td.product-name {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: start !important;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking > td.product-name::before {
        content: none;
        display: none;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking .ast-product-image,
    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking .ast-product-name {
        display: block;
        margin: 0;
        padding: 0;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking :is(.ast-product-name > a, td.product-name > a) {
        display: block;
        color: var(--amp-ink, #18322c);
        font-size: 16px;
        font-weight: 700;
        line-height: 1.35;
        text-decoration: none;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking td.product-name dl.variation {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        gap: 4px 12px;
        margin: 10px 0 0;
        padding: 0;
        font-size: 13px;
        line-height: 1.4;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation :is(dt, dd) {
        float: none;
        clear: none;
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation dt {
        grid-column: 1;
        font-weight: 400;
        color: var(--amp-muted, #52635e);
        text-align: start;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation dd {
        grid-column: 2;
        text-align: end;
        overflow-wrap: anywhere;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation dd p {
        margin: 0;
        padding: 0;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation dt:has(+ dd :is(.ajb-cart-selection, .ajb-cart-confirmation, .ajb-cart-edit)) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation dd:has(:is(.ajb-cart-selection, .ajb-cart-confirmation, .ajb-cart-edit, .ajb-cart-payable)) {
        grid-column: 1 / -1;
        text-align: start;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking .ajb-cart-date {
        font-weight: 650;
        color: var(--amp-ink, #18322c);
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking .ajb-cart-selection {
        display: block;
        margin: 3px 0;
        font-size: 14px;
        line-height: 1.45;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking .ajb-cart-confirmation {
        display: inline-block;
        margin-bottom: 4px;
        padding: 3px 7px;
        border-radius: 5px;
        background: var(--amp-soft, #eef5f1);
        color: var(--amp-accent, #135647);
        font-size: 12px;
        line-height: 1.35;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking dl.variation dd:has(a.ajb-cart-edit) {
        margin-top: 6px;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking a.ajb-cart-edit {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
        min-height: 44px;
        padding: 9px 12px;
        border: 1px solid var(--amp-accent, #135647);
        border-radius: 8px;
        background: var(--amp-soft, #eef5f1);
        color: var(--amp-accent, #135647);
        box-sizing: border-box;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.35;
        text-align: center;
        text-decoration: none;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking a.ajb-cart-edit::before {
        content: "";
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5 4 4M4 20l5-1L20 8a2.8 2.8 0 0 0-4-4L5 15l-1 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5 4 4M4 20l5-1L20 8a2.8 2.8 0 0 0-4-4L5 15l-1 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking a.ajb-cart-edit:hover {
        background: var(--amp-accent, #135647);
        color: #fff;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking a.ajb-cart-edit:focus-visible {
        outline: 2px solid var(--amp-accent, #135647);
        outline-offset: 3px;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking :is(td.product-price, td.product-quantity) {
        display: none !important;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking > td.product-subtotal {
        display: flex !important;
        flex-direction: column;
        align-items: start;
        justify-content: center;
        gap: 1px;
        grid-column: 1;
        grid-row: 2;
        margin-top: 10px;
        padding-top: 10px !important;
        border-top: 1px solid var(--amp-line, #dce4db);
        color: var(--amp-ink, #18322c);
        font-size: 18px;
        font-weight: 700;
        line-height: 1.35;
        text-align: start !important;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking > td.product-subtotal::before {
        content: attr(data-title);
        float: none;
        color: var(--amp-muted, #52635e);
        font-size: 12px;
        font-weight: 400;
    }

    .woocommerce-cart .woocommerce table.cart tr.ajb-cart-booking > td.product-remove {
        display: flex !important;
        align-items: center;
        justify-content: end;
        grid-column: 2;
        grid-row: 2;
        margin-top: 10px;
        padding-top: 10px !important;
        border-top: 1px solid var(--amp-line, #dce4db);
    }

    .woocommerce-cart .woocommerce .ajb-resume-order {
        margin-bottom: .75rem;
        padding: 12px 14px;
        font-size: 14px;
        line-height: 1.4;
    }

    .woocommerce-cart .woocommerce .ajb-resume-order::before {
        display: none;
    }

    .woocommerce-cart .woocommerce .ajb-resume-order p {
        margin: 0 0 7px;
    }

    .woocommerce-cart .woocommerce .ajb-resume-order ul {
        margin: 7px 0;
        padding-inline-start: 16px;
    }

    .woocommerce-cart .woocommerce .ajb-resume-order .button {
        min-height: 44px;
        margin: 0;
        padding: 10px 14px;
        box-sizing: border-box;
        font-size: 14px;
    }
}

.woocommerce-cart .woocommerce table.cart td.product-remove a.remove::before {
    content: none;
    display: none;
}

.woocommerce-cart .woocommerce table.cart td.product-remove a.remove .amp-icon {
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
}

.woocommerce-cart .woocommerce table.cart td.product-remove a.remove:hover {
    color: #fff !important;
    background: #963a2b;
    border-color: #963a2b;
}

.woocommerce-cart .woocommerce table.cart td.product-remove a.remove:focus-visible {
    outline: 2px solid var(--amp-accent, #135647);
    outline-offset: 3px;
}

/* Astra stacks the cart at this breakpoint and hides thumbnail images. */
@media (max-width: 921px) {
    .woocommerce-cart .woocommerce table.cart td.product-remove {
        width: auto;
        padding: .25rem .45rem .4rem;
        border: 0;
        text-align: end;
    }

    .woocommerce-cart .woocommerce table.cart td.product-thumbnail {
        display: none !important;
    }
}

