/* ==============================================================================
   tracking.css — Estilos del Portal de Rastreo y Mis Pedidos (OLED Dark Mode)
   Proyecto: PCWeb Store | BEM Puro con Design Tokens (<200 líneas)
   ============================================================================== */
.tracking-page {
  min-height: 80vh;
  padding: 6rem 1.5rem 4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tracking-page--orders { align-items: flex-start; }
.tracking-container { width: 100%; max-width: 480px; margin: 0 auto; }
.tracking-container--wide { max-width: 900px; }

.tracking-card {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--pcweb-radius-card);
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
}
.tracking-header { text-align: center; margin-bottom: 2rem; }
.tracking-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 100, 255, 0.1);
  border: 1px solid rgba(0, 100, 255, 0.3);
  color: var(--pcweb-color-accent-blue);
  font-size: var(--pcweb-font-size-xs);
  font-weight: var(--pcweb-font-weight-semibold);
  padding: 6px 16px;
  border-radius: var(--pcweb-radius-pill);
  margin-bottom: 1rem;
}
.tracking-badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pcweb-color-accent-blue);
  box-shadow: 0 0 8px var(--pcweb-color-accent-blue);
}
.tracking-title {
  font-size: var(--pcweb-font-size-h2);
  font-weight: var(--pcweb-font-weight-extrabold);
  color: var(--pcweb-color-text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.tracking-desc { font-size: var(--pcweb-font-size-sm); color: var(--pcweb-color-text-secondary); line-height: 1.6; margin: 0; }
.tracking-form__group { margin-bottom: 1.5rem; text-align: center; }
.tracking-form__label {
  display: block; font-size: var(--pcweb-font-size-sm);
  font-weight: var(--pcweb-font-weight-medium);
  color: var(--pcweb-color-text-secondary); margin-bottom: 0.75rem;
  text-align: center;
}
.tracking-form__input {
  width: 100%;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pcweb-radius-md);
  padding: 14px 18px;
  font-size: var(--pcweb-font-size-base);
  color: var(--pcweb-color-text-primary);
  font-family: inherit;
  text-align: center;
  transition: border-color var(--pcweb-transition-fast), box-shadow var(--pcweb-transition-fast);
  box-sizing: border-box;
}
.tracking-form__input:focus {
  outline: none;
  border-color: var(--pcweb-color-accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.25);
}
.tracking-form__input--otp {
  font-family: var(--pcweb-font-family-mono);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
}
.tracking-form__hint { font-size: var(--pcweb-font-size-xs); color: var(--pcweb-color-text-muted); margin: 0 0 1rem 0; text-align: center; }
.tracking-form__btn { width: 100%; padding: 14px; border-radius: var(--pcweb-radius-pill); justify-content: center; min-height: 48px; }
.tracking-resend {
  display: flex; justify-content: space-between;
  margin-top: 1.5rem;
  font-size: var(--pcweb-font-size-xs);
}
.tracking-resend__link {
  background: none; border: none; color: var(--pcweb-color-accent-blue);
  cursor: pointer; padding: 0; text-decoration: underline;
}
.tracking-alert {
  padding: 14px 18px; border-radius: var(--pcweb-radius-md);
  font-size: var(--pcweb-font-size-sm); line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: center;
}
.tracking-alert--error {
  background: rgba(255, 59, 48, 0.1); border: 1px solid rgba(255, 59, 48, 0.3); color: #FF453A;
}
.tracking-alert--success {

  background: rgba(48, 209, 88, 0.1); border: 1px solid rgba(48, 209, 88, 0.3); color: #30D158;
}

/* === VISTA MIS PEDIDOS === */
.tracking-page--orders { align-items: flex-start; padding-bottom: 7.5rem; }
.tracking-toolbar { display: flex; flex-direction: column; gap: 0.75rem; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
@media (min-width: 640px) { .tracking-toolbar { flex-direction: row; align-items: center; } }

.order-card {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pcweb-radius-card);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}
.order-card__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.order-card__id { font-size: var(--pcweb-font-size-base); color: var(--pcweb-color-text-primary); margin-right: 1rem; }
.order-card__id code { font-family: var(--pcweb-font-family-mono); font-size: 1rem; color: var(--pcweb-color-accent-blue); background: rgba(0, 100, 255, 0.1); padding: 2px 8px; border-radius: 4px; }
.order-card__date { font-size: var(--pcweb-font-size-xs); color: var(--pcweb-color-text-muted); }
.order-card__badge { font-size: var(--pcweb-font-size-xs); font-weight: var(--pcweb-font-weight-semibold); padding: 4px 12px; border-radius: var(--pcweb-radius-pill); border: 1px solid; display: inline-flex; align-items: center; gap: 6px; }
.order-card__badge-dot { width: 6px; height: 6px; border-radius: 50%; }

/* Stepper Visual de 4 Fases */
.order-stepper { display: flex; justify-content: space-between; position: relative; margin: 1.5rem 0 1.75rem 0; padding: 0 0.5rem; }
.order-stepper::before { content: ''; position: absolute; top: 16px; left: 15%; right: 15%; height: 2px; background: rgba(255, 255, 255, 0.1); z-index: 1; }
.order-stepper__step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }
.order-stepper__icon { width: 32px; height: 32px; border-radius: 50%; background: #000000; border: 2px solid rgba(255, 255, 255, 0.2); color: var(--pcweb-color-text-secondary); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; transition: all var(--pcweb-transition-fast); }
.order-stepper__step--active .order-stepper__icon { border-color: var(--pcweb-color-accent-blue); background: var(--pcweb-color-accent-blue); color: #fff; box-shadow: 0 0 14px var(--pcweb-color-accent-blue-glow); }
.order-stepper__step--done .order-stepper__icon { border-color: #30D158; background: #30D158; color: #000; }
.order-stepper__label { font-size: var(--pcweb-font-size-xs); font-weight: var(--pcweb-font-weight-semibold); color: var(--pcweb-color-text-primary); }
.order-stepper__sub { font-size: 0.7rem; color: var(--pcweb-color-text-tertiary); margin-top: 1px; }

/* Estafeta */
.tracking-estafeta { display: flex; flex-direction: column; gap: 0.75rem; background: rgba(0, 100, 255, 0.04); border: 1px solid rgba(0, 100, 255, 0.2); border-radius: var(--pcweb-radius-md); padding: 1rem; margin: 1.25rem 0; }
@media (min-width: 640px) { .tracking-estafeta { flex-direction: row; align-items: center; justify-content: space-between; } }
.tracking-estafeta__code code { font-family: var(--pcweb-font-family-mono); font-size: var(--pcweb-font-size-base); color: var(--pcweb-color-accent-blue); background: rgba(0, 100, 255, 0.08); padding: 2px 8px; border-radius: 4px; }
.tracking-estafeta__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Items y Miniaturas */
.order-card__items { padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.order-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.order-item:last-child { border-bottom: none; }
.order-item__product { display: flex; align-items: center; gap: 1rem; }
.order-item__thumb { width: 50px; height: 50px; object-fit: contain; background: #000; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--pcweb-radius-sm); padding: 4px; flex-shrink: 0; }
.order-item__title { font-size: var(--pcweb-font-size-sm); color: var(--pcweb-color-text-primary); }
.order-item__qty { color: var(--pcweb-color-accent-blue); font-weight: 700; margin-left: 4px; }
.order-item__note { font-size: var(--pcweb-font-size-xs); color: var(--pcweb-color-text-secondary); margin-top: 2px; }
.order-item__price { font-size: var(--pcweb-font-size-sm); font-weight: var(--pcweb-font-weight-semibold); color: var(--pcweb-color-text-primary); white-space: nowrap; }

/* Logística y Caja Financiera */
.order-card__logistics { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 640px) { .order-card__logistics { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.order-card__dest-type { font-size: var(--pcweb-font-size-sm); color: var(--pcweb-color-text-primary); margin-bottom: 0.35rem; }
.order-card__dest-addr { font-size: var(--pcweb-font-size-xs); color: var(--pcweb-color-text-secondary); line-height: 1.4; }
.order-card__dest-notes { font-size: var(--pcweb-font-size-xs); color: var(--pcweb-color-text-muted); margin-top: 0.25rem; font-style: italic; }

.order-card__pay-box { padding: 0.85rem 1.15rem; border-radius: var(--pcweb-radius-md); font-size: var(--pcweb-font-size-xs); }
.order-card__pay-box--cod { background: rgba(255, 159, 10, 0.08); border: 1px solid rgba(255, 159, 10, 0.3); color: #FFB340; }
.order-card__pay-box--paid { background: rgba(48, 209, 88, 0.08); border: 1px solid rgba(48, 209, 88, 0.3); color: #30D158; }
.order-card__pay-title { font-weight: var(--pcweb-font-weight-bold); margin-bottom: 0.25rem; }
.order-card__pay-desc { line-height: 1.4; color: inherit; }

/* Acciones Pie */
.order-card__footer-actions { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.order-card__btn-wa { width: 100%; justify-content: center; font-size: var(--pcweb-font-size-xs); border-radius: var(--pcweb-radius-pill); border-color: rgba(37, 211, 102, 0.3); color: #25D366; }
.order-card__btn-wa:hover { background: rgba(37, 211, 102, 0.1); border-color: #25D366; }
