.cart-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px clamp(16px, 2vw, 28px) 60px;
}

.cart-head {
  margin-bottom: 24px;
}
.cart-head h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-1);
  margin: 2px 0 4px;
}
.cart-head p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}
.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-left: 8px;
  vertical-align: middle;
}

/* Login gate */
.cart-login-gate {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.cart-login-gate .gate-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.cart-login-gate h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 8px;
}
.cart-login-gate p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
  line-height: 1.6;
}
.cart-login-gate .btn-login-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}
.cart-login-gate .btn-login-cart:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Empty cart */
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.cart-empty h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 6px;
}
.cart-empty p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.cart-empty .btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}
.cart-empty .btn-shop:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Cart items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cart-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.cart-item:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.cart-item-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.cart-item-body {
  min-width: 0;
}
.cart-item-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.cart-item-type.type-gamepass {
  background: #d1fae5;
  color: #065f46;
}
.cart-item-type.type-login {
  background: #dbeafe;
  color: #1e40af;
}
.cart-item-type.type-item {
  background: #fef3c7;
  color: #92400e;
}
.cart-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-meta {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.cart-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cart-item-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-item-checkout {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  white-space: nowrap;
}
.cart-item-checkout:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.cart-item-checkout:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.cart-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-3);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.cart-item-remove:hover {
  border-color: var(--error);
  color: var(--error);
  background: var(--error-light);
}

/* Cart summary */
.cart-summary {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.cart-summary-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 14px;
}
.cart-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.cart-summary-row span {
  color: var(--text-2);
  font-weight: 500;
}
.cart-summary-row strong {
  color: var(--text-1);
  font-weight: 700;
}
.cart-summary-row.total {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 16px;
}
.cart-summary-row.total span {
  color: var(--text-1);
  font-weight: 700;
}
.cart-summary-row.total strong {
  color: var(--primary);
  font-weight: 800;
  font-size: 18px;
}

.cart-checkout-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-checkout-all {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn-checkout-all:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29, 185, 106, 0.3);
}
.btn-checkout-all:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-clear-cart {
  min-height: 48px;
  padding: 12px 20px;
  background: #fff;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s, color 0.18s;
}
.btn-clear-cart:hover {
  border-color: var(--error);
  color: var(--error);
}

/* Responsive */
@media (max-width: 640px) {
  .cart-wrap { padding: 16px 12px 80px; }
  .cart-head h1 { font-size: 20px; }
  .cart-item {
    grid-template-columns: 44px 1fr;
    gap: 10px;
  }
  .cart-item-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .cart-item-right {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .cart-item-actions { gap: 6px; }
  .cart-item-checkout { padding: 8px 16px; font-size: 13px; }
  .cart-item-remove { width: 36px; height: 36px; }
  .cart-summary { padding: 16px; }
  .cart-checkout-row { flex-direction: column; }
  .btn-checkout-all, .btn-clear-cart { width: 100%; }
}
