/* Seguimiento y comprobante de pedido */
.order-view { max-width: 980px; }
.ov-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.ov-top h1 { margin-bottom: .1em; text-align: left; letter-spacing: .02em; }
.ov-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.print-only { display: none; }

.ov-note { margin: 18px 0; padding: 14px 18px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.ov-note-bad { border-color: #7a3a52; background: #3a2230; color: #ffd0e2; }

/* Línea de seguimiento */
.ov-steps { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: s; }
.ov-step { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 0 4px; font-size: .9rem; color: var(--muted); }
.ov-step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.ov-step:first-child::before { display: none; }
.ov-step.ov-done::before, .ov-step.ov-current::before { background: #8e78e6; }
.ov-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: var(--bg-2); border: 2px solid var(--line); color: var(--muted); }
.ov-done .ov-dot { background: #8e78e6; border-color: #8e78e6; color: #fff; }
.ov-current .ov-dot { background: var(--fg); border-color: var(--fg); color: #1d1d1f; box-shadow: 0 0 0 6px rgba(201,184,255,.22); }
.ov-done, .ov-current { color: var(--fg); }
.ov-step small { color: var(--muted); min-height: 1.2em; font-size: .78rem; }

.ov-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.ov-card h2 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.ov-card h2:not(:first-child) { margin-top: 18px; }
.ov-card p { margin: 0 0 8px; }
.ov-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.ov-table { width: 100%; border-collapse: collapse; }
.ov-table td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ov-table .num { text-align: right; white-space: nowrap; padding-left: 12px; }
.ov-table .sub td { color: var(--muted); }
.ov-table .total td { font-weight: 700; font-size: 1.1rem; border-bottom: 0; padding-top: 12px; }
.ov-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ov-history em { color: var(--muted); }

@media (max-width: 760px) {
  .ov-grid { grid-template-columns: 1fr; }
  /* En móvil la línea pasa a vertical */
  .ov-steps { grid-template-columns: 1fr; gap: 14px; }
  .ov-step { grid-template-columns: 36px 1fr; justify-items: start; text-align: left; align-items: center; column-gap: 14px; }
  .ov-step::before { display: none; }
  .ov-step strong { grid-column: 2; } .ov-step small { grid-column: 2; margin-top: -4px; }
  .ov-dot { grid-row: 1 / span 2; }
}

/* Mis pedidos (lista) y estados */
.order-link { display: inline-block; margin-top: 10px; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.status-preparing { background: #2c2a4a; color: #b9acff; } .status-delivered { background: #173a26; color: #7fe0a4; }
.status-cancelled, .status-failed { background: #3a2230; color: #ffb3cf; } .status-pending { background: #33343d; color: #c9cbe0; }

/* Código en la página de «gracias» */
.code-box { margin: 22px auto; padding: 18px 22px; max-width: 420px; background: var(--bg-2); border: 1px dashed #8e78e6; border-radius: 14px; }
.code-box strong { display: block; font-size: 1.8rem; letter-spacing: .12em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }

/* ── Impresión / PDF: hoja limpia, en blanco y negro ── */
@media print {
  @page { margin: 16mm; }
  .announcement, .site-header, .site-footer, .cookie-banner, .to-top, .drawer, .drawer-backdrop, .search-results, .no-print { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .print-only { display: block !important; }
  .print-head { display: flex !important; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 18px; }
  .print-head strong { font-size: 18pt; }
  .order-view { max-width: none; padding: 0; }
  .ov-top h1 { color: #000; font-size: 20pt; }
  .muted, .ov-step small, .ov-card h2 { color: #444 !important; }
  .ov-card { background: #fff !important; border: 1px solid #999 !important; break-inside: avoid; }
  .ov-grid { grid-template-columns: 1.3fr 1fr; }
  .ov-steps { grid-template-columns: repeat(5, 1fr) !important; }
  .ov-step { display: grid !important; justify-items: center !important; text-align: center !important; color: #000 !important; }
  .ov-step { grid-template-columns: none !important; align-items: start !important; }
  .ov-step strong, .ov-step small { grid-column: auto !important; margin-top: 0 !important; }
  .ov-dot { grid-row: auto !important; }
  .ov-table .sub td { color: #333 !important; }
  .ov-grid { grid-template-columns: 1.3fr 1fr !important; }
  .ov-step::before { display: block !important; background: #999 !important; }
  .ov-dot { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; box-shadow: none !important; }
  .ov-done .ov-dot, .ov-current .ov-dot { background: #000 !important; color: #fff !important; }
  .ov-table td { border-color: #bbb !important; }
  .ov-note { border: 1px solid #000 !important; background: #fff !important; color: #000 !important; }
  a { color: #000 !important; text-decoration: none !important; }
}
