/* Общий фон страницы корзины */
.cart-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6fb;
  color: #222;
}

/* Шапка */
.cart-header {
  background: #ffffff;
  border-bottom: 1px solid #e6e8f2;
}

.cart-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-back-link {
  font-size: 14px;
  color: #4c6fff;
  text-decoration: none;
}

.cart-back-link:hover {
  text-decoration: underline;
}

.cart-logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
}

/* Основной контейнер */
.cart-page {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 20px;
}

/* Шаги Cart / Checkout / Done */
.cart-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  background: #e9ecfb;
  border-radius: 999px;
  padding: 4px;
}

.cart-step {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
  color: #6270a4;
  border-radius: 999px;
}

.cart-step--active {
  background: #ffffff;
  color: #1c2a6b;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(36, 60, 190, 0.12);
}

/* Блок "корзина пуста" */
.cart-empty {
  margin-top: 20px;
  padding: 40px 20px 48px;
  background: #ffffff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 14px 30px rgba(15, 35, 95, 0.06);
}

.cart-empty-icon {
  font-size: 40px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f4ff;
  color: #4c6fff;
}

.cart-empty-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.cart-empty-text {
  margin: 0 0 24px;
  font-size: 14px;
  color: #6b7290;
}

.cart-empty-btn {
  margin-top: 4px;
}

/* Карточка корзины (когда есть товары) */
.cart-card {
  margin-top: 24px;
  padding: 24px 20px 20px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15, 35, 95, 0.06);
}

.cart-title {
  margin: 0 0 12px;
  font-size: 20px;
}

/* Таблица товаров */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}

.cart-table thead {
  background: #f6f7fb;
}

.cart-table th,
.cart-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #edeff7;
  text-align: left;
}

.cart-table th:last-child,
.cart-table td:last-child {
  text-align: right;
}

.cart-item-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e3e6f3;
  background: #fff;
}

.cart-item-text .cart-name {
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}

.cart-item-text .cart-name:hover {
  text-decoration: underline;
}

.cart-item-text .cart-id {
  font-size: 12px;
  color: #9ca3c2;
  margin-top: 4px;
}

.cart-price,
.cart-line-total {
  white-space: nowrap;
}

/* Количество */
.cart-qty {
  white-space: nowrap;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #ccd1ea;
  background: #ffffff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

.cart-qty-btn:hover {
  background: #f3f4ff;
  border-color: #aab3f0;
}

.cart-qty-input {
  width: 50px;
  text-align: center;
  margin: 0 4px;
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid #ccd1ea;
}

/* Кнопка удаления */
.cart-remove-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #e5e7f3;
  background: #ffffff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #a1a7c8;
}

.cart-remove-btn:hover {
  background: #ffecec;
  border-color: #ffb6b6;
  color: #cf3b3b;
}

/* Итоги и кнопки внизу */
.cart-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.cart-totals {
  min-width: 220px;
}

.cart-totals-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 15px;
}

.cart-totals-value {
  font-weight: 600;
}

/* Кнопки */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #4c6fff;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(76, 111, 255, 0.25);
}

.btn-primary:hover {
  background: #3b56d8;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #eef0fb;
  color: #1c2a6b;
}

.btn-secondary:hover {
  background: #e0e3fa;
}

/* Бейдж (если будешь использовать в шапке) */
.cart-badge {
  display: none;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  justify-content: center;
  align-items: center;
  margin-left: 4px;
}

/* Адаптив под телефоны */
@media (max-width: 768px) {
  .cart-header-inner,
  .cart-page {
    padding: 0 12px;
  }

  .cart-card {
    padding: 18px 12px 16px;
  }

  .cart-item-main {
    flex-direction: row;
    align-items: flex-start;
  }

  .cart-thumb {
    width: 60px;
    height: 60px;
  }

  .cart-table th:nth-child(2),
  .cart-table td:nth-child(2) {
    display: none; /* прячем колонку Price на очень узких экранах */
  }

  .cart-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cart-totals {
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}



/* Контейнер пункта меню с иконкой */
.nav-cart-item {
  margin-left: 16px;
}

/* Ссылка-иконка */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;      /* центровка по вертикали */
  justify-content: center;  /* центровка по горизонтали */
  vertical-align: middle;   /* выравнивание с текстом */
  font-size: 20px;          /* при необходимости можно подстроить размер */
  color: #3581FF;              /* цвет контура тележки */
}

/* SVG-тележка */
.cart-svg {
  width: 26px;
  height: 26px;
}

/* Бейдж с количеством */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #16c27a;              /* ЗЕЛЁНЫЕ цифры, как ты хотел */
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
