﻿/* Manifest Deck cart — independent of Appily cart / checkout patterns */
.mf-page {
  --mf-ink: #12151c;
  --mf-slate: #334052;
  --mf-fog: #e9eef5;
  --mf-snow: #f7f9fc;
  --mf-line: rgba(18, 21, 28, 0.12);
  --mf-blue: #1f6fff;
  --mf-blue-deep: #154fbf;
  --mf-gold: #c99216;
  --mf-night: #0d1118;
  --mf-font: 'IBM Plex Sans', system-ui, sans-serif;
  --mf-display: 'Lexend', system-ui, sans-serif;
  --mf-mono: 'Share Tech Mono', ui-monospace, monospace;
  --mf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mf-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

.mf-page .a68-main {
  padding-top: 4.5rem;
}

.mf-deck {
  position: relative;
  isolation: isolate;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.15rem, 3vw, 2.25rem) clamp(1rem, 2.8vw, 1.5rem) 3.5rem;
  font-family: var(--mf-font);
  color: var(--mf-ink);
}

.mf-wash {
  position: absolute;
  inset: -5% -14% auto;
  height: min(42vh, 320px);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 70% at 12% 40%, rgba(31, 111, 255, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 60% at 88% 15%, rgba(201, 146, 22, 0.14), transparent 65%),
    linear-gradient(180deg, var(--mf-fog), transparent);
}

.mf-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  animation: mf-rise 0.55s var(--mf-ease) both;
}

.mf-hero-copy {
  min-width: 0;
  flex: 1 1 16rem;
}

.mf-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--mf-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mf-blue-deep);
}

.mf-title-brand {
  display: block;
  font-family: var(--mf-display);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mf-gold);
  margin-bottom: 0.2rem;
}

.mf-title-cart {
  display: block;
  font-family: var(--mf-display);
  font-size: clamp(2.6rem, 7vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--mf-ink);
}

.mf-lede {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  color: var(--mf-slate);
  font-size: 1.05rem;
  line-height: 1.55;
}

