/* Пустая корзина — /cart, по макету vostok.ru/cart */

.cart-page__empty {
    padding-bottom: 8px;
}

.cart-page__title {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    max-width: 1014px;
    margin: 0 0 24px;
    color: #000;
}

@media (min-width: 768px) {
    .cart-page__title {
        font-size: 28px;
        line-height: 34px;
    }
}

@media (min-width: 1280px) {
    .cart-page__title {
        font-size: 32px;
        line-height: 40px;
    }
}

.cart-page__catalog-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    min-height: 56px;
    padding: 15px 19px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition-duration: .3s;
    transition-property: background-color, border-color, color;
    border: 1px solid #1d4e9e;
    background-color: #1d4e9e;
    color: #fff;
}

.cart-page__catalog-link:hover {
    border-color: #1266b1;
    background-color: #1266b1;
    color: #fff;
}

@media (min-width: 768px) {
    .cart-page__catalog-link {
        width: auto;
        min-width: 240px;
    }
}

.cart-page .product-snippet {
    position: relative;
    height: 100%;
}

.cart-page__filled[hidden] {
    display: none !important;
}

.cart-page__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.cart-page__clear {
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    padding: 8px 0;
}

.cart-page__clear:hover {
    color: #1d4e9e;
}

.cart-page__grid {
    display: grid;
    gap: 24px;
}

.cart-page__items {
    display: grid;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    grid-template-areas:
        "image main main"
        ". qty sum"
        ". remove remove";
    column-gap: 12px;
    row-gap: 12px;
    padding: 16px;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    background: #fff;
}

.cart-item__image {
    grid-area: image;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: #f6f7f9;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item__image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item__main {
    grid-area: main;
    min-width: 0;
}

.cart-item__name {
    display: inline-block;
    color: #111827;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    text-decoration: none;
}

.cart-item__name:hover {
    color: #1d4e9e;
}

.cart-item__meta,
.cart-item__price {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 20px;
}

.cart-item__qty {
    grid-area: qty;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    width: max-content;
    max-width: 100%;
    border: 1px solid #d8dce5;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item__qty-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: #f6f7f9;
    color: #111827;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.cart-item__qty-btn:hover {
    background: #edf3fb;
    color: #1d4e9e;
}

.cart-item__qty-input {
    width: 44px;
    height: 36px;
    border: 0;
    border-left: 1px solid #d8dce5;
    border-right: 1px solid #d8dce5;
    text-align: center;
    font: inherit;
    color: #111827;
    -moz-appearance: textfield;
}

.cart-item__qty-input::-webkit-outer-spin-button,
.cart-item__qty-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.cart-item__sum {
    grid-area: sum;
    margin: 0;
    align-self: center;
    justify-self: end;
    color: #111827;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    white-space: nowrap;
}

.cart-item__remove {
    grid-area: remove;
    width: max-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
}

.cart-item__remove:hover {
    color: #d12f2f;
}

.cart-page__summary {
    padding: 20px;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    background: #fff;
}

.cart-page__summary-label {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 14px;
    line-height: 20px;
}

.cart-page__summary-price {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 34px;
    font-weight: 600;
}

.cart-page__summary-note {
    margin: 12px 0 20px;
    color: #6b7280;
    font-size: 14px;
    line-height: 20px;
}

.cart-page__summary-link {
    width: 100%;
}

.cart-page__continue {
    display: inline-block;
    margin-top: 12px;
    color: #6b7280;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}

.cart-page__continue:hover {
    color: #1d4e9e;
}

@media (min-width: 768px) {
    .cart-item {
        grid-template-columns: 112px minmax(0, 1fr) auto auto auto;
        grid-template-areas: "image main qty sum remove";
        align-items: center;
        column-gap: 20px;
        row-gap: 20px;
    }

    .cart-item__image {
        width: 112px;
        height: 112px;
    }

    .cart-item__sum {
        justify-self: start;
    }
}

@media (min-width: 1024px) {
    .cart-page__grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }

    .cart-page__summary {
        position: sticky;
        top: 96px;
    }
}
