/**
 * Тёмная тема — корзина (body.page-cart).
 * Перекрывает инлайн-стили страницы корзины.
 */
[data-theme="dark"] body.page-cart {
  background: var(--bg) !important;
  color: var(--text);
}

[data-theme="dark"] body.page-cart .bc {
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.page-cart .bc a {
  color: var(--primary) !important;
}

[data-theme="dark"] body.page-cart h1 {
  color: var(--text) !important;
}

[data-theme="dark"] body.page-cart h1 span {
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.page-cart .mod-pill:not(.active) {
  background: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-theme="dark"] body.page-cart .ci-card {
  background: var(--card) !important;
  border-bottom-color: var(--border) !important;
}

[data-theme="dark"] body.page-cart .ci-card:hover {
  background: var(--bg-secondary) !important;
}

/*
 * Предзаказ: градиент на .ci-card.
 * В style.css [data-theme="dark"] .ci { background: var(--card) } перекрывает карточку —
 * внутренний .ci.ci--preorder прозрачный.
 */
[data-theme="dark"] body.page-cart .ci.ci--preorder {
  background: transparent !important;
}

[data-theme="dark"] body.page-cart .ci-card.ci--preorder {
  background: linear-gradient(
    90deg,
    rgba(255, 152, 0, 0.28) 0%,
    rgba(255, 152, 0, 0.1) 42%,
    var(--card) 100%
  ) !important;
}

[data-theme="dark"] body.page-cart .ci-card.ci--preorder:hover {
  background: linear-gradient(
    90deg,
    rgba(255, 152, 0, 0.36) 0%,
    rgba(255, 152, 0, 0.14) 40%,
    var(--bg-secondary) 100%
  ) !important;
}

/* Как у остальных primary в тёмной теме (инлайн #005BFF в cart.php) */
[data-theme="dark"] body.page-cart .sb .btn-co {
  background: var(--primary) !important;
  color: #fff !important;
}
[data-theme="dark"] body.page-cart .sb .btn-co:hover {
  background: var(--primary-hover) !important;
}
[data-theme="dark"] body.page-cart .sb .btn-ct {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}
[data-theme="dark"] body.page-cart .sb .btn-ct:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

[data-theme="dark"] body.page-cart .ci-img-wrap {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] body.page-cart .ci-name {
  color: var(--text) !important;
}

[data-theme="dark"] body.page-cart .ci-mod {
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.page-cart .ci-price {
  color: var(--primary) !important;
}

[data-theme="dark"] body.page-cart .ci-total {
  color: var(--text) !important;
}

[data-theme="dark"] body.page-cart .ci-hint-row {
  color: #ffab40 !important;
}

[data-theme="dark"] body.page-cart .sb {
  background: var(--card) !important;
  box-shadow: var(--shadow-md) !important;
}

[data-theme="dark"] body.page-cart .sb h3 {
  color: var(--text) !important;
}

[data-theme="dark"] body.page-cart .sb-row {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] body.page-cart .sb-row.tot {
  border-top-color: var(--border) !important;
}

[data-theme="dark"] body.page-cart .empty {
  background: var(--card) !important;
  box-shadow: var(--shadow-md) !important;
}

[data-theme="dark"] body.page-cart .empty i {
  color: var(--border) !important;
}

[data-theme="dark"] body.page-cart .empty p {
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.page-cart .ft {
  color: var(--text-muted) !important;
}

[data-theme="dark"] body.page-cart #promo-discount-row {
  color: #81c784 !important;
}

[data-theme="dark"] body.page-cart #cart-vat-row {
  color: var(--text-secondary) !important;
}

/* «Очистить корзину»: тёмная кнопка до наведения; при hover — заливка danger */
[data-theme="dark"] body.page-cart .clear-cart-btn {
  background: var(--bg-secondary) !important;
  color: #e57373 !important;
  border-color: rgba(229, 115, 115, 0.5) !important;
  box-shadow: none !important;
}
[data-theme="dark"] body.page-cart .clear-cart-btn:hover {
  background: var(--danger) !important;
  color: #fff !important;
  border-color: var(--danger) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.35) !important;
}
[data-theme="dark"] body.page-cart .clear-cart-btn:active {
  transform: translateY(0);
}
@media (max-width: 768px) {
  [data-theme="dark"] body.page-cart .clear-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4) !important;
  }
}
