/* ================= PAGE ================= */

.track-page {
  max-width: 850px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ================= SEARCH ================= */

.track-box {
  background: #fff;
  padding: 22px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.track-box h2 {
  margin-bottom: 12px;
}

.track-input {
  display: flex;
  gap: 10px;
}

.track-input input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.track-input button {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
}

/* ================= RESULT ================= */

.track-result {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.hidden {
  display: none;
}

/* ================= HEADER ================= */

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.order-header h3 {
  margin: 0;
}

.order-status {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* STATUS COLORS */
.order-status.pending { background: #111; color: #fff; }
.order-status.confirmed { background: #2563eb; color: #fff; }
.order-status.preparing { background: #f59e0b; color: #fff; }
.order-status.out_for_delivery { background: #9333ea; color: #fff; }
.order-status.delivered { background: #16a34a; color: #fff; }

/* ================= TIMELINE ================= */

.timeline {
  display: flex;
  justify-content: space-between;
  margin: 30px 0 20px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.timeline-step {
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d1d5db;
  margin: 0 auto 6px;
  transition: 0.3s;
}

/* ACTIVE STEP */
.timeline-step.active .circle {
  background: #000;
  transform: scale(1.2);
}

/* TEXT */
.timeline-step span {
  font-size: 12px;
  color: #555;
}

/* ================= ITEMS ================= */

.track-section {
  margin-top: 22px;
}

.track-section h4 {
  margin-bottom: 10px;
}

#track-items .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f1f1;
}

#track-items img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

/* ================= CUSTOMER ================= */

#track-customer {
  line-height: 1.6;
  color: #333;
}

/* ================= TOTAL ================= */

.total {
  text-align: right;
  font-size: 18px;
  font-weight: 600;
  margin-top: 10px;
}

/* ================= MOBILE ================= */

@media (max-width: 600px) {

  .order-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline {
    gap: 6px;
  }

  .timeline-step span {
    font-size: 10px;
  }

  #track-items .item {
    flex-direction: row;
  }
}
