.cart-page {
    padding: 24px 12px 24px !important;
}

.cart-page__title {
    margin: 0 0 24px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--color-text-strong);
}

.cart-page__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cart-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.cart-page__items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.cart-item__image {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    flex: 0 0 auto;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__info {
    min-width: 0;
}

.cart-item__name {
    display: block;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    transition: color .2s ease;
}

.cart-item__name:hover {
    color: var(--color-primary);
}

.cart-item__sku {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.cart-item__qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
}

.cart-item__qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-strong);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

.cart-item__qty-btn:hover:not(:disabled) {
    background: var(--color-primary-soft);
    border-color: #bfdbfe;
    color: var(--color-primary);
}

.cart-item__qty-btn:disabled {
    opacity: .45;
    cursor: default;
}

.cart-item__qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #475569;
}

.cart-item__price,
.cart-item__sum {
    font-size: 22px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.cart-item__remove {
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: #fff;
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}

.cart-item__remove:hover {
    background: #fff1f2;
    border-color: #fecdd3;
    transform: translateY(-1px);
    color: #dc2626;
}

.cart-item__remove svg,
.cart-summary__button svg,
.cart-extra__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-page__summary {
    position: sticky;
    top: 130px;
}

.cart-summary {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.cart-summary__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 18px;
}

.cart-summary__label,
.cart-summary__count {
    font-size: 18px;
    color: #475569;
    font-weight: 700;
}

.cart-summary__count span {
    color: var(--color-primary);
}

.cart-summary__total {
    padding: 16px 0 18px;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 18px;
}

.cart-summary__total-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
}

.cart-summary__total-value {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-primary);
    text-shadow: 0 1px 0 rgba(37, 99, 235, 0.06);
}

.cart-summary__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.cart-summary__button {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.cart-summary__button--primary {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.20);
}

.cart-summary__button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.cart-summary__button--ghost {
    background: #fff;
    border-color: var(--color-border);
    color: #475569;
}

.cart-summary__button--ghost:hover {
    background: var(--color-surface);
    border-color: var(--color-border-strong);
}

.cart-summary__agreement {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-muted);
    cursor: pointer;
    user-select: none;
}

.cart-summary__agreement-input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.cart-page__extras {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cart-extra {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.cart-extra__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    flex: 0 0 auto;
}

.cart-extra__text {
    min-width: 0;
}

.cart-extra__title {
    font-size: 22px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.cart-extra__desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.cart-page .alert {
    border-radius: 16px;
    padding: 16px 18px;
    font-size: 15px;
}

.catalog-card__cart-btn {
    position: relative;
}

.catalog-card__cart-btn .icon-check {
    display: none;
}

.catalog-card__cart-btn.is-in-cart {
    background: #16a34a;
    color: #fff;
}

.catalog-card__cart-btn.is-in-cart .icon-cart {
    display: none;
}

.catalog-card__cart-btn.is-in-cart .icon-check {
    display: inline-block;
}

.product-page__cart-btn.is-in-cart {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.cart-page,
.cart-page__layout,
.cart-page__main,
.cart-page__sidebar {
    min-width: 0;
    box-sizing: border-box;
}

.cart-page__layout {
    width: 100%;
    max-width: 100%;
}

.cart-page__layout *,
.cart-page__main *,
.cart-page__sidebar * {
    min-width: 0;
}

@media (max-width: 1024px) {
    .cart-page__layout {
        grid-template-columns: 1fr;
    }

    .cart-page__summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 18px 0 60px;
    }

    .cart-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        align-items: start;
    }

    .cart-item__image {
        width: 76px;
        height: 76px;
        border-radius: 12px;
    }

    .cart-item__info {
        grid-column: 2 / -1;
    }

    .cart-item__remove {
        grid-column: 1 / 2;
        grid-row: 2;
        justify-self: start;
        align-self: end;
        margin-top: 6px;
        width: 34px;
        height: 34px;
    }

    .cart-item__remove svg {
        width: 18px;
        height: 18px;
    }

    .cart-item__qty {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: start;
        align-self: end;
        margin-top: 0;
        transform: translateX(-22px);
        gap: 4px;
        padding: 4px;
    }

    .cart-item__qty-btn {
        width: 26px;
        height: 26px;
    }

    .cart-item__qty-value {
        min-width: 18px;
        font-size: 16px;
    }

    .cart-item__price {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: end;
        align-self: end;
        font-size: 22px;
        font-weight: 800;
        margin-bottom: 6px;
    }
    
    .cart-summary__total-value {
    font-weight: 800
}

    .cart-page__extras {
        grid-template-columns: 1fr;
    }

    .cart-summary__actions {
        flex-direction: row;
        align-items: stretch;
    }

    .cart-summary__button {
/*        width: auto;
        flex: 1 1 0; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
        
    }

    .cart-page__layout {
        grid-template-columns: 1fr;
    }
    
}

.cart-page .cart-item__name:hover {
    color: var(--color-primary) !important;
}
