/* Appily Twentytwo — Vault Crate Registry cart */

.page-vault-crates {
  --vc-plum: #2a1f3d;
  --vc-plum-soft: #3d2f5c;
  --vc-sage: #81b29a;
  --vc-sage-pale: #e8f3ed;
  --vc-coral: #e07a5f;
  --vc-coral-pale: #fce9e4;
  --vc-wheat: #f2cc8f;
  --vc-wheat-pale: #fff4dc;
  --vc-wood: #8b6914;
  --vc-wood-light: #c4a574;
  --vc-wood-pale: #e8dcc8;
  --vc-wood-dark: #5c4a32;
  --vc-ink: #1a1423;
  --vc-muted: #6b6378;
  --vc-line: #e8e2ec;
  --vc-paper: #fffcf8;
  background: var(--vc-paper);
}

/* ── Dock hero ── */
.vc-dock {
  position: relative;
  padding: 44px 0 0;
  background: linear-gradient(180deg, #2a3540 0%, #3d4a52 50%, #4a5c55 100%);
  color: #fff;
  overflow: hidden;
}

.vc-dock-planks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.08) 0,
    rgba(0, 0, 0, 0.08) 3px,
    transparent 3px,
    transparent 48px
  );
  opacity: 0.6;
}

.vc-dock-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(200px, 0.85fr);
  gap: 36px;
  align-items: center;
  padding-bottom: 52px;
}

.vc-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vc-wheat);
}

.vc-dock-copy h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  line-height: 1.12;
}

.vc-dock-copy h1 em {
  font-style: italic;
  color: var(--vc-sage);
}

.vc-lede {
  margin: 0;
  max-width: 52ch;
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

/* Crate stack meter */
.vc-stack-meter {
  text-align: center;
}

.vc-crate-stack {
  position: relative;
  width: 140px;
  height: 120px;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
}

.vc-crate-layer {
  width: 100%;
  height: 18px;
  background: linear-gradient(180deg, var(--vc-wood-light) 0%, var(--vc-wood) 100%);
  border: 2px solid var(--vc-wood-dark);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 0.25;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.vc-crate-layer.is-loaded {
  opacity: 1;
}

.vc-crate-layer:nth-child(1) { width: 88%; }
.vc-crate-layer:nth-child(2) { width: 92%; }
.vc-crate-layer:nth-child(3) { width: 96%; }
.vc-crate-layer:nth-child(4) { width: 100%; }
.vc-crate-layer:nth-child(5) { width: 104%; }

.vc-stack-count {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.vc-stack-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 6px;
}

.vc-stack-total {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vc-wheat);
  margin-bottom: 8px;
}

.vc-stack-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(129, 178, 154, 0.2);
  border: 1px solid rgba(129, 178, 154, 0.45);
  color: var(--vc-sage);
}

.vc-dock-edge {
  height: 14px;
  background: linear-gradient(180deg, var(--vc-wood-light) 0%, var(--vc-wood-pale) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

/* ── Floor ── */
.vc-floor {
  padding: 24px 0 64px;
  background: linear-gradient(180deg, var(--vc-wood-pale) 0%, var(--vc-paper) 100px);
}

.vc-trail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--vc-muted);
  margin-bottom: 28px;
}

.vc-trail a {
  color: var(--vc-ink);
  font-weight: 600;
}

.vc-trail a:hover {
  color: var(--vc-coral);
}

/* ── Empty ── */
.vc-empty {
  text-align: center;
  padding: 48px 24px 56px;
  background: #fff;
  border: 3px dashed var(--vc-wood-light);
  border-radius: 12px;
}

.vc-empty-crate {
  position: relative;
  width: 120px;
  height: 90px;
  margin: 0 auto 24px;
}

.vc-empty-rope {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 12px;
  border: 3px solid var(--vc-wood);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.vc-empty-box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: var(--vc-wheat-pale);
  border: 3px solid var(--vc-wood-light);
  border-radius: 4px;
  box-shadow: inset 0 4px 0 rgba(139, 105, 20, 0.15);
}

