/* Cart — Cargo Bay
   Dynamic Island chrome · high-contrast controls · --lg-nav-* baseline */

.cb-cart {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 160px;
  color: var(--lg-ink);
}

.cb-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lg-copper-deep);
  font-weight: 800;
}

.cb-mast {
  margin-bottom: 22px;
  animation: lgFadeUp 0.65s var(--lg-ease) both;
}

.cb-mast h1 {
  margin: 6px 0;
  font-family: var(--lg-font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--lg-ink);
}

.cb-mast h1 span { color: var(--lg-sap); }

.cb-mast > p {
  margin: 0;
  color: var(--lg-nav-muted);
  font-weight: 500;
  line-height: 1.5;
  max-width: 48ch;
}

.cb-empty {
  padding: 48px 28px;
  text-align: center;
  border-radius: var(--lg-nav-radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed rgba(19, 32, 25, 0.22);
}

.cb-empty h2 {
  margin: 0 0 8px;
  font-family: var(--lg-font-display);
  color: var(--lg-ink);
}

.cb-empty p {
  margin: 0;
  color: var(--lg-nav-muted);
  font-weight: 500;
}

.cb-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--lg-nav-radius-sm);
  border: 1.5px solid var(--lg-nav-active-bg);
  background: var(--lg-nav-active-bg);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.cb-empty a:hover,
.cb-empty a:focus-visible {
  background: #0c563a;
  border-color: #0c563a;
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.cb-bay { display: grid; gap: 16px; }

.cb-lines { display: grid; gap: 12px; }

.cb-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  padding: 14px;
  border-radius: var(--lg-nav-radius);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(19, 32, 25, 0.14);
  align-items: center;
  box-shadow: 0 8px 24px rgba(19, 32, 25, 0.05);
  animation: lgFadeUp 0.5s var(--lg-ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
  transition: transform 0.25s var(--lg-ease), border-color 0.25s, box-shadow 0.25s;
}

.cb-line:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 107, 72, 0.45);
  box-shadow: 0 12px 28px rgba(19, 32, 25, 0.08);
}

@media (max-width: 720px) {
  .cb-line { grid-template-columns: 72px 1fr; }
  .cb-controls {
    grid-column: 1 / -1;
    justify-items: stretch;
  }
  .cb-qty { width: 100%; max-width: 160px; }
  .cb-controls .cb-line-total,
  .cb-controls .cb-remove { justify-self: start; }
}

.cb-thumb {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  border-radius: var(--lg-nav-radius-sm);
  overflow: hidden;
  background: var(--lg-soil);
}

@media (max-width: 720px) {
  .cb-thumb { width: 72px; height: 72px; }
}

.cb-thumb:focus-visible {
  outline: 2px solid var(--lg-sap);
  outline-offset: 2px;
}

.cb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-idx {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--lg-nav-ink);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}

.cb-body h2 {
  margin: 4px 0;
  font-family: var(--lg-font-display);
  font-size: 1.05rem;
  color: var(--lg-ink);
}

.cb-body h2 a {
  color: inherit;
  text-decoration: none;
}

.cb-body h2 a:hover,
.cb-body h2 a:focus-visible {
  color: var(--lg-sap);
  outline: none;
}

.cb-aisle {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lg-copper-deep);
  font-weight: 800;
}

