/* Página de seguimiento del pedido */
.nav-back { min-height: 46px; padding: 0 18px; gap: 8px; font-size: 0.95rem; }

.track { padding-top: calc(var(--nav-h) + 72px); padding-bottom: 96px; min-height: 100dvh; }
.track-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.track-main { min-width: 0; }
.track-code { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 600; }
.track-code b { color: var(--ink); font: 700 1.05rem/1 var(--mono); letter-spacing: 0.06em; }
.track-title {
  margin: 18px 0 14px;
  font: 900 clamp(3rem, 7.4vw, 5.8rem)/0.98 var(--font); letter-spacing: -0.035em; color: var(--maiz);
}
.track-title.flash { animation: flash 0.9s var(--ease-out); }
@keyframes flash { from { opacity: 0.2; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.track-text { font-size: 1.15rem; color: var(--ink-2); max-width: 44ch; }
.track-eta { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
.track-eta:empty { display: none; }
.track-eta .i { color: var(--maiz); }

/* Línea de tiempo vertical con barra de progreso */
.timeline { position: relative; display: grid; gap: 6px; margin-top: 40px; --progress: 0; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 25px; top: 28px; width: 2px; border-radius: 2px;
  height: calc(100% - 56px);
}
.timeline::before { background: var(--line-2); }
.timeline::after { background: var(--maiz); transform-origin: top; transform: scaleY(var(--progress)); transition: transform 0.9s var(--ease); }
.timeline li {
  position: relative; z-index: 1; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 18px;
  padding: 8px 0; color: var(--muted);
}
.tl-ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-2);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.tl-ico .i { width: 24px; height: 24px; }
.tl-txt { display: grid; gap: 2px; }
.tl-txt b { font: 900 1.25rem/1.1 var(--font); letter-spacing: -0.01em; }
.tl-txt small { font: 400 0.72rem/1.3 var(--mono); color: var(--maiz); letter-spacing: 0.16em; text-transform: uppercase; }
.timeline time { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.timeline .done { color: var(--ink); }
.timeline .done .tl-ico { background: var(--realce); color: var(--maiz); border-color: rgba(245, 204, 126, 0.5); }
.timeline .now { color: var(--ink); }
.timeline .now .tl-ico { background: var(--maiz); color: var(--carbon); border-color: var(--maiz); box-shadow: 0 0 0 7px rgba(245, 204, 126, 0.22); animation: glow 2.2s var(--ease) infinite; }

.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 36px; padding: 16px 16px 16px 20px; border-radius: 18px;
  border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 0.93rem;
}
.demo-bar span { flex: 1 1 260px; }
.demo-bar .btn { min-height: 46px; }

.track-side { display: grid; gap: 14px; min-width: 0; position: sticky; top: calc(var(--nav-h) + 40px); }
.receipt { background: var(--surface); padding: 26px 24px; display: grid; gap: 18px; }
.receipt h2 { font: 900 1.4rem/1 var(--font); letter-spacing: -0.02em; }
.receipt-items { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.receipt-items li { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.receipt-items b { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.receipt-where { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.receipt-where .i { color: var(--maiz); margin-top: 2px; }
.receipt-where div { display: grid; gap: 2px; min-width: 0; }
.receipt-where span { color: var(--ink-2); overflow-wrap: anywhere; }

.help {
  display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 14px; padding: 14px 18px 14px 14px;
  border-radius: 18px; background: var(--surface); border: 1.5px solid var(--maiz);
  transition: background-color 0.3s var(--ease);
}
.help:hover { background: var(--realce); }
.help .i { width: 44px; height: 44px; padding: 9px; border-radius: 50%; background: #128c4a; color: #fff; }
.help span { display: grid; color: var(--ink-2); font-size: 0.93rem; }
.help b { color: var(--ink); font-size: 1rem; }

.track-empty { display: grid; justify-items: start; gap: 18px; max-width: 620px; }
.track-empty > .i { width: 56px; height: 56px; color: var(--maiz); }
.track-empty-title { font: 900 clamp(2.6rem, 7vw, 4.6rem)/1 var(--font); letter-spacing: -0.035em; }
.track-empty p { color: var(--ink-2); font-size: 1.1rem; }
.track-empty-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 8px; }

.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s var(--ease) infinite; }
.sk-title { height: 90px; width: min(520px, 90%); margin-bottom: 18px; }
.sk-line { height: 22px; width: min(360px, 70%); margin-bottom: 40px; }
.sk-box { height: 320px; width: 100%; max-width: 640px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .track-grid { grid-template-columns: 1fr; }
  .track-side { position: static; }
}
@media (max-width: 640px) {
  .nav-back span { display: none; }
  .nav-back { width: 46px; padding: 0; }
  .track { padding-top: calc(var(--nav-h) + 48px); }
  .tl-txt b { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .track-title.flash, .skeleton, .timeline .now .tl-ico { animation: none; }
  .timeline::after { transition: none; }
}

/* Recibo como tarjeta clara con borde maíz */
.track-side .bezel { padding: 0; background: var(--surface); border: 1.5px solid var(--maiz); }
.track-side .bezel-core { border-radius: calc(var(--r-xl) - 2px); }
