.cart-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.cart-toolbar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toolbar-left h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.toolbar-left .count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
}

.view-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.view-btn:hover {
  background: var(--bg-tertiary);
}

.view-btn.active {
  background: var(--bg-primary);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.view-btn i {
  font-size: 18px;
}

.cart-filter-bar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-select {
  min-width: 120px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-select:hover {
  border-color: var(--primary-color);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.filter-clear {
  padding: 6px 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-fast);
}

.filter-clear:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.filter-alert {
  background: var(--filter-alert-bg);
  border: 1px solid var(--filter-alert-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--filter-alert-text);
  font-size: 14px;
}

.filter-alert i {
  font-size: 18px;
}

.filter-alert-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.filter-alert-close:hover {
  opacity: 1;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  display: flex;
  gap: 20px;
  border: 1px solid transparent;
}

.cart-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.cart-item-checkbox {
  display: flex;
  align-items: flex-start;
  padding-top: 40px;
}

.cart-item-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.cart-item-img {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cart-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.cart-item-spec {
  font-size: 13px;
  color: var(--text-light);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.cart-item-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.cart-item-meta .meta-item i {
  font-size: 11px;
  opacity: 0.7;
}

.cart-item-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.cart-item-price small {
  font-size: 12px;
  margin-right: 2px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.quantity-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.quantity-input {
  width: 80px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.quantity-input:focus {
  outline: none;
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--delete-danger-light);
  color: var(--delete-danger);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-remove:hover {
  background: var(--delete-danger);
  color: var(--text-white);
}

.btn-view-product {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 12px;
  transition: var(--transition-fast);
}

.btn-view-product:hover {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

.cart-item-img,
.cart-grid-item-img {
  position: relative;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

#cartLoadingMore,
#cartNoMore {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

#cartLoadingMore i {
  margin-right: 8px;
}

.cart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.cart-grid-item {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  border: 1px solid transparent;
}

.cart-grid-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.cart-grid-item-img {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: 12px;
}

.cart-grid-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-grid-item-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  height: 42px;
  margin-bottom: 8px;
}

.cart-grid-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.cart-grid-item-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.cart-grid-item-meta .meta-item i {
  font-size: 10px;
  opacity: 0.7;
}

.cart-grid-item-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
}

.cart-grid-item-price small {
  font-size: 13px;
  margin-right: 2px;
}

.cart-grid-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.cart-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1000;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.select-all-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.total-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.total-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.total-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.total-price small {
  font-size: 16px;
  margin-right: 2px;
}

.checkout-btn {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  padding: 12px 40px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition-base);
  cursor: pointer;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.empty-state {
  text-align: center;
  padding: 100px 40px;
}

.empty-icon {
  font-size: 100px;
  margin-bottom: 24px;
  opacity: 0.3;
}

.empty-text {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.empty-btn {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 767px) {
  .cart-item {
    flex-direction: column;
    gap: 12px;
  }

  .cart-item-checkbox {
    padding-top: 0;
    width: 100%;
  }

  .cart-item-img {
    width: 100%;
    height: 200px;
  }

  .cart-item-bottom {
    width: 100%;
  }

  .cart-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
  }

  .footer-left {
    width: 100%;
    justify-content: space-between;
  }

  .checkout-btn {
    width: 100%;
  }
}

/* 暗色主题适配 */
[data-theme="dark"] .cart-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

[data-theme="dark"] .cart-toolbar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .toolbar-left h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

[data-theme="dark"] .toolbar-left .count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 8px;
}

[data-theme="dark"] .view-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
}

[data-theme="dark"] .view-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

[data-theme="dark"] .view-btn:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .view-btn.active {
  background: var(--bg-primary);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .view-btn i {
  font-size: 18px;
}

[data-theme="dark"] .cart-filter-bar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

[data-theme="dark"] .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .filter-group label {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

[data-theme="dark"] .filter-select {
  min-width: 120px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

[data-theme="dark"] .filter-select:hover {
  border-color: var(--primary-color);
}

[data-theme="dark"] .filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-light);
}

[data-theme="dark"] .filter-clear {
  padding: 6px 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-fast);
}

[data-theme="dark"] .filter-clear:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

[data-theme="dark"] .filter-alert {
  background: var(--filter-alert-bg);
  border: 1px solid var(--filter-alert-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--filter-alert-text);
  font-size: 14px;
}

[data-theme="dark"] .filter-alert i {
  font-size: 18px;
}

[data-theme="dark"] .filter-alert-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
}

[data-theme="dark"] .filter-alert-close:hover {
  opacity: 1;
}

[data-theme="dark"] .cart-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-theme="dark"] .cart-item {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  display: flex;
  gap: 20px;
  border: 1px solid transparent;
}

[data-theme="dark"] .cart-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .cart-item-checkbox {
  display: flex;
  align-items: flex-start;
  padding-top: 40px;
}

[data-theme="dark"] .cart-item-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

[data-theme="dark"] .cart-item-img {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
}

[data-theme="dark"] .cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

[data-theme="dark"] .cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

[data-theme="dark"] .cart-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

[data-theme="dark"] .cart-item-spec {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

[data-theme="dark"] .cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

[data-theme="dark"] .cart-item-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

[data-theme="dark"] .cart-item-meta .meta-item i {
  font-size: 11px;
  opacity: 0.7;
}

[data-theme="dark"] .cart-item-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .cart-item-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

[data-theme="dark"] .cart-item-price small {
  font-size: 12px;
  margin-right: 2px;
}

[data-theme="dark"] .quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

[data-theme="dark"] .quantity-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

[data-theme="dark"] .quantity-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

[data-theme="dark"] .quantity-input {
  width: 80px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

[data-theme="dark"] .quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

[data-theme="dark"] .quantity-input:focus {
  outline: none;
}

[data-theme="dark"] .cart-item-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--delete-danger-light);
  color: var(--delete-danger);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .cart-item-remove:hover {
  background: var(--delete-danger);
  color: var(--text-white);
}

[data-theme="dark"] .btn-view-product {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 12px;
  transition: var(--transition-fast);
}

[data-theme="dark"] .btn-view-product:hover {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

[data-theme="dark"] .cart-item-img,
[data-theme="dark"] .cart-grid-item-img {
  position: relative;
}

[data-theme="dark"] .cart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

[data-theme="dark"] .cart-grid-item {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  border: 1px solid transparent;
}

[data-theme="dark"] .cart-grid-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .cart-grid-item-img {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: 12px;
}

[data-theme="dark"] .cart-grid-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

[data-theme="dark"] .cart-grid-item-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  height: 42px;
  margin-bottom: 8px;
}

[data-theme="dark"] .cart-grid-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

[data-theme="dark"] .cart-grid-item-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

[data-theme="dark"] .cart-grid-item-meta .meta-item i {
  font-size: 10px;
  opacity: 0.7;
}

[data-theme="dark"] .cart-grid-item-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
}

[data-theme="dark"] .cart-grid-item-price small {
  font-size: 13px;
  margin-right: 2px;
}

[data-theme="dark"] .cart-grid-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

[data-theme="dark"] .cart-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1000;
}

