/* Cart & checkout page (neo_site/cart.php) - builds on style.css variables */
.cart-page {
  background: #f7f8fb;
  padding: 28px 0 48px;
  min-height: 60vh;
}

.cart-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.cart-heading h1,
.cart-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bg-navyblue);
  margin: 0;
}

.cart-card {
  background: var(--white);
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: rgba(60, 64, 67, 0.08) 0px 1px 3px;
  padding: 20px 22px;
  margin-bottom: 18px;
}

.cart-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bg-navyblue);
  margin: 0 0 16px;
}
.cart-step span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-navyblue);
  color: var(--white);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-hint { font-size: 13px; color: #6b7080; margin: -6px 0 12px; }
.req { color: rgba(192, 8, 183, 0.9); }
.cart-page label { font-weight: 600; font-size: 14px; }
.cart-page .form-control { border-radius: 10px; min-height: 42px; border-color: #d9dce5; }
.cart-page .form-control:focus { border-color: var(--bg-navyblue); box-shadow: 0 0 0 0.2rem rgba(37, 43, 97, 0.12); }
.cart-page .form-control.is-invalid { border-color: #dc3545; }
.cart-page .text-uppercase::placeholder { text-transform: none; }

/* ---------------- Items */
.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid #f0f1f5;
}
.cart-item:first-child { border-top: 0; padding-top: 0; }
.cart-item.is-missing { opacity: 0.7; }
.cart-item.is-busy { opacity: 0.5; pointer-events: none; }
.cart-item-img {
  flex: none;
  width: 84px;
  height: 84px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #c5c9d6;
  font-size: 28px;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 600; color: #1f2233; display: block; line-height: 1.35; }
.cart-item-title:hover { color: var(--bg-navyblue); text-decoration: underline; }
.cart-item-meta { font-size: 13px; color: #6b7080; margin-top: 4px; }
.cart-item-color { font-size: 13px; color: #6b7080; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.cart-item-color b { color: #1f2233; font-weight: 600; }
/* same swatch as the product page's colour picker; the ring keeps white/silver visible */
.cart-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.cart-item-warn { color: #b42130; font-weight: 600; }
.cart-item-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.cart-item-total { font-weight: 700; white-space: nowrap; min-width: 100px; text-align: right; }

.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9dce5;
  border-radius: 999px;
  overflow: hidden;
}
.cart-qty button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--bg-navyblue);
  font-size: 18px;
  line-height: 1;
}
.cart-qty button:hover:not(:disabled) { background: #f0f1f7; }
.cart-qty button:disabled { color: #c5c9d6; }
.cart-qty input {
  width: 44px;
  border: 0;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.cart-qty input::-webkit-outer-spin-button,
.cart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-qty input:focus { outline: none; }

.cart-remove {
  border: 0;
  background: transparent;
  color: #6b7080;
  font-size: 13px;
  padding: 0;
}
.cart-remove:hover { color: #b42130; }

.cart-alert {
  background: #fff4e5;
  color: #8a5300;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}

/* ---------------- Option cards (delivery, payment) */
.cart-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cart-option { margin: 0; cursor: pointer; font-weight: normal !important; }
.cart-option input { position: absolute; opacity: 0; pointer-events: none; }
.cart-option-body {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px 14px;
  border: 2px solid #e6e8ee;
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.15s, background 0.15s;
}
.cart-option:hover .cart-option-body { border-color: #b9bdd3; }
.cart-option input:checked + .cart-option-body { border-color: var(--bg-navyblue); background: #f4f5fb; }
.cart-option input:focus-visible + .cart-option-body { box-shadow: 0 0 0 0.2rem rgba(37, 43, 97, 0.2); }
.cart-option input:disabled + .cart-option-body { opacity: 0.45; cursor: not-allowed; }
.cart-option-icon { font-size: 24px; color: rgba(192, 8, 183, 0.85); flex: none; }
.cart-option-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.cart-option-text b { font-size: 14.5px; color: #1f2233; }
.cart-option-text small { color: #6b7080; font-size: 12.5px; }
.cart-option-price { font-weight: 700; white-space: nowrap; color: var(--bg-navyblue); }

.cart-mpesa {
  margin-top: 14px;
  border: 1px solid #d7f0dc;
  background: #f3fbf5;
  border-radius: 12px;
  padding: 16px 18px;
}
.cart-mpesa ol { padding-left: 18px; margin-bottom: 14px; font-size: 14px; }
.cart-mpesa li { margin-bottom: 4px; }

/* ---------------- Summary */
.cart-summary { position: sticky; top: 16px; }
.cart-summary h2 { font-size: 1.1rem; font-weight: 700; color: var(--bg-navyblue); margin-bottom: 14px; }
.cart-summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin-bottom: 16px; }
.cart-summary dt { font-weight: normal; color: #6b7080; }
.cart-summary dd { margin: 0; padding-left: 12px; text-align: right; font-weight: 600; }
.cart-summary .cart-summary-total { font-size: 1.15rem; font-weight: 700; color: #1f2233; border-top: 1px solid #e6e8ee; padding-top: 10px; }

.cart-error { background: #fdecee; color: #b42130; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }

.cart-btn-primary,
.cart-btn-outline {
  display: inline-block;
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 600;
  text-align: center;
  border: 2px solid var(--bg-navyblue);
}
.cart-btn-primary { background: var(--btn-bg-navyblue); color: var(--white); }
.cart-btn-primary:hover { background: #1b2050; color: var(--white); }
.cart-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.cart-btn-outline { background: transparent; color: var(--bg-navyblue); }
.cart-btn-outline:hover { background: var(--bg-navyblue); color: var(--white); }

.cart-continue { display: block; text-align: center; margin-top: 12px; font-size: 14px; color: #6b7080; }
.cart-continue:hover { color: var(--bg-navyblue); }
.cart-trust { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f1f5; font-size: 13px; color: #6b7080; display: grid; gap: 6px; }
.cart-trust .mdi { color: rgba(192, 8, 183, 0.85); margin-right: 4px; }

/* ---------------- Empty / done */
.cart-empty,
.cart-done { padding: 48px 24px; max-width: 640px; margin: 20px auto; }
.cart-empty > .mdi { font-size: 56px; color: #c5c9d6; display: block; margin-bottom: 8px; }
.cart-empty p,
.cart-done p { margin: 10px 0 20px; }
.cart-done-icon { font-size: 60px; color: #0d8a37; display: block; line-height: 1; margin-bottom: 10px; }
.cart-done-code {
  display: inline-block;
  background: #f4f5fb;
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 18px;
  color: #6b7080;
}
.cart-done-code span { display: block; font-size: 1.4rem; font-weight: 700; letter-spacing: 0.04em; color: var(--bg-navyblue); }
.cart-done-facts { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; font-weight: 600; }
.cart-done-facts span { display: block; font-weight: normal; font-size: 12.5px; color: #6b7080; }

@media (max-width: 575.98px) {
  .cart-card { padding: 16px; border-radius: 12px; }
  .cart-item-img { width: 64px; height: 64px; }
  .cart-item { flex-wrap: wrap; }
  .cart-item-total { min-width: 0; text-align: left; padding-left: 80px; }
}

@media print {
  header, footer, .cart-btn-primary, .cart-btn-outline, .cart-continue { display: none !important; }
  .cart-page { background: #fff; }
}