.cb-meta {
  margin: 0;
  color: var(--lg-nav-muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.cb-meta em {
  font-style: normal;
  font-weight: 700;
  color: var(--lg-nav-muted);
}

.cb-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.cb-qty {
  display: inline-grid;
  grid-template-columns: 40px 52px 40px;
  border: 1.5px solid rgba(19, 32, 25, 0.18);
  border-radius: var(--lg-nav-radius-sm);
  overflow: hidden;
  background: #ffffff;
}

.cb-qty button {
  appearance: none;
  border: 0;
  background: var(--lg-panel);
  color: var(--lg-nav-ink);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  min-height: 42px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cb-qty button:hover,
.cb-qty button:focus-visible {
  background: var(--lg-nav-ink);
  color: #ffffff;
  outline: none;
}

.cb-qty input {
  border: 0;
  text-align: center;
  font: inherit;
  font-weight: 800;
  color: var(--lg-ink);
  width: 100%;
  background: #ffffff;
  min-height: 42px;
}

.cb-qty input:focus {
  outline: none;
  background: rgba(20, 145, 95, 0.06);
}

.cb-line-total {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--lg-ink);
  font-family: var(--lg-font-display);
}

.cb-remove {
  appearance: none;
  border: 1.5px solid rgba(140, 40, 40, 0.35);
  background: #f8eaea;
  color: #6b1f1f;
  font: inherit;
  font-weight: 800;
  font-size: 0.78rem;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--lg-nav-radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cb-remove:hover,
.cb-remove:focus-visible {
  background: #6b1f1f;
  border-color: #6b1f1f;
  color: #ffffff;
  outline: none;
}

.cb-side {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

@media (max-width: 800px) {
  .cb-side { grid-template-columns: 1fr; }
}

.cb-promo,
.cb-ship {
  padding: 16px;
  border-radius: var(--lg-nav-radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(19, 32, 25, 0.14);
}

.cb-promo input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px dashed rgba(19, 32, 25, 0.22);
  border-radius: var(--lg-nav-radius-sm);
  padding: 11px 12px;
  background: var(--lg-panel);
  font: inherit;
  font-weight: 600;
  color: var(--lg-nav-muted);
}

.cb-ship {
  display: flex;
  align-items: center;
  color: var(--lg-nav-muted);
  font-weight: 600;
  line-height: 1.45;
}

.cb-settle {
  position: sticky;
  bottom: 12px;
  z-index: 40;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: var(--lg-nav-radius);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(19, 32, 25, 0.16);
  box-shadow:
    0 16px 40px rgba(19, 32, 25, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cb-settle-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cb-settle-n {
  font-family: var(--lg-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--lg-sap);
}

.cb-settle-figs {
  display: flex;
  gap: 16px;
  margin: 0;
  flex-wrap: wrap;
}

.cb-settle-figs div { min-width: 70px; }

.cb-settle-figs dt {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lg-nav-muted);
  font-weight: 800;
}

.cb-settle-figs dd {
  margin: 2px 0 0;
  font-weight: 800;
  color: var(--lg-ink);
}

.cb-settle-grand dd {
  color: var(--lg-sap);
  font-size: 1.15rem;
  font-family: var(--lg-font-display);
}

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cb-actions button,
.cb-actions a {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  border-radius: var(--lg-nav-radius-sm);
  min-height: 48px;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.cb-sync {
  background: #ffffff;
  color: var(--lg-nav-ink);
  border-color: rgba(19, 32, 25, 0.2) !important;
}

.cb-sync:hover,
.cb-sync:focus-visible {
  background: var(--lg-nav-ink);
  border-color: var(--lg-nav-ink) !important;
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.cb-sync.is-dirty {
  border-color: var(--lg-copper) !important;
  color: var(--lg-copper-deep);
  background: #f8efe6;
}

.cb-sync.is-dirty:hover,
.cb-sync.is-dirty:focus-visible {
  background: var(--lg-copper-deep);
  border-color: var(--lg-copper-deep) !important;
  color: #ffffff;
}

.cb-checkout {
  background: var(--lg-nav-active-bg);
  border-color: var(--lg-nav-active-bg);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 107, 72, 0.22);
}

.cb-checkout:hover,
.cb-checkout:focus-visible {
  background: #0c563a;
  border-color: #0c563a;
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.cb-keep {
  background: var(--lg-panel);
  color: var(--lg-nav-ink);
  border-color: rgba(19, 32, 25, 0.16) !important;
}

.cb-keep:hover,
.cb-keep:focus-visible {
  background: var(--lg-nav-ink);
  border-color: var(--lg-nav-ink) !important;
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .cb-actions { width: 100%; }
  .cb-actions button,
  .cb-actions a { flex: 1 1 100%; }
  .cb-settle { bottom: 10px; }
}
