/* ============================================================
   MANTA — cart page layout (/cart)
   Page-specific layout only; tokens + components from manta.css.
   ============================================================ */

.cart-main {
  padding-top: var(--s5);
  padding-bottom: var(--s7);
}

.cart-head {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.cart-title { font-size: var(--text-h2); }
.cart-meta { font-size: .875rem; }

.cart-layout {
  display: grid;
  gap: var(--s5);
  align-items: start;
}
@media (min-width: 900px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--s6);
  }
  .cart-summary {
    position: sticky;
    top: calc(var(--header-h) + var(--s4));
  }
}

/* ---------- Line items ---------- */
.cart-items-panel { border-top: 1px solid var(--hairline); }
.cart-items-panel:has(.cart-empty) { border-top: 0; }

.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 36px;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--hairline);
}
.cart-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--r-img);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cart-item-name {
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-unit {
  font-size: .8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cart-stock-note {
  font-size: .75rem;
  font-weight: 500;
  margin-top: 2px;
}
.cart-stock-note.warn { color: var(--warn); }
.cart-stock-note.err { color: var(--err); }

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s3);
}
.cart-item .stepper button { width: 38px; height: 38px; }
.cart-item .stepper button svg { width: 16px; height: 16px; }
.cart-item .stepper .qty { min-width: 32px; font-size: .9375rem; }
.cart-item-total { font-size: 1rem; }

.remove-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--faint);
  transition: color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.remove-btn:hover { color: var(--ink); background: var(--surface); }
.remove-btn:active { transform: scale(.92); }
.remove-btn svg { width: 18px; height: 18px; }

/* ---------- Summary ---------- */
.cart-summary { padding: var(--s5); }
.cart-summary-title { font-size: var(--text-h3); margin-bottom: var(--s4); }
.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: .9375rem;
}
.summary-note {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: var(--s2);
}
.summary-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--muted);
  margin-top: var(--s3);
}
.summary-secure svg { width: 14px; height: 14px; flex: none; }
@media (min-width: 900px) {
  .cart-summary .m-actionbar { margin-top: var(--s4); }
}

/* ---------- Empty state ---------- */
.cart-empty {
  text-align: center;
  padding: var(--s8) var(--gutter);
}
.cart-empty > svg {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--s4);
  color: var(--faint);
}
.cart-empty h2 {
  font-size: 1.5rem;
  margin-bottom: var(--s2);
}
.cart-empty p { margin-bottom: var(--s5); }
.cart-empty .btn { min-width: 200px; }

/* ---------- Skeletons (initial paint before JS) ---------- */
.cart-skel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s4);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--hairline);
}
.cart-skel-thumb { width: 72px; height: 72px; }
.cart-skel-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.cart-skel-lines .skel { height: 14px; }
