.w-100 {
  width: 100%;
}

.cart {
  --ink: #f0f0f0;
  --ink-soft: #c9cdd4;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.07);
  --line-dashed: rgba(255, 255, 255, 0.06);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-color: #9ca3af;
  --danger: #e5484d;
  --accent: #6C63FF;
  --green: #22c55e;
  --orange: #f97316;
  --radius: 14px;
  --hit: 48px;
  --font: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;

  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bgc-app);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 36px);
  box-sizing: border-box;
}

.cart a {
  color: inherit;
  text-decoration: none;
}

.cart .link {
  color: var(--accent);
}

.cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.cart__title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}

.cart__count-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  line-height: 1;
}

.cart__header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart__select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  opacity: 0.75;
  transition: opacity .15s, color .15s;
  font-family: var(--font);
}

.cart__select-all:hover {
  opacity: 1;
  color: var(--ink-soft);
}

.cart__select-all[data-state="all"] {
  color: var(--accent);
  opacity: 1;
}

.cart__delete-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  opacity: 0.75;
  transition: opacity .15s;
  font-family: var(--font);
}

.cart__delete-all:hover {
  opacity: 1;
}

.cart__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  transition: opacity .18s ease, transform .18s ease;
}

.cart__grid.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

.cart__grid.fade-in {
  opacity: 0;
  transform: translateY(6px);
}

.cart__empty-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 12px;
  text-align: center;
  gap: 18px;
  min-height: calc(100vh - 200px);
  box-sizing: border-box;
}

.cart-empty-lottie {
  width: min(60vw, 300px);
  height: min(60vw, 300px);
  display: block;
}

.cart__empty-text {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 3.6vw, 17px);
  line-height: 1.4;
}

.cart__list {
  display: flex;
  flex-direction: column;
}

.line {
  display: grid;
  grid-template-columns: 20px 100px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .2s ease;
}

.cart__list .line:first-child {
  border-top: 1px solid var(--line);
}

.cart__list.has-selection .line:not(.is-selected) {
  opacity: 0.4;
}

.cart__list.has-selection .line.is-selected {
  opacity: 1;
}

.line__check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.line__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  background: transparent;
  transition: border-color .15s, background .15s;
  position: relative;
  flex-shrink: 0;
}

.line__checkbox:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.line__checkbox:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 3.5L11 1' stroke='%23111' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.line__media {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  display: block;
}

.line__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  transition: transform .3s ease;
}

.line__media:hover img {
  transform: scale(1.04);
}

.line__media dotlottie-player {
  display: block;
  width: 100%;
  height: 100%;
}

.line__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.line__chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chip-color);
  background: var(--chip-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 9px;
  border-radius: 6px;
  width: fit-content;
}

.line__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  display: block;
  transition: color .15s;
}

.line__title:hover {
  color: var(--accent);
}

.line__meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.line__extra {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.6;
}

.line__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 110px;
}

.line__price-total {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.line__price-unit {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.line__actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.line__btn,
.cart .icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .15s, color .15s, background .15s;
  padding: 0;
  min-width: unset;
  flex-shrink: 0;
}

.line__btn:hover,
.cart .icon:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.line__btn--trash:hover,
.cart .icon--trash:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(229, 72, 77, 0.08);
}

.cart__pagination {
  margin: 24px 0 4px;
}

.cart__pagination ul {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.cart__pagination a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  transition: background .15s, color .15s;
}

.cart__pagination a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.cart__pagination .is-active a {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.12);
}

.summary,
.summary--below {
  position: sticky;
  top: 24px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 24px;
  box-sizing: border-box;
}

.summary__title {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line-dashed);
}

.summary__row:last-of-type {
  border-bottom: none;
}

.summary__row span {
  color: var(--muted);
}

.summary__row strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.summary__row--taxes strong {
  color: var(--orange);
}

.summary__row--selected span {
  color: var(--accent);
  opacity: 0.8;
}

.summary__row--selected strong {
  color: var(--accent);
}

.summary__row--discount strong {
  color: var(--green);
}

.summary__sep {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

.summary__row--total {
  border-bottom: none;
  padding: 10px 0 6px;
}

.summary__row--total span {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.summary__row--total strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.summary__promo {
  margin: 16px 0 6px;
}

.promo__label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.promo__row {
  display: flex;
  gap: 0;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.promo__input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font);
  box-sizing: border-box;
  outline: none;
}

.promo__input::placeholder {
  color: var(--muted);
}

.btn--apply {
  height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-soft);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s, color .15s;
}

.btn--apply:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.cart .btn {
  height: var(--hit);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity .15s, background .15s;
  box-sizing: border-box;
  text-align: center;
}

.cart .btn--primary {
  background: #f0f0f0;
  color: #111;
  border: none;
}

.cart .btn--primary:hover {
  opacity: 0.9;
}

.cart .btn:not(.btn--primary) {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cart .btn:not(.btn--primary):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.cart__suggestions {
  margin-top: 40px;
}

.suggestions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.suggest-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.suggest-card__media {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  overflow: hidden;
  border-radius: 8px;
}

.suggest-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.suggest-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.suggest__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggest__meta .muted {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 960px) {
  .cart__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .summary,
  .summary--below {
    position: static;
  }
}

@media (max-width: 640px) {
  .cart {
    padding: 20px clamp(12px, 4vw, 20px);
  }

  .cart__header {
    margin-bottom: 24px;
  }

  .cart__header-actions {
    gap: 14px;
  }

  .cart__select-all,
  .cart__delete-all {
    font-size: 10px;
  }

  .line {
    grid-template-columns: 20px 80px 1fr;
    gap: 12px;
  }

  .line__right {
    grid-column: 2 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
  }

  .line__price-unit {
    text-align: left;
  }

  .line__media {
    width: 80px;
    height: 80px;
  }

  .summary,
  .summary--below {
    padding: 18px;
  }

  .cart .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .cart__empty-wrapper {
    padding: 40px 10px;
    min-height: 60vh;
  }

  .cart-empty-lottie {
    width: min(72vw, 260px);
    height: min(72vw, 260px);
  }

  .cart__empty-text {
    font-size: clamp(13px, 4vw, 16px);
  }
}