.cart-page {
    padding-block: 20px 48px;
}

.cart-page .store-crumbs,
.cart-desktop {
    display: none;
}

.cart-page h1 {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 600;
}

.cart-intro {
    margin-top: 12px;
}

.cart-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--sage);
}

.cart-layout {
    display: grid;
    gap: 28px;
    align-items: start;
    margin-top: 28px;
}

.cart-main,
.cart-side {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.cart-page h2 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

.cart-items-heading,
.cart-summary-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.cart-items-heading span {
    font-size: 13px;
    white-space: nowrap;
}

.cart-items {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 44px;
    grid-template-areas: 'photo copy copy' 'photo price remove';
    align-items: start;
    gap: 4px 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--df-glass);
}

.cart-thumb {
    grid-area: photo;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--sage);
}

.cart-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-thumb span {
    padding: 4px;
    text-align: center;
    font-size: 12px;
}

.cart-item-copy {
    grid-area: copy;
    display: grid;
    gap: 6px;
    justify-items: start;
    min-width: 0;
}

.cart-item h3 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.cart-item-name-price {
    display: grid;
    gap: 8px;
}

.cart-item-copy a[href]:hover {
    text-decoration: underline;
}

.cart-item-copy p,
.cart-summary .store-muted {
    font-size: 13px;
}

.cart-item .quantity-stepper {
    min-height: 44px;
    padding-inline: 0;
    gap: 0;
}

.cart-item .quantity-stepper button,
.cart-item .cart-remove {
    width: 44px;
    height: 44px;
}

.cart-item-total {
    grid-area: price;
    align-self: center;
    font-weight: 500;
}

.cart-item .cart-remove {
    grid-area: remove;
    justify-self: end;
    align-self: end;
}

.cart-additions {
    display: grid;
    gap: 16px;
}

.cart-addition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cart-addition-grid .store-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
}

.cart-addition-grid .store-card > a {
    flex: 1;
    height: auto;
}

.cart-addition-grid .store-card-image {
    aspect-ratio: 1;
}

.cart-addition-grid .store-card-copy {
    padding: 12px;
}

.cart-addition-grid .cart-add {
    margin: 0 12px 12px;
    width: calc(100% - 24px);
    padding-inline: 8px;
}

.cart-summary {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--df-soft);
}

.cart-benefits {
    display: grid;
    gap: 12px;
    padding-block: 10px 16px;
    border-block: 1px solid var(--line);
}

.cart-benefits > p,
.cart-delivery-note {
    font-size: 13px;
    line-height: 18px;
}

.cart-promo > summary,
.cart-bonus {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 12px;
}

.cart-promo > summary {
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.cart-promo > summary::-webkit-details-marker {
    display: none;
}

.cart-promo > summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
}

.cart-promo[open] > summary::after {
    content: '−';
}

.cart-promo > form,
.cart-delivery-note {
    display: grid;
    gap: 8px;
}

.cart-bonus {
    opacity: .65;
}

.cart-bonus input {
    appearance: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 1px solid var(--green);
    border-radius: 6px;
}

.cart-summary-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.cart-summary-list dd {
    margin: 0;
    text-align: right;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 18px;
}

.cart-total strong {
    font-size: 24px;
    font-weight: 500;
    text-align: right;
}

.cart-summary .cart-checkout {
    width: 100%;
    padding-inline: 12px;
}

.cart-continue {
    display: inline-flex;
    justify-self: start;
    gap: 8px;
    align-items: center;
    min-height: 44px;
}

.cart-continue:hover {
    text-decoration: underline;
}

.cart-empty {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 16px;
    min-height: 360px;
    text-align: center;
}

.cart-empty .df-button {
    width: min(100%, 280px);
}

