:root {
    --cart-navy: #102a43;
    --cart-navy-dark: #071c2c;
    --cart-cyan: #00b8d9;
    --cart-cyan-light: #e9fbff;
    --cart-green: #0f9d72;
    --cart-red: #e53935;
    --cart-text: #26384a;
    --cart-muted: #718096;
    --cart-border: #e6edf3;
    --cart-background: #f6f8fb;
    --cart-white: #ffffff;
}

.cart-page {
    width: min(1380px, calc(100% - 32px));
    margin: 28px auto 72px;
    color: var(--cart-text);
    font-family: inherit;
}

.cart-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

    .cart-page__header h1 {
        position: relative;
        margin: 0;
        padding-bottom: 12px;
        font-size: 24px;
        font-weight: 900;
        color: var(--cart-navy);
    }

        .cart-page__header h1::after {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 54px;
            height: 4px;
            border-radius: 20px;
            background: var(--cart-cyan);
            content: "";
        }

    .cart-page__header > span {
        padding: 7px 13px;
        border: 1px solid #cceff6;
        border-radius: 999px;
        background: var(--cart-cyan-light);
        color: #087b91;
        font-size: 13px;
        font-weight: 800;
    }

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 20px;
}

.cart-products {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    padding: 20px;
    border: 1px solid var(--cart-border);
    border-radius: 20px;
    background: var(--cart-white);
    box-shadow: 0 8px 26px rgba(16, 42, 67, 0.055);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

    .cart-item:hover {
        border-color: #b9eaf3;
        box-shadow: 0 12px 34px rgba(16, 42, 67, 0.09);
        transform: translateY(-1px);
    }

.cart-item__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 180px;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
}

    .cart-item__image img {
        display: block;
        width: 100%;
        height: 180px;
        object-fit: contain;
        transition: transform 220ms ease;
    }

.cart-item:hover .cart-item__image img {
    transform: scale(1.025);
}

.cart-item__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cart-item__title {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 14px;
    color: var(--cart-navy);
    font-size: 16px;
    font-weight: 850;
    line-height: 2;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

    .cart-item__title:hover {
        color: #008ca6;
    }

.cart-item__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 4px 0;
    color: var(--cart-muted);
    font-size: 13px;
    line-height: 1.8;
}

    .cart-item__meta strong {
        color: #536579;
        font-weight: 750;
    }

.cart-color {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #cfd9e3;
}

.cart-item__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: auto;
    padding-top: 18px;
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    padding: 4px;
    border: 1px solid #dbe5ed;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(16, 42, 67, 0.05);
}

.cart-quantity__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: var(--cart-cyan-light);
    color: #008ba5;
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

    .cart-quantity__button:hover {
        background: var(--cart-cyan);
        color: #fff;
    }

    .cart-quantity__button:disabled {
        cursor: not-allowed;
        opacity: 0.45;
    }

.cart-quantity [data-cart-quantity] {
    min-width: 30px;
    color: var(--cart-navy);
    font-size: 15px;
    font-weight: 900;
    text-align: center;
}

.cart-item__remove {
    height: 34px;
    margin-right: 4px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid var(--cart-border);
    background: transparent;
    color: var(--cart-red);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.cart-item__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    white-space: nowrap;
}

    .cart-item__price > strong {
        color: var(--cart-navy-dark);
        font-size: 19px;
        font-weight: 950;
    }

.cart-item__discount {
    color: var(--cart-green);
    font-size: 12px;
    font-weight: 800;
}

.cart-summary {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid var(--cart-border);
    border-radius: 20px;
    background: var(--cart-white);
    box-shadow: 0 10px 34px rgba(16, 42, 67, 0.08);
}

    .cart-summary::before {
        display: block;
        width: 48px;
        height: 4px;
        margin: -8px 0 20px auto;
        border-radius: 20px;
        background: var(--cart-cyan);
        content: "";
    }

.cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 14px 0;
    color: #56687a;
    font-size: 14px;
}

    .cart-summary__row strong {
        color: var(--cart-navy);
        font-size: 14px;
        font-weight: 900;
        white-space: nowrap;
    }

.cart-summary__saving,
.cart-summary__saving strong {
    color: var(--cart-green);
}

.cart-summary__divider {
    height: 1px;
    margin: 20px 0;
    background: var(--cart-border);
}

.cart-summary__total {
    align-items: flex-start;
    color: var(--cart-navy-dark);
    font-size: 15px;
    font-weight: 850;
}

    .cart-summary__total strong {
        font-size: 18px;
        font-weight: 950;
    }

.cart-summary__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 22px;
    border-radius: 13px;
    background: linear-gradient( 135deg, var(--cart-navy) 0%, #164969 100% );
    box-shadow: 0 9px 20px rgba(16, 42, 67, 0.2);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 170ms ease, box-shadow 170ms ease;
}

    .cart-summary__checkout:hover {
        color: #fff;
        box-shadow: 0 12px 25px rgba(16, 42, 67, 0.27);
        transform: translateY(-1px);
    }

.cart-summary__notice {
    margin: 16px 0 0;
    color: #8291a2;
    font-size: 11px;
    line-height: 1.9;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 430px;
    padding: 50px 20px;
    border: 1px solid var(--cart-border);
    border-radius: 24px;
    background: radial-gradient( circle at top, #effcff, #fff 48% );
    text-align: center;
}

.cart-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 116px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: var(--cart-cyan-light);
    color: var(--cart-cyan);
}

.cart-empty h2 {
    margin: 0 0 10px;
    color: var(--cart-navy);
    font-size: 22px;
    font-weight: 900;
}

.cart-empty p {
    margin: 0;
    color: var(--cart-muted);
    font-size: 14px;
    line-height: 2;
}

.cart-empty__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 48px;
    margin-top: 24px;
    border-radius: 12px;
    background: var(--cart-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

    .cart-empty__button:hover {
        color: #fff;
        background: #164969;
    }

.cart-item.is-loading {
    pointer-events: none;
    opacity: 0.55;
}

@media (max-width: 1050px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .cart-item {
        grid-template-columns: 155px minmax(0, 1fr);
    }

    .cart-item__image,
    .cart-item__image img {
        height: 155px;
        min-height: 155px;
    }
}

@media (max-width: 820px) {
    .cart-page {
        width: min(100% - 20px, 680px);
        margin-top: 18px;
        margin-bottom: 110px;
    }

    .cart-layout {
        display: block;
    }

    .cart-products {
        margin-bottom: 18px;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .cart-page {
        width: 100%;
        margin-top: 8px;
        padding: 0 10px;
    }

    .cart-page__header {
        padding: 10px 4px;
    }

        .cart-page__header h1 {
            font-size: 19px;
        }

    .cart-item {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 12px;
        padding: 14px 12px;
        border-radius: 16px;
    }

    .cart-item__image,
    .cart-item__image img {
        height: 108px;
        min-height: 108px;
    }

    .cart-item__title {
        margin-bottom: 8px;
        font-size: 13px;
        line-height: 1.85;
    }

    .cart-item__meta {
        margin: 1px 0;
        font-size: 11px;
    }

    .cart-item__footer {
        grid-column: 1 / -1;
        align-items: center;
        margin-right: -120px;
        padding-top: 14px;
    }

    .cart-item__price > strong {
        font-size: 15px;
    }

    .cart-item__discount {
        font-size: 10px;
    }

    .cart-summary {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .cart-empty {
        min-height: 380px;
        border-radius: 16px;
    }
}
