/* ═══════════════════════════════════════════════════════════════════════
   SHEM Parfum — Order Tracking Page Styles
   Desain: Earth-tone premium, konsisten dengan style utama Shem Parfum
   ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --dark:      #1a1612;
  --mid:       #6b5f52;
  --light:     #9a8a7a;
  --gold:      #c8aa7e;
  --gold-deep: #b89a6a;
  --cream:     #faf9f6;
  --cream-2:   #f5f0eb;
  --cream-3:   #ece8e0;
  --border:    #e0d8cc;
  --green:     #2d7a3a;
  --green-bg:  #f0faf4;
  --green-border: #b6d9be;
  --red:       #c0392b;
  --red-bg:    #fdf0ee;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream-2);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────────────────────────── */
.track-nav {
  background: var(--dark);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  text-decoration: none;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 6px;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
}
.nav-brand-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.4rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.nav-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--light);
  font-family: 'DM Sans', sans-serif;
}

/* ── MAIN ─────────────────────────────────────────────────────────────── */
.track-main {
  flex: 1;
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ── SEARCH CARD ──────────────────────────────────────────────────────── */
.search-card {
  background: var(--cream);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 32px rgba(26,22,18,0.07);
  overflow: hidden;
}

.search-header {
  background: var(--dark);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

.search-icon {
  width: 56px;
  height: 56px;
  background: rgba(200, 170, 126, 0.12);
  border: 0.5px solid rgba(200, 170, 126, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.search-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.search-desc {
  font-size: 13px;
  color: var(--light);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto;
}

/* ── FORM ─────────────────────────────────────────────────────────────── */
.track-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid);
  font-weight: 500;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--light);
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  /* Hilangkan spinner number input */
  -moz-appearance: textfield;
}

.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.input-wrap input::placeholder { color: var(--light); }

.input-wrap input:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(200,170,126,0.12);
}

.form-error {
  font-size: 13px;
  color: var(--red);
  background: var(--red-bg);
  border: 0.5px solid #f0b8b0;
  border-radius: 2px;
  padding: 10px 14px;
  display: none;
  line-height: 1.5;
}

.form-error.visible { display: block; }

.btn-track {
  padding: 13px;
  background: var(--dark);
  color: var(--cream);
  border: none;
  border-radius: 2px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0.5rem;
}

.btn-track:hover { background: #2d2620; }
.btn-track:disabled { background: #c8c0b4; cursor: not-allowed; }

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESULT SECTION ───────────────────────────────────────────────────── */
.result-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeInUp 0.4s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--mid);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  width: fit-content;
}

.btn-back:hover { color: var(--dark); }

/* ── ORDER CARD ───────────────────────────────────────────────────────── */
.order-card {
  background: var(--cream);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(26,22,18,0.06);
}

.order-card-header {
  background: var(--dark);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.order-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 4px;
}

.order-id {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 1px;
}

/* Status badges */
.order-status-badge {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-processing  { background: rgba(200,170,126,0.15); color: var(--gold); border: 1px solid rgba(200,170,126,0.3); }
.badge-shipped     { background: rgba(59,130,246,0.1);   color: #3b82f6;     border: 1px solid rgba(59,130,246,0.3); }
.badge-delivered   { background: var(--green-bg);         color: var(--green); border: 1px solid var(--green-border); }
.badge-cancelled   { background: var(--red-bg);           color: var(--red);  border: 1px solid #f0b8b0; }
.badge-pending     { background: #fef9ec;                 color: #b45309;     border: 1px solid #fde68a; }

.order-meta-grid {
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 3px;
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}

.meta-value.resi {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--mid);
  word-break: break-all;
}

/* ── TIMELINE CARD ────────────────────────────────────────────────────── */
.timeline-card {
  background: var(--cream);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 16px rgba(26,22,18,0.06);
}

.timeline-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: 1px;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.5px solid var(--border);
}

/* ── TIMELINE LIST ────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-step {
  display: flex;
  gap: 1rem;
  position: relative;
}

/* Garis vertikal penghubung antar titik */
.timeline-step:not(:last-child) .timeline-line {
  position: absolute;
  left: 11px;                /* center dari dot 24px = 12px - 1px border */
  top: 24px;                 /* mulai dari bawah dot */
  bottom: 0;
  width: 1.5px;
  background: var(--border);
  z-index: 0;
}

.timeline-step.done:not(:last-child) .timeline-line {
  background: linear-gradient(to bottom, var(--green), var(--border));
}

/* Titik / dot */
.timeline-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 24px;
  z-index: 1;
  padding-top: 1px;
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--cream-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

/* Titik yang sudah selesai (done = hijau) */
.timeline-step.done .timeline-dot {
  background: var(--green);
  border-color: var(--green);
}

/* Titik status AKTIF (milestone terkini) — pulse animation */
.timeline-step.current .timeline-dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-bg);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(45,122,58,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(45,122,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,122,58,0); }
}

/* Centang di dalam dot */
.dot-check {
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: none;
}

.timeline-step.done .dot-check { display: block; }

/* Isi konten timeline */
.timeline-content {
  padding-bottom: 1.75rem;
  flex: 1;
  padding-top: 1px;
}

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

.step-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 2px;
}

.timeline-step:not(.done):not(.current) .step-label {
  color: var(--light);
  font-weight: 400;
}

.step-desc {
  font-size: 12.5px;
  color: var(--mid);
  line-height: 1.5;
  margin-top: 3px;
}

.step-time {
  font-size: 11px;
  color: var(--light);
  letter-spacing: 0.3px;
  margin-top: 4px;
}

/* Cancelled dot */
.timeline-step.cancelled .timeline-dot {
  background: var(--red);
  border-color: var(--red);
}

/* ── FOOTER ───────────────────────────────────────────────────────────── */
.track-footer {
  background: var(--dark);
  padding: 1.5rem 2rem;
  text-align: center;
}

.track-footer p {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.8;
}

.track-footer a {
  color: var(--gold);
  text-decoration: none;
}

.track-footer a:hover { color: var(--gold-deep); }

.footer-copy {
  font-size: 11px;
  color: #4a3f36;
  margin-top: 4px;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .track-main { padding: 2rem 1rem 3rem; }
  .search-header { padding: 2rem 1.25rem 1.5rem; }
  .track-form { padding: 1.5rem 1.25rem; }
  .order-meta-grid { grid-template-columns: 1fr; gap: 0.8rem; }
  .order-card-header { flex-direction: column; align-items: flex-start; }
}