@media (max-width: 1023px) {
    .cart-page h1 {
        font-size: 28px;
        font-weight: 400;
        line-height: 36px;
    }

    .cart-page .cart-intro {
        display: none;
    }

    .cart-layout {
        margin-top: 8px;
    }

    .cart-main {
        gap: 32px;
    }

    .cart-item {
        grid-template-columns: 84px minmax(0, 1fr) 44px;
        grid-template-rows: auto 1fr auto;
        grid-template-areas: 'photo price price' 'photo copy copy' 'stepper stepper remove';
        gap: 12px;
        padding: 16px;
        border: 0;
        border-radius: 14px;
        background: var(--df-soft);
    }

    .cart-thumb {
        aspect-ratio: 3 / 4;
    }

    .cart-item-copy {
        display: contents;
    }

    .cart-item-name-price {
        grid-area: copy;
    }

    .cart-item-total {
        align-self: start;
        font-size: 20px;
        line-height: 28px;
    }

    .cart-item .quantity-stepper {
        grid-area: stepper;
        justify-self: start;
        min-width: 156px;
        border: 0;
        border-radius: 14px;
        background: var(--porcelain);
    }

    .cart-sticky {
        position: fixed;
        z-index: 10;
        inset: auto 0 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(64%, 230px);
        align-items: center;
        gap: 12px;
        min-height: 105px;
        padding: 12px var(--page-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
        background: var(--porcelain);
        border-top: 1px solid var(--line);
    }

    .cart-sticky-total {
        display: grid;
        gap: 4px;
        font-size: 12px;
    }

    .cart-sticky-total strong {
        font-size: 20px;
        font-weight: 500;
        line-height: 24px;
    }

    .cart-sticky .df-button {
        width: 100%;
        padding-inline: 8px;
    }

    #cart-checkout {
        scroll-margin-top: 16px;
    }
}

@media (min-width: 1024px) {
    .cart-page {
        padding-block: 40px 80px;
    }

    .cart-page .store-crumbs {
        display: flex;
    }

    .cart-page h1 {
        font-size: 56px;
        line-height: 68px;
    }

    .cart-intro {
        margin-top: 24px;
    }

    .cart-layout {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas: 'items summary' 'additions summary';
        gap: 32px clamp(28px, 3.34vw, 48px);
        margin-top: 64px;
    }

    .cart-main {
        grid-area: items;
        gap: 32px;
    }

    .cart-side {
        grid-area: summary;
    }

    .cart-additions {
        grid-area: additions;
    }

    .cart-sticky {
        display: none;
    }

    .cart-desktop {
        display: inline;
    }

    .cart-mobile {
        display: none;
    }

    .cart-page h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .cart-items {
        gap: 16px;
    }

    .cart-item {
        grid-template-columns: clamp(92px, 9.45vw, 136px) minmax(0, 1fr) auto;
        grid-template-areas: 'photo copy price' 'photo copy remove';
        padding: 24px;
        gap: 8px 24px;
        border-radius: 26px;
    }

    .cart-thumb {
        border-radius: 26px;
    }

    .cart-item h3,
    .cart-item-total {
        font-size: clamp(18px, 1.67vw, 24px);
    }

    .cart-item-total {
        align-self: start;
    }

    .cart-item-copy {
        gap: 12px;
    }

    .cart-item .quantity-stepper {
        min-height: 60px;
        padding-inline: 10px;
    }

    .cart-addition-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(16px, 3.34vw, 48px);
    }

    .cart-addition-grid .store-card {
        border-radius: 30px;
    }

    .cart-summary {
        padding: clamp(20px, 2.23vw, 32px);
        border-radius: 36px;
        gap: 24px;
    }

    .cart-delivery-note {
        margin-top: -14px;
    }

    .cart-total {
        display: grid;
        gap: 4px;
        border-top: 1px solid var(--line);
        padding-top: 24px;
    }

    .cart-total strong {
        font-size: 32px;
        text-align: left;
    }

    .cart-summary .cart-checkout {
        min-height: 60px;
    }

    .cart-empty {
        min-height: 555px;
        gap: 24px;
    }

    .cart-empty h2 {
        font-size: 32px;
        line-height: 40px;
    }
}