.mf-barcode {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--mf-night);
  color: #fff;
  min-width: 7.5rem;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.mf-barcode-label {
  font-family: var(--mf-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  opacity: 0.65;
}

.mf-barcode strong {
  font-family: var(--mf-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.mf-barcode-bars {
  width: 100%;
  height: 1.1rem;
  margin-top: 0.35rem;
  background: repeating-linear-gradient(
    90deg,
    #fff 0 2px,
    transparent 2px 4px,
    #fff 4px 5px,
    transparent 5px 8px,
    #fff 8px 11px,
    transparent 11px 13px
  );
  opacity: 0.85;
}

/* Empty */
.mf-empty {
  text-align: center;
  padding: 3rem 1.25rem;
  background: #fff;
  border: 1px dashed var(--mf-line);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  animation: mf-rise 0.55s var(--mf-ease) both;
}

.mf-crate {
  width: 4.5rem;
  height: 3.2rem;
  margin: 0 auto 1.25rem;
  position: relative;
}

.mf-crate span {
  position: absolute;
  inset: 0;
  border: 2px solid var(--mf-blue);
  opacity: 0.35;
  transform-origin: bottom;
}

.mf-crate span:nth-child(1) { transform: perspective(40px) rotateX(12deg); opacity: 0.9; }
.mf-crate span:nth-child(2) { transform: translateY(-8px) scale(0.92); }
.mf-crate span:nth-child(3) { transform: translateY(-16px) scale(0.84); }

.mf-empty h2 {
  margin: 0 0 0.45rem;
  font-family: var(--mf-display);
  font-size: 1.75rem;
  font-weight: 800;
}

.mf-empty p {
  margin: 0 0 1.35rem;
  color: var(--mf-slate);
}

.mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.3rem;
  font-family: var(--mf-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s var(--mf-spring), filter 0.2s;
}

.mf-btn:hover {
  transform: translateY(-2px);
}

.mf-btn-fill {
  background: var(--mf-blue);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* Form layout — stacked manifest + bottom dock (not tray+aside) */
.mf-form {
  display: grid;
  gap: 1.35rem;
}

.mf-manifest {
  display: grid;
  gap: 0.9rem;
}

.mf-stub {
  display: grid;
  grid-template-columns: auto minmax(6.5rem, 9rem) minmax(0, 1.4fr) auto auto;
  gap: 1rem 1.1rem;
  align-items: center;
  padding: 1rem 1.1rem 1rem 0.75rem;
  background: #fff;
  border: 1px solid var(--mf-line);
  box-shadow: 0 12px 32px rgba(18, 21, 28, 0.05);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  animation: mf-stub-in 0.5s var(--mf-ease) both;
  animation-delay: calc(var(--mf-i, 0) * 0.05s);
  transition: transform 0.3s var(--mf-spring), box-shadow 0.3s, border-color 0.25s;
}

.mf-stub:hover {
  transform: translateX(4px);
  box-shadow: 0 18px 44px rgba(18, 21, 28, 0.1);
  border-color: rgba(31, 111, 255, 0.3);
}

@keyframes mf-stub-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.mf-stub-index {
  font-family: var(--mf-mono);
  font-size: 0.85rem;
  color: #3f4d5f;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.08em;
}

.mf-stub-media {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--mf-fog);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  text-decoration: none;
}

.mf-stub-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--mf-ease);
}

.mf-stub:hover .mf-stub-media img {
  transform: scale(1.06);
}

.mf-stub-aisle {
  margin: 0 0 0.25rem;
  font-family: var(--mf-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mf-blue-deep);
}

.mf-stub-title {
  margin: 0;
  font-family: var(--mf-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mf-stub-title a {
  color: var(--mf-ink);
  text-decoration: none;
}

.mf-stub-title a:hover {
  color: var(--mf-blue);
}

.mf-stub-variant {
  margin: 0.3rem 0 0;
  color: var(--mf-slate);
  font-size: 0.9rem;
}

.mf-stub-unit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--mf-slate);
}

.mf-stub-sku {
  font-family: var(--mf-mono);
  font-size: 0.78rem;
}

/* Qty dial */
.mf-dial {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  min-width: 7.5rem;
}

.mf-dial-label {
  font-family: var(--mf-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mf-slate);
}

.mf-dial-ring {
  display: grid;
  grid-template-columns: 2.2rem 3rem 2.2rem;
  align-items: center;
  padding: 0.25rem;
  background: var(--mf-night);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mf-dial-ring button {
  appearance: none;
  border: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--mf-spring);
}

.mf-dial-ring button:hover {
  background: var(--mf-blue);
  transform: scale(1.06);
}

.mf-dial-ring input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  font-family: var(--mf-display);
  font-size: 1.05rem;
  font-weight: 700;
  -moz-appearance: textfield;
}

.mf-dial-ring input::-webkit-outer-spin-button,
.mf-dial-ring input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mf-dial-ring input:focus {
  outline: none;
}

.mf-dial-hint {
  margin: 0;
  font-size: 0.68rem;
  color: #3f4d5f;
}

.mf-stub-total {
  text-align: right;
  min-width: 5.5rem;
}

.mf-stub-total-label {
  display: block;
  font-family: var(--mf-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3f4d5f;
  margin-bottom: 0.2rem;
}

.mf-stub-total strong {
  font-family: var(--mf-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--mf-ink);
}

/* Dock */
.mf-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 0.9rem;
  padding: 1.1rem;
  background: linear-gradient(145deg, #0d1118 0%, #152033 55%, #0f2a4a 100%);
  color: #e8eef6;
  box-shadow: 0 28px 60px rgba(13, 17, 24, 0.35);
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% 100%, 0 100%);
  animation: mf-rise 0.65s var(--mf-ease) 0.08s both;
}

.mf-dock-panel {
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mf-dock-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--mf-display);
  font-size: 1.15rem;
  font-weight: 750;
  color: #fff;
}

.mf-dock-head p {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  color: rgba(232, 238, 246, 0.88);
}

.mf-stamp {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  gap: 0;
  background: #fff;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  overflow: hidden;
}

