.order-hero {
  padding-top: calc(var(--space-12) + var(--space-5));
}

.subtitle {
  font-size: 1.125rem;
}

.payment-selection {
  margin-bottom: var(--space-6);
}

.payment-details {
  margin-bottom: var(--space-6);

  &.text-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;

    .details-header {
      width: 100%;
      text-align: center;
    }

    .qr-placeholder {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  }

  .details-header {
    margin-bottom: var(--space-4);
    h4 {
      margin: 0;
      font-size: 1.1rem;
      font-weight: 600;
    }
  }
}

.twint-launch-button {
  width: auto;
  height: 58px;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
}

.twint-launch-button__image {
  width: auto;
  height: 58px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  .twint-qr {
    width: 240px;
    height: 240px;
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    margin-bottom: var(--space-4);
    object-fit: contain;
    box-shadow: 0 6px 18px rgba(44, 37, 84, 0.08);
  }

  .twint-mobile-action {
    width: 100%;
    max-width: 320px;
    margin-top: var(--space-3);
    display: flex;
    justify-content: center;
  }

  .amount {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: var(--space-2);
    color: var(--color-text);
  }
}

.billing-hint {
  margin-top: var(--space-3);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.bank-details {
  p {
    margin-bottom: var(--space-2);
    font-size: 1rem;
    color: var(--color-text);
  }
}

.qr-bill-actions {
  margin-top: var(--space-4);
}

.sticky-card {
  position: sticky;
  top: var(--space-6);
}

.order-items {
  display: grid;
  gap: var(--space-3);
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

.order-item-copy {
  min-width: 0;
  display: grid;
  gap: var(--space-2);
}

.order-item-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.order-item-name {
  font-size: 1rem;
  line-height: 1.35;
}

.order-item-kind {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  background: var(--color-neutral-100);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.order-item-kind-shop {
  background: color-mix(in srgb, var(--color-brand) 12%, white);
  color: var(--color-brand);
}

.order-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.item-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.color-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.order-item-tech {
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.order-item-total {
  white-space: nowrap;
  font-size: 1rem;
}

.order-summary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.summary-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.error-message,
.loading-state {
  margin-top: var(--space-12);
  text-align: center;
}

.status-timeline {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-5);
  margin-bottom: var(--space-10);
  padding: 0 var(--space-2);
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(12.5% + var(--space-2));
    right: calc(12.5% + var(--space-2));
    height: 2px;
    background: var(--color-border);
    z-index: 1;
  }
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;

  .circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-neutral-100);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-text-muted);
    transition: all 0.3s ease;
  }

  .label {
    font-size: 0.85rem;
    line-height: 1.2;
    color: var(--color-text-muted);
    font-weight: 500;
  }

  &.active {
    .circle {
      border-color: var(--color-brand);
      background: var(--color-bg);
      color: var(--color-brand);
    }
    .label {
      color: var(--color-text);
      font-weight: 600;
    }
  }

  &.completed {
    .circle {
      background: var(--color-brand);
      border-color: var(--color-brand);
      color: white;
    }
    .label {
      color: var(--color-text);
    }
  }
}

@media (max-width: 600px) {
  .order-hero {
    padding-top: calc(var(--space-8) + var(--space-4));
  }

  .status-timeline {
    margin-top: var(--space-4);
    margin-bottom: var(--space-8);
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);

    &::before {
      top: 10px;
      bottom: 10px;
      left: 15px;
      width: 2px;
      height: auto;
    }

    .timeline-step {
      flex-direction: row;
      gap: var(--space-3);

      .circle {
        margin-bottom: 0;
      }
    }
  }

  .order-item {
    flex-direction: column;
  }

  .order-item-total {
    width: 100%;
  }

  .order-summary-meta {
    grid-template-columns: 1fr;
  }
}
