.cart-main {
    width: min(100% - 64px, 1180px);
    margin: 0 auto;
    padding: 67px 0 96px;
}

.cart-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 40px;
    animation: rise-in .6s both var(--ease-out);
}

.cart-heading h1 {
    margin: 13px 0 0;
    font-size: clamp(3rem, 6vw, 5.7rem);
    font-weight: 600;
    letter-spacing: -.085em;
    line-height: .95;
}

.cart-heading h1 em {
    color: #7f9a52;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: .85em;
    font-weight: 500;
    letter-spacing: -.075em;
}

.cart-line-count {
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: rgba(255, 255, 255, .52);
    color: #69776e;
    font-size: .77rem;
    font-weight: 700;
    white-space: nowrap;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(290px, .8fr);
    align-items: start;
    gap: 30px;
}

.cart-items-panel {
    min-width: 0;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.cart-item {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 16px;
    border: 1px solid rgba(226, 231, 222, .9);
    border-radius: 20px;
    background: rgba(255, 255, 252, .82);
    box-shadow: 0 8px 28px rgba(31, 47, 38, .035);
    animation: rise-in .45s both var(--ease-out);
    transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s ease;
}

.cart-item:hover {
    border-color: #d6dfcb;
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.cart-item-image {
    width: 130px;
    height: 130px;
    border-radius: 14px;
    background: #e6e9df;
    object-fit: cover;
}

.cart-item-info {
    align-self: center;
}

.cart-item-category {
    margin: 0 0 7px;
    color: #899487;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.cart-item-name {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -.04em;
}

.cart-item-unit-price {
    margin: 7px 0 0;
    color: #7e897f;
    font-size: .79rem;
}

.cart-item-right {
    display: flex;
    min-width: 100px;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.cart-item-total {
    color: #314137;
    font-size: .94rem;
    font-weight: 700;
    white-space: nowrap;
}

.quantity-control {
    display: inline-flex;
    height: 35px;
    align-items: center;
    gap: 5px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fbfcf8;
}

.quantity-control button {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #536158;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background .2s ease, color .2s ease;
}

.quantity-control button:hover:not(:disabled) {
    background: var(--lime);
    color: var(--ink);
}

.quantity-control button:disabled {
    color: #b7c0b6;
    cursor: not-allowed;
}

.quantity-value {
    min-width: 22px;
    color: var(--ink);
    font-size: .76rem;
    font-weight: 700;
    text-align: center;
}

.remove-item {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a958c;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color .2s ease, text-decoration-color .2s ease;
}

.remove-item:hover {
    color: #b36d51;
    text-decoration-color: currentColor;
}

.order-summary {
    position: sticky;
    top: 106px;
    padding: 27px;
    border: 1px solid rgba(222, 228, 218, .8);
    border-radius: 22px;
    background: rgba(255, 255, 251, .88);
    box-shadow: var(--shadow-soft);
    animation: rise-in .65s .12s both var(--ease-out);
}

.order-summary h2 {
    margin: 12px 0 25px;
    font-size: 1.45rem;
    letter-spacing: -.05em;
}

.summary-line,
.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #78837a;
    font-size: .86rem;
}

.summary-line + .summary-line {
    margin-top: 14px;
}

.summary-line strong {
    color: #34443b;
    font-size: .86rem;
}

.delivery-note {
    margin: 10px 0 20px;
    color: #96a095;
    font-size: .7rem;
    line-height: 1.5;
}

.summary-total {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: .96rem;
    font-weight: 700;
}

.summary-total strong {
    font-size: 1.28rem;
    letter-spacing: -.04em;
}

.checkout-button {
    min-height: 54px;
    justify-content: space-between;
    padding-right: 17px;
    padding-left: 19px;
}

.summary-reassurance {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 21px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.summary-reassurance > span {
    color: #92ac62;
    font-size: 1.05rem;
}

.summary-reassurance p {
    margin: 0;
    color: #8b958c;
    font-size: .7rem;
    line-height: 1.6;
}

.empty-cart .empty-orbit {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    font-size: 1.55rem;
    animation: float-slow 4s ease-in-out infinite;
}

.empty-cart {
    display: flex;
    min-height: 388px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    border: 1px dashed #cbd4c7;
    border-radius: 22px;
    background: rgba(255, 255, 255, .4);
    text-align: center;
}

.empty-cart h2 {
    max-width: 390px;
    margin: 13px 0 8px;
    font-size: 1.8rem;
    letter-spacing: -.06em;
}

.empty-cart > p:not(.eyebrow) {
    max-width: 350px;
    margin: 0 0 20px;
    color: #78847b;
    font-size: .88rem;
    line-height: 1.65;
}

.cart-footer {
    display: flex;
    width: min(100% - 64px, 1180px);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
    padding: 20px 0 27px;
    border-top: 1px solid var(--line);
    color: #8b958c;
    font-size: .73rem;
}

.cart-footer a {
    color: #5d6c60;
    font-weight: 700;
    text-decoration: none;
}

.cart-footer a:hover {
    color: #819d4f;
}

@media (max-width: 850px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1.25fr) minmax(260px, .8fr);
        gap: 18px;
    }

    .cart-item {
        grid-template-columns: 95px minmax(0, 1fr);
        gap: 15px;
    }

    .cart-item-image {
        width: 95px;
        height: 95px;
    }

    .cart-item-right {
        grid-column: 2;
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 420px) {
    .cart-page .header-actions #home {
        display: none;
    }
}

@media (max-width: 680px) {
    .cart-main,
    .cart-footer {
        width: min(100% - 38px, 1180px);
    }

    .cart-main {
        padding: 45px 0 66px;
    }

    .cart-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 26px;
    }

    .cart-heading h1 {
        font-size: clamp(3.1rem, 12vw, 4.5rem);
    }

    .cart-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .order-summary {
        position: static;
        padding: 23px;
    }

    .cart-item {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        border-radius: 17px;
    }

    .cart-item-image {
        width: 82px;
        height: 88px;
        grid-row: 1 / span 2;
        border-radius: 11px;
    }

    .cart-item-name {
        font-size: .95rem;
    }

    .cart-item-right {
        grid-column: 2;
    }

    .cart-item-total {
        font-size: .86rem;
    }

    .cart-footer {
        font-size: .67rem;
    }
}
