.cart-page { display: grid; gap: 24px; container-type: inline-size; }
.cart-page__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cart-page__head .title { margin-bottom: 0; }
.cart-page__head p { margin: 0; color: #777b86; font-size: 15px; line-height: 1.45; }
.cart-page__favorite-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 14px; background: #fff; color: #202231; font-weight: 600; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.cart-page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.cart-card, .cart-summary__box { border-radius: 24px; background: #fff; box-shadow: 0 14px 40px rgba(15, 23, 42, .08); }
.cart-card { overflow: hidden; }
.cart-card__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #edf0f4; }
.cart-card__check { display: inline-flex; align-items: center; gap: 10px; color: #202231; font-size: 15px; }
.cart-card__check input { width: 18px; height: 18px; accent-color: #bc0a00; }
.cart-card__clear, .cart-item__remove { border: 0; background: transparent; color: #bc0a00; font-weight: 600; cursor: pointer; }
.cart-item { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; padding: 22px; }
.cart-item + .cart-item { border-top: 1px solid #edf0f4; }
.cart-item__image-wrap { position: relative; overflow: hidden; border-radius: 18px; background: #f5f6f8; aspect-ratio: 1 / 1; }
.cart-item__image-link { display: block; width: 100%; height: 100%; }
.cart-item__image { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item__select { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 28px; height: 28px; cursor: pointer; }
.cart-item__select input { position: absolute; opacity: 0; pointer-events: none; }
.cart-item__select span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; background: transparent; border: 2px solid #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); transition: background .2s ease, border-color .2s ease; }
.cart-item__select span::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.cart-item__select input:checked + span { background: #bc0a00; border-color: #bc0a00; }
.cart-item__select input:checked + span::after { opacity: 1; }
.cart-item__body { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 16px; }
.cart-item__main-link { display: block; color: inherit; text-decoration: none; }
.cart-item__main-link:hover { color: inherit; text-decoration: none; }
.cart-item h2 { margin: 0 0 8px; color: #202231; font-size: 18px; line-height: 1.28; font-weight: 700; }
.cart-item__seller { margin: 0; color: #777b86; font-size: 14px; line-height: 1.45; }
.cart-item__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; color: #777b86; font-size: 13px; }
.cart-item__meta span { display: inline-flex; align-items: center; gap: 4px; }
.cart-item__meta img { width: 14px; height: 14px; }
.cart-item__main .cards__location-badge { width: fit-content; margin-top: 10px; }
.cart-item__delivery-mobile { display: none; }
.cart-item__bottom-line { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cart-item__stock { margin: 0; color: #777b86; font-size: 13px; }
.cart-item__side { display: grid; justify-items: end; align-content: start; gap: 14px; }
.cart-item__price { display: grid; gap: 3px; text-align: right; }
.cart-item__price strong { color: #202231; font-size: 20px; line-height: 1.2; }
.cart-item__price span { color: #9da0a6; font-size: 13px; text-decoration: line-through; }
.cart-item__price-meta { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: #9da0a6; font-size: 13px; }
.cart-item__price-meta span { color: #bc0a00; font-weight: 700; text-decoration: none; }
.cart-item__price-meta del { color: #9da0a6; }
.cart-qty { display: inline-grid; grid-template-columns: 30px 42px 30px; align-items: center; gap: 6px; background: transparent; border: 0; border-radius: 0; }
.cart-qty button, .cart-qty input { height: 30px; border: 0; text-align: center; font-weight: 700; }
.cart-qty button { width: 30px; border-radius: 9px; background: #bc0a00; color: #fff; cursor: pointer; font-size: 16px; line-height: 30px; }
.cart-qty button:disabled { background: #e7a09b; color: #fff; cursor: default; }
.cart-qty input { width: 42px; padding: 0; appearance: textfield; background: #fff; color: #202231; border: 1px solid #d9dde5; border-radius: 8px; }
.cart-qty input:hover, .cart-qty input:focus, .cart-qty input:focus-visible { border-color: #d9dde5; outline: none; box-shadow: none; }
.cart-qty input::-webkit-outer-spin-button, .cart-qty input::-webkit-inner-spin-button { margin: 0; appearance: none; }
.cart-item__remove { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 14px; }
.cart-item__remove img { width: 16px; height: 16px; }
.cart-summary { position: sticky; top: 18px; }
.cart-summary__box { display: grid; gap: 16px; padding: 22px; }
.cart-summary h2 { margin: 0; color: #202231; font-size: 22px; line-height: 1.25; }
.cart-summary__row, .cart-summary__delivery, .cart-summary__total { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; color: #626773; font-size: 15px; }
.cart-summary__row strong, .cart-summary__delivery strong { color: #202231; font-weight: 700; text-align: right; }
.cart-summary__row--discount strong { color: #3f8c45; }
.cart-summary__delivery { padding: 14px; border-radius: 16px; background: #f7f8fb; }
.cart-summary__total { align-items: center; padding-top: 16px; border-top: 1px solid #edf0f4; color: #202231; font-size: 18px; font-weight: 700; }
.cart-summary__total strong { font-size: 26px; }
.cart-summary__button { width: 100%; min-height: 50px; }
.cart-summary p { margin: 0; color: #8b9099; font-size: 13px; line-height: 1.45; }
.cart-summary__favorite-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: #fff; color: #8b9099; font-size: 13px; font-weight: 600; box-shadow: 0 14px 40px rgba(15, 23, 42, .08); }
.cart-summary__favorite-link img { width: 18px; height: 18px; }
.cart-summary__delivery-note { color: #8b9099; }
.cart-empty { min-height: 360px; }
.cart-page--sb .cart-card__check input { accent-color: #3ab455; }
.cart-page--sb .cart-card__clear,
.cart-page--sb .cart-item__remove { color: #3ab455; }
.cart-page--sb .cart-item__select input:checked + span { background: #3ab455; border-color: #3ab455; }
.cart-page--sb .cart-item__price-meta span { color: #3ab455; }
.cart-page--sb .cart-qty button { background: #3ab455; }
.cart-page--sb .cart-qty button:disabled { background: rgba(58, 180, 85, .38); }
.cart-page--sb .cart-summary__row--discount strong { color: #3ab455; }
@media (max-width: 1200px) { .cart-page__grid { grid-template-columns: 1fr; } .cart-summary { position: static; } }

@container (max-width: 920px) {
  .cart-page__grid { grid-template-columns: 1fr; gap: 16px; }
  .cart-summary { position: static; }
  .cart-card, .cart-summary__box { border-radius: 18px; box-shadow: 0 10px 28px rgba(15, 23, 42, .07); }
  .cart-card__top { padding: 14px 16px; }
  .cart-card__clear { font-size: 13px; }
  .cart-item { position: relative; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .cart-item__select { z-index: 4; right: 8px; bottom: 8px; width: 22px; height: 22px; }
  .cart-item__select span { width: 22px; height: 22px; border-radius: 6px; border-width: 1.5px; }
  .cart-item__select span::after { width: 7px; height: 4px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
  .cart-item__body { grid-template-columns: 1fr; gap: 6px; }
  .cart-item__main { order: 1; }
  .cart-item h2 { margin-bottom: 2px; padding-right: 34px; font-size: 15px; }
  .cart-item__seller { font-size: 12px; }
  .cart-item__meta, .cart-item__stock { font-size: 12px; }
  .cart-item__meta { margin-top: 4px; gap: 6px; }
  .cart-item__bottom-line { order: 2; grid-column: auto; display: flex; align-items: center; justify-content: flex-start; }
  .cart-item__delivery-desktop { display: none; }
  .cart-item__delivery-mobile { order: 3; display: inline-flex; width: fit-content; margin-top: 0; }
  .cart-item__side { order: 4; justify-items: stretch; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
  .cart-item__price { order: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; text-align: left; }
  .cart-item__price strong { font-size: 17px; }
  .cart-item__price-meta { justify-content: flex-start; }
  .cart-qty { grid-template-columns: 28px 38px 28px; gap: 5px; }
  .cart-item__side .cart-qty { order: 3; justify-self: end; }
  .cart-qty button, .cart-qty input { height: 28px; }
  .cart-qty button { width: 28px; border-radius: 8px; line-height: 28px; }
  .cart-qty input { width: 38px; }
  .cart-item__remove { position: absolute; z-index: 5; top: 12px; right: 12px; width: 30px; height: 30px; gap: 0; align-items: center; justify-content: center; padding: 0; border: 1px solid #edf0f4; border-radius: 10px; background: #fff; font-size: 0; line-height: 0; box-shadow: 0 8px 18px rgba(15, 23, 42, .08); }
  .cart-item__remove img { position: absolute; top: 50%; left: 50%; display: block; width: 15px; height: 15px; margin: 0; transform: translate(-50%, -50%); pointer-events: none; }
  .cart-summary__box { padding: 18px; }
  .cart-summary__total strong { font-size: 22px; }
}

@media (max-width: 768px) {
  .cart-page { gap: 16px; }
  .cart-page__grid { gap: 16px; }
  .cart-card, .cart-summary__box { border-radius: 18px; box-shadow: 0 10px 28px rgba(15, 23, 42, .07); }
  .cart-card__top { padding: 14px 16px; }
  .cart-card__clear { font-size: 13px; }
  .cart-item { position: relative; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .cart-item__select { z-index: 4; right: 8px; bottom: 8px; width: 22px; height: 22px; }
  .cart-item__select span { width: 22px; height: 22px; border-radius: 6px; border-width: 1.5px; }
  .cart-item__select span::after { width: 7px; height: 4px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
  .cart-item__body { grid-template-columns: 1fr; gap: 6px; }
  .cart-item__main { order: 1; }
  .cart-item h2 { margin-bottom: 2px; padding-right: 34px; font-size: 15px; }
  .cart-item__seller { font-size: 12px; }
  .cart-item__meta, .cart-item__stock { font-size: 12px; }
  .cart-item__meta { margin-top: 4px; gap: 6px; }
  .cart-item__bottom-line { order: 2; grid-column: auto; display: flex; align-items: center; justify-content: flex-start; }
  .cart-item__delivery-desktop { display: none; }
  .cart-item__delivery-mobile { order: 3; display: inline-flex; width: fit-content; margin-top: 0; }
  .cart-item__side { order: 4; justify-items: stretch; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
  .cart-item__price { order: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; text-align: left; }
  .cart-item__price strong { font-size: 17px; }
  .cart-item__price-meta { justify-content: flex-start; }
  .cart-qty { grid-template-columns: 28px 38px 28px; gap: 5px; }
  .cart-item__side .cart-qty { order: 3; justify-self: end; }
  .cart-qty button, .cart-qty input { height: 28px; }
  .cart-qty button { width: 28px; border-radius: 8px; line-height: 28px; }
  .cart-qty input { width: 38px; }
  .cart-item__remove { position: absolute; z-index: 5; top: 12px; right: 12px; width: 30px; height: 30px; gap: 0; align-items: center; justify-content: center; padding: 0; border: 1px solid #edf0f4; border-radius: 10px; background: #fff; font-size: 0; line-height: 0; box-shadow: 0 8px 18px rgba(15, 23, 42, .08); }
  .cart-item__remove img { position: absolute; top: 50%; left: 50%; display: block; width: 15px; height: 15px; margin: 0; transform: translate(-50%, -50%); pointer-events: none; }
  .cart-summary__box { padding: 18px; }
  .cart-summary__total strong { font-size: 22px; }
}