.vc-empty-stencil {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vc-muted);
  white-space: nowrap;
}

.vc-empty h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.vc-empty p {
  margin: 0 0 24px;
  color: var(--vc-muted);
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── Layout ── */
.vc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

/* ── Registry form ── */
.vc-registry {
  background: #fff;
  border: 3px solid var(--vc-wood-light);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(42, 31, 61, 0.08);
  overflow: hidden;
}

.vc-registry-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(180deg, var(--vc-wood-pale) 0%, #fff 100%);
  border-bottom: 2px solid var(--vc-wood-light);
}

.vc-registry-stencil {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--vc-wood);
  padding: 8px 12px;
  border: 2px dashed var(--vc-wood-light);
  border-radius: 4px;
  flex-shrink: 0;
}

.vc-registry-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vc-plum);
}

.vc-registry-meta {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--vc-muted);
}

.vc-slats {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vc-slat {
  position: relative;
  border-bottom: 2px solid var(--vc-wood-pale);
}

.vc-slat:last-child {
  border-bottom: 0;
}

.vc-slat-rope {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: repeating-linear-gradient(
    180deg,
    var(--vc-wood) 0,
    var(--vc-wood) 6px,
    var(--vc-wood-light) 6px,
    var(--vc-wood-light) 12px
  );
  border-radius: 3px;
  opacity: 0.5;
}

.vc-slat-num {
  position: absolute;
  left: 24px;
  top: 16px;
  font-size: 0.62rem;
  font-weight: 800;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--vc-muted);
  letter-spacing: 0.06em;
}

.vc-slat-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px 18px 48px;
}

.vc-slat-thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  background: var(--vc-wheat-pale);
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid var(--vc-wood-pale);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.vc-slat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vc-slat-fallback {
  font-size: 1.5rem;
  opacity: 0.5;
}

.vc-slat-aisle {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vc-sage);
  margin-bottom: 4px;
}

.vc-slat-body h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.35;
}

.vc-slat-body h2 a:hover {
  color: var(--vc-coral);
}

.vc-slat-pack {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--vc-muted);
}

.vc-slat-sku {
  font-size: 0.68rem;
  font-family: ui-monospace, monospace;
  color: var(--vc-muted);
}

.vc-slat-unit,
.vc-slat-qty,
.vc-slat-line {
  text-align: center;
  min-width: 72px;
}

.vc-slat-unit span,
.vc-slat-qty span,
.vc-slat-line span {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-muted);
  margin-bottom: 4px;
}

.vc-slat-unit strong,
.vc-slat-line strong {
  font-size: 0.95rem;
  color: var(--vc-ink);
}

.vc-dial {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--vc-wood-pale);
  border-radius: 6px;
  overflow: hidden;
  background: var(--vc-paper);
}

.vc-dial-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--vc-wood-pale);
  font-size: 1.1rem;
  color: var(--vc-plum);
  cursor: pointer;
  transition: background var(--transition);
}

.vc-dial-btn:hover {
  background: var(--vc-sage-pale);
}

.vc-dial input {
  width: 40px;
  border: 0;
  border-left: 1px solid var(--vc-line);
  border-right: 1px solid var(--vc-line);
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 0;
  background: #fff;
  -moz-appearance: textfield;
}

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

.vc-registry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
  background: var(--vc-paper);
  border-top: 2px solid var(--vc-wood-pale);
}

/* ── Buttons ── */
.vc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform var(--transition), background var(--transition);
}

.vc-btn-primary {
  background: var(--vc-plum);
  color: #fff;
}

.vc-btn-primary:hover {
  background: var(--vc-plum-soft);
  transform: translateY(-2px);
}

.vc-btn-soft {
  background: var(--vc-sage-pale);
  color: var(--vc-plum);
  border-color: rgba(129, 178, 154, 0.45);
}

.vc-btn-soft:hover {
  background: var(--vc-sage);
  color: #fff;
}

