/* LUMIVALE — Manifest Bay (cart)
   Stacked cargo lines · promo ticket stub · sticky settlement ribbon
   Container queries · fluid type — NOT Glass Tray deck / circular ledger */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700;6..12,800&display=swap');

.page-manifest {
  --mf-bg: #0c0b09;
  --mf-panel: #161411;
  --mf-line: rgba(245, 236, 220, 0.1);
  --mf-text: #f5ecdc;
  --mf-mute: #d2c9b8;
  --mf-coral: #ff4f3e;
  --mf-sage: #7cb892;
  --mf-gold: #e2b25a;
  --mf-font: 'Nunito Sans', system-ui, sans-serif;
  --mf-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --mf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mf-settle-h: 5.5rem;
  background: var(--mf-bg) !important;
  color: var(--mf-text);
  font-family: var(--mf-font);
}

.page-manifest .page-main {
  overflow-x: clip;
  padding-bottom: calc(var(--mf-settle-h) + 2.5rem);
}

.page-manifest .a59-tabbar {
  display: none;
}

.mf {
  position: relative;
  padding: 1.4rem var(--space-container, 1.25rem) 2rem;
  max-width: 980px;
  margin: 0 auto;
}

.mf-mast {
  margin-bottom: 1.75rem;
}

.mf-brand {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mf-sage);
  font-weight: 800;
}

.mf-mast h1 {
  margin: 0 0 0.45rem;
  font-family: var(--mf-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 0.96;
}

.mf-mast h1 span {
  color: var(--mf-coral);
}

.mf-lede {
  margin: 0;
  color: var(--mf-mute);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  max-width: 40ch;
}

/* Empty */
.mf-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--mf-line);
  border-radius: 20px;
  background: var(--mf-panel);
}

.mf-empty-mark {
  font-size: 2.4rem;
  color: var(--mf-gold);
  margin-bottom: 0.75rem;
}

.mf-empty h2 {
  margin: 0 0 0.4rem;
  font-family: var(--mf-display);
  font-size: 1.8rem;
}

.mf-empty p {
  margin: 0 0 1.25rem;
  color: var(--mf-mute);
}

.mf-cta {
  display: inline-flex;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--mf-coral);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.3s var(--mf-ease), box-shadow 0.3s;
}

.mf-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(255, 79, 62, 0.35);
  color: #fff;
}

/* Bay layout */
.mf-bay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  gap: 1.25rem;
  align-items: start;
}

.mf-lines {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  container-type: inline-size;
  container-name: manifines;
}

/* Cargo line — container queries */
.mf-line {
  container-type: inline-size;
  container-name: mfline;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 18px;
  background: var(--mf-panel);
  border: 1px solid var(--mf-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(14px);
  animation: mfIn 0.5s var(--mf-ease) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform 0.35s var(--mf-ease), border-color 0.3s, opacity 0.3s;
}

@keyframes mfIn {
  to { opacity: 1; transform: none; }
}

.mf-line.is-bump {
  animation: mfBump 0.35s var(--mf-ease);
}

@keyframes mfBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.01); }
  100% { transform: none; }
}

.mf-line.is-removing {
  opacity: 0;
  transform: translateX(24px) scale(0.96);
  pointer-events: none;
}

.mf-line:hover {
  border-color: rgba(226, 178, 90, 0.35);
}

.mf-thumb {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0908;
  flex-shrink: 0;
}

.mf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--mf-ease);
}

.mf-line:hover .mf-thumb img {
  transform: scale(1.06);
}

.mf-idx {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(12, 11, 9, 0.8);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--mf-gold);
}

.mf-body {
  min-width: 0;
}

.mf-aisle {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mf-sage);
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.mf-body h2 {
  margin: 0 0 0.25rem;
  font-family: var(--mf-display);
  font-size: clamp(1rem, 2.5cqi, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mf-body h2 a {
  color: inherit;
  text-decoration: none;
}

.mf-body h2 a:hover {
  color: var(--mf-gold);
}

.mf-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--mf-mute);
}

.mf-meta em {
  font-style: normal;
  color: var(--mf-mute);
}

.mf-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.mf-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--mf-line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(12, 11, 9, 0.55);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.mf-qty.is-flash {
  border-color: rgba(124, 184, 146, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 184, 146, 0.15);
}

