/* ============================================================
   NexSub Components — buttons, cards, badges, forms, modals
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  line-height: 1;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary — purple fill */
.btn--primary {
  background: var(--accent-primary);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: var(--glow-purple);
}

/* Secondary — outline */
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn--secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary-hover);
}

/* White — hero CTA */
.btn--white {
  background: var(--hero-btn-primary-bg);
  color: var(--hero-btn-primary-text);
}

.btn--white:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Ghost — minimal */
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* Sizes */
.btn--sm {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
}

.btn--lg {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
}

/* Icon-only button */
.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: var(--card-glow);
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--glow-purple);
}

.card--sm {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
}

.card--lg {
  padding: var(--space-10);
}

/* ── Icon badge (feature cards) ──────────────────────── */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(104, 83, 193, 0.15);
  color: var(--accent-primary-hover);
  flex-shrink: 0;
}

.icon-badge svg {
  width: 24px;
  height: 24px;
}

/* ── Status badges ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
}

.badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.badge--pending {
  color: var(--status-pending);
  background: var(--status-pending-bg);
}
.badge--pending::before { background: var(--status-pending); }

.badge--paid {
  color: var(--status-paid);
  background: var(--status-paid-bg);
}
.badge--paid::before { background: var(--status-paid); }

.badge--processing {
  color: var(--status-processing);
  background: var(--status-processing-bg);
}
.badge--processing::before { background: var(--status-processing); }

.badge--delivered {
  color: var(--status-delivered);
  background: var(--status-delivered-bg);
}
.badge--delivered::before { background: var(--status-delivered); }

.badge--refunded {
  color: var(--status-refunded);
  background: var(--status-refunded-bg);
}
.badge--refunded::before { background: var(--status-refunded); }

.badge--cancelled {
  color: var(--status-cancelled);
  background: var(--status-cancelled-bg);
}
.badge--cancelled::before { background: var(--status-cancelled); }

/* ── Pill label (announcement / section label) ───────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  background: rgba(104, 83, 193, 0.15);
  color: var(--accent-primary-hover);
  border: 1px solid rgba(104, 83, 193, 0.25);
}

.pill--hero {
  background: var(--hero-announcement-bg);
  color: #FFFFFF;
  border: none;
}

/* ── Forms ───────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(104, 83, 193, 0.15);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--status-cancelled);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ── Modals ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(14, 10, 25, 0.80);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform var(--duration-base) var(--ease-out);
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.modal__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}

.modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ── Accordion (FAQ) ─────────────────────────────────── */
.accordion {
  border-bottom: 1px solid var(--border-subtle);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast);
}

.accordion__trigger:hover {
  color: var(--accent-primary-hover);
}

.accordion__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--duration-base) var(--ease-out);
}

.accordion.is-open .accordion__icon {
  transform: rotate(45deg);
}

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.accordion__panel-inner {
  padding-bottom: var(--space-5);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* ── Cart badge (icon + count) ───────────────────────── */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.cart-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.cart-icon svg {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: var(--weight-bold);
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

/* ── Logo text ───────────────────────────────────────── */
.logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo span {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Divider ─────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-8) 0;
}

/* ── Link ────────────────────────────────────────────── */
.link {
  color: var(--text-link);
  transition: color var(--duration-fast);
}

.link:hover {
  color: var(--text-link-hover);
}

/* ── Text gradient accent (headlines) ────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary-hover), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Products page ──────────────────────────────────── */
.products-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.products-toolbar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  align-items: center;
  flex-wrap: wrap;
}

.products-toolbar__search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.products-toolbar__search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.products-toolbar__input {
  padding-left: var(--space-10) !important;
}

.products-toolbar__select {
  width: auto;
  min-width: 160px;
}

.products-count {
  font-size: var(--text-sm);
  color: var(--text-dim);
  margin-bottom: var(--space-6);
}

.products-count strong {
  color: var(--text-secondary);
}

.products-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) 0;
  text-align: center;
}

/* ── Product card ───────────────────────────────────── */
.product-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.product-card__image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.product-card:hover .product-card__image {
  transform: scale(1.05);
}

.product-card__body {
  padding: var(--space-5) var(--space-5) var(--space-3);
  flex: 1;
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-top: var(--space-3);
  line-height: var(--leading-snug);
}

.product-card__price {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--accent-primary-hover);
  margin-top: var(--space-2);
}

.product-card__actions {
  padding: var(--space-3) var(--space-5) var(--space-5);
}

.product-card__actions .btn {
  width: 100%;
}

/* ── Product detail modal ───────────────────────────── */
.modal--product {
  max-width: 500px;
}

.product-modal__image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.product-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

/* ── Quantity stepper ───────────────────────────────── */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stepper__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
  user-select: none;
}

.stepper__btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.stepper__btn:active {
  background: rgba(104, 83, 193, 0.15);
  color: var(--accent-primary-hover);
}

.stepper__input {
  width: 52px;
  height: 40px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  -moz-appearance: textfield;
}

.stepper__input::-webkit-inner-spin-button,
.stepper__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Success popup ──────────────────────────────────── */
.modal--success {
  max-width: 420px;
  text-align: center;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.10);
}

/* ── Stepper small variant ──────────────────────────── */
.stepper--sm .stepper__btn {
  width: 32px;
  height: 32px;
  font-size: var(--text-base);
}

.stepper--sm .stepper__input {
  width: 40px;
  height: 32px;
  font-size: var(--text-sm);
}

/* ── Checkout page ──────────────────────────────────── */
.checkout-cart {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.checkout-cart__header {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 0.8fr 0.4fr;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-card-alt);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-items: center;
}

.checkout-cart__row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 0.8fr 0.4fr;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  align-items: center;
}