.vc-btn-ghost {
  background: transparent;
  border-color: var(--vc-line);
  color: var(--vc-ink);
}

.vc-btn-ghost:hover {
  border-color: var(--vc-coral);
  color: var(--vc-coral);
}

.vc-btn-block {
  width: 100%;
}

/* ── Aside ── */
.vc-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 120px;
}

.vc-nudge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 2px solid var(--vc-wood-pale);
  border-radius: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.vc-nudge:hover {
  border-color: var(--vc-sage);
  box-shadow: 0 8px 24px rgba(42, 31, 61, 0.08);
}

.vc-nudge img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

.vc-nudge-copy span {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-muted);
}

.vc-nudge-copy strong {
  font-size: 0.9rem;
  color: var(--vc-ink);
}

/* Balance scale tally */
.vc-scale {
  position: relative;
  background: #fff;
  border: 2px solid var(--vc-wood-light);
  border-radius: 10px;
  padding: 24px 20px 28px;
  box-shadow: 0 8px 28px rgba(42, 31, 61, 0.08);
  overflow: hidden;
}

.vc-scale-beam {
  position: relative;
  height: 48px;
  margin-bottom: 12px;
}

.vc-scale-arm {
  position: absolute;
  top: 12px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: linear-gradient(90deg, var(--vc-wood-dark), var(--vc-wood-light), var(--vc-wood-dark));
  border-radius: 2px;
}

.vc-scale-fulcrum {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid var(--vc-wood);
}

.vc-scale-pan {
  position: absolute;
  top: 16px;
  width: 36px;
  height: 8px;
  background: var(--vc-wood-light);
  border-radius: 0 0 4px 4px;
  border: 2px solid var(--vc-wood-dark);
  border-top: 0;
}

.vc-scale-pan-l { left: 8%; }
.vc-scale-pan-r { right: 8%; }

.vc-scale-tag {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vc-coral);
  margin-bottom: 4px;
}

.vc-scale-head h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.vc-scale-head p {
  margin: 0 0 16px;
  font-size: 0.75rem;
  color: var(--vc-muted);
}

.vc-scale-rows {
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.vc-scale-rows div {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
}

.vc-scale-rows dt {
  color: var(--vc-muted);
}

.vc-scale-rows dd {
  margin: 0;
  font-weight: 700;
}

.vc-scale-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-top: 2px dashed var(--vc-line);
  margin-bottom: 16px;
}

.vc-scale-total span {
  font-size: 0.88rem;
  font-weight: 600;
}

.vc-scale-total strong {
  font-size: 1.3rem;
  color: var(--vc-plum);
}

.vc-scale-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vc-scale-stamp {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--vc-wood);
  border: 2px solid var(--vc-wood-light);
  padding: 4px 10px;
  border-radius: 4px;
  transform: rotate(-10deg);
  opacity: 0.5;
  pointer-events: none;
}

.vc-dock-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vc-dock-notes li {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--vc-sage-pale);
  border-radius: 8px;
  border-left: 4px solid var(--vc-sage);
  font-size: 0.82rem;
}

.vc-note-mark {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.vc-dock-notes strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 2px;
}

.vc-dock-notes p {
  margin: 0;
  color: var(--vc-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .vc-layout {
    grid-template-columns: 1fr;
  }

  .vc-aside {
    position: static;
  }

  .vc-slat-card {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    padding-left: 40px;
  }

  .vc-slat-unit,
  .vc-slat-qty,
  .vc-slat-line {
    grid-column: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .vc-slat-unit span,
  .vc-slat-qty span,
  .vc-slat-line span {
    margin: 0;
    min-width: 36px;
  }
}

@media (max-width: 768px) {
  .vc-dock-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .vc-lede {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .vc-slat-card {
    padding: 16px 16px 16px 36px;
  }

  .vc-registry-actions {
    flex-direction: column;
  }

  .vc-registry-actions .vc-btn {
    width: 100%;
  }
}