[data-theme="dark"] .footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

[data-theme="dark"] .select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

[data-theme="dark"] .select-all-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

[data-theme="dark"] .total-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

[data-theme="dark"] .total-label {
  font-size: 14px;
  color: var(--text-secondary);
}

[data-theme="dark"] .total-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

[data-theme="dark"] .total-price small {
  font-size: 16px;
  margin-right: 2px;
}

[data-theme="dark"] .checkout-btn {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  padding: 12px 40px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition-base);
  cursor: pointer;
}

[data-theme="dark"] .checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .empty-state {
  text-align: center;
  padding: 100px 40px;
}

[data-theme="dark"] .empty-icon {
  font-size: 100px;
  margin-bottom: 24px;
  opacity: 0.3;
}

[data-theme="dark"] .empty-text {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 24px;
}

[data-theme="dark"] .empty-btn {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

[data-theme="dark"] .empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 767px) {
  [data-theme="dark"] .cart-item {
    flex-direction: column;
    gap: 12px;
  }

  [data-theme="dark"] .cart-item-checkbox {
    padding-top: 0;
    width: 100%;
  }

  [data-theme="dark"] .cart-item-img {
    width: 100%;
    height: 200px;
  }

  [data-theme="dark"] .cart-item-bottom {
    width: 100%;
  }

  [data-theme="dark"] .cart-grid {
    grid-template-columns: 1fr;
  }

  [data-theme="dark"] .footer-content {
    flex-direction: column;
    gap: 12px;
  }

  [data-theme="dark"] .footer-left {
    width: 100%;
    justify-content: space-between;
  }

  [data-theme="dark"] .checkout-btn {
    width: 100%;
  }
}

/* 暗色主题补充 - 修复 input 背景色 */
[data-theme="dark"] .quantity-input {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--text-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

[data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .btn-outline-danger {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .btn-outline-secondary:hover,
[data-theme="dark"] .btn-outline-danger:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-white);
}

/* 增强文字颜色对比度 */
[data-theme="dark"] .cart-item-meta,
[data-theme="dark"] .cart-grid-item-meta {
  color: var(--text-secondary);
}

[data-theme="dark"] .cart-item-meta .meta-item,
[data-theme="dark"] .cart-grid-item-meta .meta-item {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

[data-theme="dark"] .cart-item-meta .meta-item i,
[data-theme="dark"] .cart-grid-item-meta .meta-item i {
  color: var(--text-primary);
}

[data-theme="dark"] .filter-group label {
  color: var(--text-secondary);
}

[data-theme="dark"] .select-all-label {
  color: var(--text-secondary);
}

[data-theme="dark"] .total-label {
  color: var(--text-secondary);
}