.checkout-cart__item-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.checkout-cart__item-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-card-alt);
  flex-shrink: 0;
}

.checkout-cart__item-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.checkout-cart__col-item { }
.checkout-cart__col-qty  { display: flex; justify-content: center; }
.checkout-cart__col-price { font-size: var(--text-sm); color: var(--text-muted); text-align: center; }
.checkout-cart__col-total { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); text-align: center; }
.checkout-cart__col-action { text-align: center; }

/* ── Coupon section ─────────────────────────────────── */
.checkout-coupon {
  margin-bottom: var(--space-6);
}

.checkout-coupon__input-wrap {
  display: flex;
  gap: var(--space-2);
  max-width: 380px;
}

.checkout-coupon__input-wrap .form-input {
  flex: 1;
}

.checkout-coupon__feedback {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.checkout-coupon__feedback--success {
  color: var(--status-delivered);
}

.checkout-coupon__feedback--error {
  color: var(--status-cancelled);
}

/* ── Order summary ──────────────────────────────────── */
.checkout-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-10);
}

.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: var(--space-2) 0;
}

.checkout-summary__row--total {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.checkout-summary__row--total span:last-child {
  color: var(--accent-primary-hover);
  font-size: var(--text-xl);
}

/* ── Checkout form ──────────────────────────────────── */
.checkout-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.checkout-errors {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.checkout-errors__msg {
  font-size: var(--text-sm);
  color: var(--status-cancelled);
}

/* ── Checkout loading spinner ───────────────────────── */
.checkout-spinner {
  animation: checkout-spin 0.8s linear infinite;
  transform-origin: center;
}

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

/* ── Responsive: checkout cart ──────────────────────── */
@media (max-width: 768px) {
  .checkout-cart__header {
    display: none;
  }

  .checkout-cart__row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    padding: var(--space-4);
  }

  .checkout-cart__col-item {
    grid-column: 1 / -1;
  }

  .checkout-cart__col-qty,
  .checkout-cart__col-price,
  .checkout-cart__col-total {
    justify-content: flex-start;
    text-align: left;
  }

  .checkout-cart__col-action {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
  }

  .checkout-cart__row {
    position: relative;
  }

  .checkout-form {
    padding: var(--space-5);
  }

  .checkout-coupon__input-wrap {
    max-width: 100%;
  }
}

/* ── Redeem page ───────────────────────────────────── */
.redeem-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.redeem-card {
  max-width: 520px;
  margin: 0 auto;
}

.redeem-card__product {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.redeem-card__product-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-card-alt);
  flex-shrink: 0;
}

.redeem-form {
  margin-top: var(--space-2);
}

.redeem-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--status-cancelled);
}

.redeem-not-found {
  max-width: 520px;
  margin: 0 auto;
}

/* ── Track page ────────────────────────────────────── */
.track-search {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.track-search__form {
  display: flex;
  gap: var(--space-2);
  max-width: 440px;
  margin: 0 auto;
}

.track-search__form .form-input {
  flex: 1;
}

.track-search__input {
  font-family: var(--font-mono) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.track-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

/* ── Status timeline ───────────────────────────────── */
.track-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.track-timeline__step {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
}

.track-timeline__dot {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: border-color var(--duration-base), background var(--duration-base), color var(--duration-base);
}

.track-timeline__step.is-done .track-timeline__dot {
  border-color: var(--status-delivered);
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-delivered);
}

.track-timeline__step.is-active .track-timeline__dot {
  border-color: var(--accent-primary);
  background: rgba(104, 83, 193, 0.15);
  color: var(--accent-primary-hover);
}

.track-timeline__step.is-future .track-timeline__dot {
  border-color: var(--border-subtle);
  color: transparent;
}

.track-timeline__step.is-skipped .track-timeline__dot {
  border-color: var(--border-subtle);
  background: transparent;
  color: transparent;
}

.track-timeline__step.is-negative .track-timeline__dot {
  border-color: var(--status-cancelled);
  background: rgba(239, 68, 68, 0.10);
  color: var(--status-cancelled);
}

.track-timeline__connector {
  width: 2px;
  height: 24px;
  margin-left: 17px;
  background: var(--border-subtle);
  border-radius: 1px;
}

.track-timeline__connector.is-filled {
  background: var(--status-delivered);
}

.track-timeline__content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.track-timeline__label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-dim);
}

.track-timeline__step.is-done .track-timeline__label {
  color: var(--text-secondary);
}

.track-timeline__step.is-active .track-timeline__label {
  color: var(--text-primary);
}

.track-timeline__step.is-future .track-timeline__label {
  color: var(--text-dim);
}

.track-timeline__status {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent-primary-hover);
  background: rgba(104, 83, 193, 0.12);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}

.track-spin {
  animation: checkout-spin 1.5s linear infinite;
  transform-origin: center;
}

/* ── Track items ───────────────────────────────────── */
.track-items__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
}

.track-items__row:first-child {
  border-top: none;
}

.track-summary {
  max-width: 500px;
}

/* ── Legal prose pages (Terms, Refund Policy) ──────── */
.legal-prose {
  margin-top: var(--space-10);
}

.legal-prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.legal-prose h2:first-child {
  margin-top: 0;
}

.legal-prose p {
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.legal-prose ul,
.legal-prose ol {
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  margin-left: var(--space-6);
}

.legal-prose li {
  margin-bottom: var(--space-2);
}

.legal-prose li ul,
.legal-prose li ol {
  margin-top: var(--space-2);
  margin-bottom: 0;
}

.legal-prose strong {
  color: var(--text-primary);
}

.legal-prose a {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-prose a:hover {
  color: var(--text-link-hover);
}