.mf-stamp-seal {
  display: grid;
  place-items: center;
  padding: 0 0.75rem;
  background: var(--mf-gold);
  color: var(--mf-night);
  font-family: var(--mf-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.mf-stamp input {
  border: 0;
  padding: 0.85rem 0.75rem;
  font: inherit;
  font-family: var(--mf-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mf-ink);
  outline: none;
  min-width: 0;
}

.mf-stamp input::placeholder {
  color: #4a586a;
  letter-spacing: 0.04em;
  text-transform: none;
  font-family: var(--mf-font);
}

.mf-stamp-go {
  appearance: none;
  border: 0;
  padding: 0 1.1rem;
  background: var(--mf-blue);
  color: #fff;
  font-family: var(--mf-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: filter 0.2s, background 0.2s;
}

.mf-stamp-go:hover {
  filter: brightness(1.08);
  background: var(--mf-blue-deep);
}

.mf-promo-flash {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: rgba(232, 238, 246, 0.7);
}

.mf-promo-flash.is-miss {
  color: #c24a3a;
}

.mf-promo-flash.is-ok {
  color: #2a6b4f;
}

.mf-promo.is-pulse {
  animation: mf-promo-pulse 0.8s var(--mf-ease);
}

@keyframes mf-promo-pulse {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 3px rgba(31, 111, 255, 0.45); }
}

.mf-stub.is-zero {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.mf-ledger {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.mf-ledger > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.mf-ledger dt {
  font-size: 0.9rem;
  color: rgba(232, 238, 246, 0.88);
}

.mf-ledger dd {
  margin: 0;
  font-family: var(--mf-display);
  font-weight: 700;
  color: #fff;
}

.mf-ledger-grand {
  border-bottom: 0;
  padding-top: 0.25rem;
}

.mf-ledger-grand dt,
.mf-ledger-grand dd {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 800;
}

.mf-ledger-grand dd {
  color: var(--mf-gold);
  font-size: 1.35rem;
}

.mf-ship-pill {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid rgba(255, 255, 255, 0.25);
  color: rgba(232, 238, 246, 0.75);
}

.mf-ship-pill.is-free {
  border-left-color: #1f8a5a;
  color: #2a6b4f;
}

.mf-paths {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.mf-path {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.05rem;
  text-decoration: none;
  text-align: left;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 0.25s var(--mf-spring), background 0.2s, border-color 0.2s, filter 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.mf-path strong {
  font-family: var(--mf-display);
  font-size: 1rem;
  font-weight: 750;
}

.mf-path span {
  font-size: 0.78rem;
  color: rgba(232, 238, 246, 0.88);
}

.mf-path:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.mf-path-primary {
  background: var(--mf-blue);
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(31, 111, 255, 0.35);
}

.mf-path-primary span {
  color: rgba(255, 255, 255, 0.8);
}

.mf-path-primary:hover {
  filter: brightness(1.06);
  background: var(--mf-blue);
}

.mf-path-ghost {
  background: transparent;
}

.mf-path-link {
  border-style: dashed;
}

@keyframes mf-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .mf-stub {
    grid-template-columns: auto minmax(5.5rem, 7rem) 1fr;
    grid-template-areas:
      'idx media copy'
      'idx dial total';
  }

  .mf-stub-index { grid-area: idx; }
  .mf-stub-media { grid-area: media; }
  .mf-stub-copy { grid-area: copy; }
  .mf-dial { grid-area: dial; justify-items: start; }
  .mf-stub-total { grid-area: total; align-self: center; }

  .mf-dock {
    grid-template-columns: 1fr;
  }

  .mf-paths {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mf-stub {
    grid-template-columns: 5.5rem 1fr;
    grid-template-areas:
      'media copy'
      'dial total';
    padding-left: 1rem;
  }

  .mf-stub-index { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mf-hero,
  .mf-empty,
  .mf-stub,
  .mf-dock,
  .mf-path,
  .mf-btn,
  .mf-stub-media img {
    animation: none !important;
    transition: none !important;
  }
}
