/* ─── PEDIDOS PAGE STYLES ────────────────────────────────── */

body { background: var(--off); min-height: 100vh; }

/* ─── PAGE HEADER ─── */
.pedidos-header {
  padding: 90px 5vw 32px;
  max-width: 800px; margin: 0 auto;
  animation: fadeUp .4s ease both;
}
.pedidos-header h1 {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em;
  color: var(--ink); margin-bottom: 6px;
}
.pedidos-header p {
  font-size: .88rem; color: var(--ink-soft); font-weight: 500;
}

/* ─── LIST ─── */
.pedidos-list {
  max-width: 800px; margin: 0 auto;
  padding: 0 5vw 100px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ─── ORDER CARD ─── */
.order-card {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(29,52,97,.05);
  overflow: hidden;
  animation: fadeUp .4s ease both;
}
.order-card:nth-child(2) { animation-delay: .05s; }
.order-card:nth-child(3) { animation-delay: .1s; }
.order-card:nth-child(4) { animation-delay: .15s; }

/* ─── CARD HEADER (clickable) ─── */
.order-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; cursor: pointer;
  gap: 12px; user-select: none;
  transition: background .15s;
}
.order-header:hover { background: var(--off); }

.order-header-left {
  display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0;
}
.order-number {
  font-size: .88rem; font-weight: 800; color: var(--ink);
  white-space: nowrap;
}
.order-date {
  font-size: .75rem; color: var(--ink-pale); font-weight: 500;
  white-space: nowrap;
}

.order-header-right {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.order-total-mini {
  font-size: .9rem; font-weight: 800; color: var(--ink);
  white-space: nowrap;
}
.order-chevron {
  font-size: .8rem; color: var(--ink-pale);
  transition: transform .25s;
  flex-shrink: 0;
}
.order-card.expanded .order-chevron { transform: rotate(180deg); }

/* ─── STATUS BADGE ─── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 50px;
  font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.status-badge.entregado { background: var(--green-soft); color: var(--green); }
.status-badge.en-camino { background: var(--blue-soft); color: var(--blue); }
.status-badge.procesando { background: var(--gold-soft); color: var(--gold); }
.status-badge.pendiente { background: var(--red-soft); color: var(--red); }

/* ─── CARD DETAIL (expandable) ─── */
.order-detail {
  display: none;
  border-top: 1px solid var(--line);
  animation: fadeIn .2s ease;
}
.order-card.expanded .order-detail { display: block; }

.order-products { padding: 16px 20px; }
.order-product-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.order-product-item:last-child { border-bottom: none; }

.order-prod-emoji {
  font-size: 1.5rem; flex-shrink: 0;
  width: 40px; height: 40px;
  background: var(--off); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.order-prod-info { flex: 1; min-width: 0; }
.order-prod-name {
  font-size: .86rem; font-weight: 700; color: var(--ink);
  margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.order-prod-brand {
  font-size: .73rem; color: var(--ink-pale); font-weight: 500;
}
.order-prod-qty {
  font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap;
}
.order-prod-price {
  font-size: .86rem; font-weight: 700; color: var(--ink);
  white-space: nowrap;
}

/* ─── TRACKING ─── */
.tracking-row {
  margin: 4px 20px 0;
  padding: 10px 14px;
  background: var(--blue-soft);
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem;
}
.tracking-label { font-weight: 700; color: var(--blue); }
.tracking-number {
  font-family: monospace; font-size: .82rem;
  color: var(--ink); font-weight: 600; letter-spacing: .04em;
}
.tracking-copy {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: .73rem; color: var(--blue); font-weight: 700;
  padding: 4px 8px; border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background .15s;
}
.tracking-copy:hover { background: rgba(43,108,245,.12); }

/* ─── CARD FOOTER ─── */
.order-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; gap: 12px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.order-footer-total {
  font-size: .82rem; color: var(--ink-soft); font-weight: 600;
}
.order-footer-total strong {
  color: var(--ink); font-size: .95rem;
}
.order-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.order-action-btn {
  padding: 8px 16px; border-radius: 50px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .78rem; font-weight: 700; cursor: pointer;
  border: none; transition: all .2s;
}
.order-action-btn.primary {
  background: var(--ink); color: var(--white);
}
.order-action-btn.primary:hover { background: var(--blue); }
.order-action-btn.ghost {
  background: var(--off); color: var(--ink-mid);
  border: 1px solid var(--line);
}
.order-action-btn.ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.order-action-btn.danger {
  background: var(--red-soft); color: var(--red);
}
.order-action-btn.danger:hover { background: var(--red); color: var(--white); }

/* ─── BOTTOM NAV SPACING ─── */
@media (max-width: 767px) {
  .bottom-nav { display: block; }
  .pedidos-header { padding: 78px 5vw 20px; }
  .pedidos-header h1 { font-size: 1.4rem; }
  .pedidos-list { padding-bottom: 80px; }
  .order-header { padding: 14px 16px; }
  .order-products { padding: 12px 16px; }
  .order-footer { padding: 12px 16px; }
  .tracking-row { margin: 4px 16px 0; }
  .order-header-left { gap: 10px; }
  .order-number { font-size: .82rem; }
  .order-date { display: none; }
}
