/* ===== ORDERS PAGE ===== */
.orders-page {
  padding: 2.5rem 2rem;
  position: relative;
  z-index: 1;
}

.orders-inner { max-width: 1000px; margin: 0 auto; }

.orders-header { margin-bottom: 2.5rem; }
.orders-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.4rem; }
.orders-header p { color: var(--text-muted); }

/* TRACK ORDER HERO */
.track-hero {
  padding: 3rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.1));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  text-align: center;
}

.track-hero h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.track-hero p { color: var(--text-secondary); margin-bottom: 1.75rem; }

.track-input-row {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ORDER CARD */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.order-card:hover { border-color: rgba(124,58,237,0.3); }

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--glass);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
  cursor: pointer;
}

.order-id { font-size: 0.9rem; color: var(--text-muted); }
.order-id span { color: var(--accent-purple-light); font-weight: 700; }
.order-date { font-size: 0.85rem; color: var(--text-muted); }

.order-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-pending { color: var(--warning); }
.status-pending .status-dot { background: var(--warning); animation: pulse-dot 1.5s infinite; }
.status-processing { color: var(--accent-cyan); }
.status-processing .status-dot { background: var(--accent-cyan); animation: pulse-dot 1.5s infinite; }
.status-shipped { color: var(--accent-purple-light); }
.status-shipped .status-dot { background: var(--accent-purple-light); }
.status-delivered { color: var(--success); }
.status-delivered .status-dot { background: var(--success); }
.status-cancelled { color: var(--danger); }
.status-cancelled .status-dot { background: var(--danger); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.order-collapse-icon { color: var(--text-muted); transition: var(--transition); }
.order-card.open .order-collapse-icon { transform: rotate(180deg); }

.order-card-body { padding: 1.5rem; display: none; }
.order-card.open .order-card-body { display: block; }

/* ORDER TIMELINE */
.order-timeline {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-track {
  position: absolute;
  top: 20px; left: 20px;
  width: 3px;
  height: calc(100% - 40px);
  background: var(--border);
  border-radius: 2px;
}

.timeline-progress {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 2px;
  transition: height 1s ease;
}

.timeline-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 0 0 1.75rem 0;
  position: relative;
}

.timeline-step:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.timeline-step.done .timeline-dot { border-color: var(--accent-purple); background: rgba(124,58,237,0.15); color: var(--accent-purple-light); }
.timeline-step.active .timeline-dot { border-color: var(--accent-cyan); background: rgba(6,182,212,0.15); color: var(--accent-cyan); box-shadow: 0 0 20px rgba(6,182,212,0.3); animation: glow-dot 2s infinite; }

@keyframes glow-dot {
  0%, 100% { box-shadow: 0 0 10px rgba(6,182,212,0.3); }
  50% { box-shadow: 0 0 25px rgba(6,182,212,0.6); }
}

.timeline-content { flex: 1; padding-top: 6px; }
.timeline-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 3px; }
.timeline-desc { font-size: 0.82rem; color: var(--text-secondary); }
.timeline-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ORDER ITEMS */
.order-items { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

.order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--glass);
  border-radius: var(--radius-sm);
}

.order-item-img { width: 54px; height: 54px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-info { flex: 1; }
.order-item-name { font-size: 0.875rem; font-weight: 600; }
.order-item-meta { font-size: 0.78rem; color: var(--text-muted); }
.order-item-total { font-size: 0.9rem; font-weight: 700; }

/* ORDER FOOTER */
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.order-total-info { font-size: 0.9rem; }
.order-total-label { color: var(--text-muted); }
.order-total-amount { font-size: 1.3rem; font-weight: 800; color: var(--accent-purple-light); }

/* DELIVERY MAP VISUAL */
.delivery-map {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.delivery-map h4 { font-size: 0.875rem; margin-bottom: 1rem; color: var(--text-secondary); }

.map-route {
  display: flex;
  align-items: center;
  gap: 0;
}

.map-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.map-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid var(--border);
}
.map-dot.origin { background: var(--accent-purple); border-color: var(--accent-purple); }
.map-dot.destination { background: var(--success); border-color: var(--success); }

.map-label { font-size: 0.7rem; color: var(--text-muted); text-align: center; max-width: 80px; }

.map-line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan), var(--success));
  position: relative;
  margin: 0 -2px;
}

.map-truck {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  filter: drop-shadow(0 0 6px rgba(124,58,237,0.5));
  animation: drive 4s linear infinite;
}

@keyframes drive {
  0% { left: 5%; }
  100% { left: 85%; }
}

/* RESPONSIVE ORDERS */
@media (max-width: 768px) {
  .track-input-row { flex-direction: column; }
  .order-card-header { flex-direction: column; align-items: flex-start; }
}
