/* ============================================================
   ORDER DETAILS PAGE SPECIFIC STYLES
   ============================================================ */

/* ---------- ORDER HERO ---------- */
.order-hero {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    var(--navy-light) 60%,
    var(--navy) 100%
  );
  padding: 45px 0;
  color: #fff;
  overflow: hidden;
  z-index: 2;
}

.order-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.order-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.order-hero-content {
  position: relative;
  z-index: 3;
}

.order-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.25s;
  margin-bottom: 20px;
}

.order-back-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  border-color: var(--gold);
  transform: translateX(-4px);
}

.order-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
}

.order-hero h1 {
  font-family: "Outfit", sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin-bottom: 6px;
  color: #fff;
}

.order-hero .order-meta {
  color: #cbd5e1;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 14px;
}

.order-hero .order-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-hero .order-meta i {
  color: var(--gold);
}

.order-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 40px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 6px;
}

/* ---------- MAIN LAYOUT ---------- */
.order-section {
  padding: 45px 0 70px;
  position: relative;
  z-index: 2;
}

.order-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(10, 27, 48, 0.04);
  margin-bottom: 22px;
  overflow: hidden;
}

.order-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-card-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.order-card-header h5 {
  font-weight: 800;
  color: var(--navy);
  margin: 0;
  font-size: 1.05rem;
}

.order-card-header small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.order-card-body {
  padding: 22px 24px;
}

/* ---------- TRACKING TIMELINE ---------- */
.tracking-wrap {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  padding: 26px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
}

.track-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 4px;
}

.track-timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #e2e8f0;
  z-index: 0;
  border-radius: 3px;
}

.track-timeline::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  z-index: 0;
  border-radius: 3px;
  /* NOTE: PHP dynamic width — apne PHP file mein inline style ya CSS variable se handle karein */
  width: calc((100% - 80px) * var(--track-progress, 0));
  transition: width 1s ease;
}

.track-step {
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.track-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 1.1rem;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
  transition: all 0.4s;
}

.track-step.done .track-step-icon {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--navy-dark);
  box-shadow:
    0 0 0 1px var(--gold),
    0 6px 16px rgba(212, 175, 55, 0.4);
}

.track-step.current .track-step-icon {
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 0 0 rgba(212, 175, 55, 0.5);
  }
  70% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 0 14px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 0 0 rgba(212, 175, 55, 0);
  }
}

.track-step-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.track-step.done .track-step-label {
  color: var(--navy);
}

.track-step-time {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 3px;
  font-weight: 600;
}

/* ---------- CANCELLED BANNER ---------- */
.cancelled-banner {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #dc2626;
}

.cancelled-banner i {
  font-size: 2rem;
  flex-shrink: 0;
}

.cancelled-banner h5 {
  font-weight: 800;
  margin-bottom: 4px;
  color: #991b1b;
}

.cancelled-banner p {
  margin: 0;
  font-size: 0.85rem;
  color: #b91c1c;
}

/* ---------- ORDER ITEMS ---------- */
.order-item-row {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  transition: background 0.25s;
}

.order-item-row:last-child {
  border-bottom: none;
}

.order-item-row:hover {
  background: #fafbfc;
}

.order-item-img {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.order-item-row:hover .order-item-img img {
  transform: scale(1.06);
}

.order-item-info {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.order-item-name:hover {
  color: var(--amber);
}

.order-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.order-item-meta strong {
  color: var(--navy);
}

.order-item-price {
  font-family: "Outfit", sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--navy);
  text-align: right;
  white-space: nowrap;
}

.order-item-price-sub {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin-top: 2px;
  text-align: right;
}

.btn-item-noon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #feee00;
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  margin-top: 8px;
  transition: all 0.2s;
  border: 1px solid #feee00;
}

.btn-item-noon:hover {
  background: #e6d600;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(254, 238, 0, 0.4);
}

/* ---------- SUMMARY SIDEBAR ---------- */
.summary-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(10, 27, 48, 0.04);
  padding: 24px;
  position: sticky;
  top: 100px;
}

.summary-title {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-title i {
  color: var(--gold);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.summary-row span:last-child {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.9rem;
}

.summary-divider {
  border: none;
  border-top: 1.5px dashed #e2e8f0;
  margin: 12px 0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.summary-total-label {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
}

.summary-total-value {
  font-family: "Outfit", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- INFO BLOCKS ---------- */
.info-block {
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.info-block:last-child {
  border-bottom: none;
}

.info-block-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-block-label i {
  color: var(--gold);
  font-size: 0.85rem;
}

.info-block-value {
  color: var(--navy);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.5;
}

.info-block-value small {
  color: var(--muted);
  font-weight: 500;
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}

/* ---------- ACTION BUTTONS ---------- */
.btn-action {
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  text-decoration: none;
  margin-bottom: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-action-primary {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--navy-dark);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.35);
}

.btn-action-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.5);
  color: var(--navy-dark);
}

.btn-action-outline {
  background: transparent;
  color: var(--navy);
  border-color: #e2e8f0;
}

.btn-action-outline:hover {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
  transform: translateY(-2px);
}

.btn-action-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-action-danger:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

/* ---------- ERROR / NOT FOUND STATE ---------- */
.error-state {
  text-align: center;
  padding: 70px 20px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(10, 27, 48, 0.04);
}

.error-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fef9e7);
  border: 1px solid #fcd34d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: #d97706;
  margin: 0 auto 20px;
}

.error-state h3 {
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.error-state p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .summary-card {
    position: static;
    margin-top: 20px;
  }
}

@media (max-width: 767.98px) {
  .order-section {
    padding: 30px 0 50px;
  }

  .order-card-body {
    padding: 18px;
  }

  .order-card-header {
    padding: 14px 18px;
  }

  .track-step-icon {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .track-timeline::before,
  .track-timeline::after {
    top: 18px;
    left: 30px;
    right: 30px;
  }

  .track-timeline::after {
    width: calc((100% - 60px) * var(--track-progress, 0));
  }

  .track-step-label {
    font-size: 0.62rem;
  }

  .order-item-img {
    width: 75px;
    height: 75px;
  }
}

@media (max-width: 575.98px) {
  .order-hero {
    padding: 30px 0;
  }

  .order-hero-icon {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }

  .order-hero .order-meta {
    gap: 10px;
    font-size: 0.78rem;
  }

  .track-step-time {
    display: none;
  }

  .track-step-label {
    font-size: 0.58rem;
  }

  .track-step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    border-width: 3px;
  }

  .track-timeline::before,
  .track-timeline::after {
    top: 15px;
    left: 24px;
    right: 24px;
  }

  .track-timeline::after {
    width: calc((100% - 48px) * var(--track-progress, 0));
  }

  .order-item-row {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0;
  }

  .order-item-img {
    width: 65px;
    height: 65px;
  }

  .order-item-info {
    flex: 1;
  }

  .order-item-price {
    text-align: left;
    width: 100%;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .order-item-price-sub {
    text-align: left;
  }
}