.mf-qty button {
  width: 2.2rem;
  border: 0;
  background: transparent;
  color: var(--mf-text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mf-qty button:hover {
  background: rgba(255, 79, 62, 0.15);
  color: var(--mf-coral);
}

.mf-qty input {
  width: 2.4rem;
  border: 0;
  background: transparent;
  color: var(--mf-text);
  text-align: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  outline: none;
  -moz-appearance: textfield;
}

.mf-qty input::-webkit-outer-spin-button,
.mf-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mf-line-total {
  font-family: var(--mf-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--mf-gold);
}

.mf-line-total.is-tick {
  animation: mfTick 0.3s var(--mf-ease);
}

@keyframes mfTick {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); color: var(--mf-coral); }
  100% { transform: none; }
}

.mf-remove {
  border: 0;
  background: transparent;
  color: var(--mf-mute);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-family: inherit;
  padding: 0;
  transition: color 0.25s;
}

.mf-remove:hover {
  color: var(--mf-coral);
}

@container mfline (max-width: 520px) {
  .mf-line {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .mf-controls {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

/* Promo ticket stub */
.mf-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: calc(var(--dock-h, 4rem) + 0.75rem);
}

.mf-promo-stub {
  position: relative;
  padding: 1.15rem 1.1rem 1.2rem;
  background:
    radial-gradient(circle at 0 50%, transparent 8px, var(--mf-panel) 9px),
    radial-gradient(circle at 100% 50%, transparent 8px, var(--mf-panel) 9px);
  background-color: var(--mf-panel);
  background-position: left center, right center;
  background-size: 100% 100%;
  border: 1px dashed rgba(226, 178, 90, 0.35);
  border-radius: 12px;
}

.mf-promo-stub::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 42%;
  border-top: 1px dashed rgba(245, 236, 220, 0.12);
  pointer-events: none;
}

.mf-promo-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mf-gold);
  font-weight: 800;
}

.mf-promo-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.mf-promo-field span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mf-mute);
}

.mf-promo-field input {
  border: 1px solid var(--mf-line);
  background: rgba(12, 11, 9, 0.55);
  color: var(--mf-mute);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 0.88rem;
}

.mf-promo-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--mf-mute);
  line-height: 1.4;
}

.mf-ship-hint {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(124, 184, 146, 0.1);
  border: 1px solid rgba(124, 184, 146, 0.28);
  color: #c5e6d0;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

/* Sticky settlement ribbon */
.mf-settle {
  position: fixed;
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem var(--space-container, 1.25rem) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(12, 11, 9, 0.92);
  border-top: 1px solid var(--mf-line);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45);
}

.mf-settle-inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.mf-settle-counts {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mf-settle-n {
  font-family: var(--mf-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--mf-coral);
}

.mf-settle-n.is-pop {
  animation: mfTick 0.35s var(--mf-ease);
}

.mf-settle-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mf-mute);
  font-weight: 800;
}

.mf-settle-figs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  justify-content: center;
}

.mf-settle-figs div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.mf-settle-figs dt {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-mute);
  font-weight: 800;
}

.mf-settle-figs dd {
  margin: 0;
  font-weight: 800;
  font-size: 0.95rem;
}

.mf-settle-grand dd {
  font-family: var(--mf-display);
  font-size: 1.35rem;
  color: var(--mf-gold);
}

.mf-settle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.mf-sync,
.mf-checkout,
.mf-keep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.3s var(--mf-ease), background 0.25s, border-color 0.25s, color 0.25s;
}

.mf-sync {
  border: 1px solid var(--mf-line);
  background: transparent;
  color: var(--mf-text);
}

.mf-sync.is-dirty {
  border-color: rgba(255, 79, 62, 0.55);
  color: var(--mf-coral);
  box-shadow: 0 0 0 3px rgba(255, 79, 62, 0.12);
}

.mf-sync:hover {
  transform: translateY(-2px);
}

.mf-checkout {
  border: 0;
  background: var(--mf-coral);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 79, 62, 0.28);
}

.mf-checkout:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 14px 36px rgba(255, 79, 62, 0.4);
}

.mf-keep {
  border: 1px solid var(--mf-line);
  background: transparent;
  color: var(--mf-mute);
}

.mf-keep:hover {
  color: var(--mf-text);
  border-color: rgba(124, 184, 146, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .mf-line,
  .mf-line-total.is-tick,
  .mf-settle-n.is-pop {
    animation: none !important;
  }

  .mf-line {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  .mf-bay {
    grid-template-columns: 1fr;
  }

  .mf-side {
    position: relative;
    top: auto;
    order: -1;
  }

  .mf-settle-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .mf-settle-figs {
    justify-content: flex-start;
  }

  .mf-settle-actions {
    justify-content: stretch;
  }

  .mf-sync,
  .mf-checkout,
  .mf-keep {
    flex: 1 1 auto;
  }

  .page-manifest {
    --mf-settle-h: 11rem;
  }
}
