.cart-page {
  padding-top: 32px;
  padding-bottom: 40px;
}

.cart-hero h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.cart-subtitle {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 14px;
}

.cart-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  border-radius: 12px;
  border: 1px dashed #e5e7eb;
  background: #f9fafb;
}

.cart-empty p {
  margin-bottom: 14px;
  color: #6b7280;
}

.cart-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: flex-start;
}

.cart-items {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 14px 16px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cart-item-row:last-child {
  border-bottom: none;
}

.cart-item-main {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: #6b7280;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-qty {
  width: 64px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.cart-remove-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ef4444;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  cursor: pointer;
}

.cart-remove-btn:hover {
  background: #fee2e2;
}

.cart-summary {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 16px 16px 18px;
}

.cart-summary h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.summary-row:last-of-type {
  margin-bottom: 14px;
}

.cart-summary .btn {
  width: 100%;
  margin-top: 8px;
}

.btn.primary {
  background: #4f46e5;
  color: white;
  border: none;
}

.btn.primary:hover {
  background: #4338ca;
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
  border: none;
}

.btn.secondary:hover {
  background: #d1d5db;
}

.btn.danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn.danger:hover {
  background: #fecaca;
}

/* mobile */
@media (max-width: 768px) {
  .cart-wrap {
    grid-template-columns: 1fr;
  }
}

/* =====================================
   DARK MODE — CART (AMOLED + BLUE / RED)
   Active when body has .dark
===================================== */

body.dark {
  background:#000000;
}

/* ================= PAGE ================= */

body.dark .cart-page {
  background:#000000;
}

body.dark .cart-hero h2 {
  color:#ffffff;
}

body.dark .cart-subtitle {
  color:#9ca3af;
}

/* ================= EMPTY CART ================= */

body.dark .cart-empty {
  background:#050505;
  border:1px dashed #1f2937;
}

body.dark .cart-empty p {
  color:#9ca3af;
}

/* ================= CART ITEMS ================= */

body.dark .cart-items {
  background:#0b0b0b;
  border:1px solid #1f2937;
}

body.dark .cart-item-row {
  border-bottom:1px solid #1f2937;
}

body.dark .cart-item-title {
  color:#e5e7eb;
}

body.dark .cart-item-price {
  color:#9ca3af;
}

/* quantity input */
body.dark .cart-item-qty {
  background:#050505;
  color:#ffffff;
  border:1px solid #262626;
}

body.dark .cart-item-qty:focus {
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,0.25);
}

/* ================= REMOVE (DANGER) ================= */

body.dark .cart-remove-btn {
  background:#2a0f12;
  border-color:#7f1d1d;
  color:#fca5a5;
}

body.dark .cart-remove-btn:hover {
  background:#3f1417;
}

/* ================= SUMMARY ================= */

body.dark .cart-summary {
  background:#0b0b0b;
  border:1px solid #1f2937;
}

body.dark .cart-summary h3 {
  color:#ffffff;
}

body.dark .summary-row {
  color:#d1d5db;
}

/* ================= BUTTONS ================= */

body.dark .btn.primary {
  background:linear-gradient(135deg,#2563eb,#1e40af);
  color:#ffffff;
}

body.dark .btn.primary:hover {
  opacity:0.92;
}

body.dark .btn.secondary {
  background:#111827;
  color:#e5e7eb;
}

body.dark .btn.secondary:hover {
  background:#1f2937;
}

body.dark .btn.danger {
  background:#2a0f12;
  border:1px solid #7f1d1d;
  color:#fca5a5;
}

body.dark .btn.danger:hover {
  background:#3f1417;
}

/* ================= SMOOTH TRANSITIONS ================= */

.cart-items,
.cart-summary,
.cart-empty,
.cart-item-row,
.cart-item-qty,
.cart-remove-btn,
.btn {
  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}
