.abc-detail-page {
  display: grid;
  gap: var(--momo-space-5);
  color: var(--momo-text-primary);
}

.abc-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--momo-space-4);
  align-items: end;
  padding: var(--momo-space-5);
  border: 1px solid var(--momo-border-light);
  border-radius: var(--momo-radius-lg);
  background:
    radial-gradient(circle at 14px 14px, rgba(172, 92, 58, 0.15) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
    var(--momo-bg-surface);
}

.abc-detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--momo-space-2);
  color: var(--momo-page-accent-dark);
  font-family: var(--momo-font-mono);
  font-size: var(--momo-text-label);
  font-weight: 750;
  letter-spacing: 0.04em;
}

.abc-detail-header h1 {
  margin: 0;
  font-family: var(--momo-font-display);
  font-size: clamp(1.55rem, 2.1vw, 2.15rem);
  font-weight: 820;
  letter-spacing: 0;
  color: var(--momo-text-primary);
}

.abc-detail-header p {
  max-width: 760px;
  margin: var(--momo-space-2) 0 0;
  color: var(--momo-text-secondary);
  line-height: 1.65;
}

.abc-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.abc-factor-control {
  display: flex;
  align-items: stretch;
  min-width: min(100%, 260px);
}

.abc-factor-control .input-group-text {
  border-color: var(--momo-border-light);
  background: var(--momo-bg-paper);
  color: var(--momo-text-secondary);
  font-family: var(--momo-font-mono);
  font-weight: 700;
}

.abc-detail-statline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--momo-space-3);
}

.abc-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--momo-border-light);
  border-radius: var(--momo-radius-sm);
  background: var(--momo-bg-elevated);
  color: var(--momo-text-secondary);
  font-family: var(--momo-font-mono);
  font-size: var(--momo-text-label);
  font-weight: 700;
}

.abc-detail-card {
  overflow: hidden;
  border: 1px solid var(--momo-border-light);
  border-radius: var(--momo-radius-lg);
  background: var(--momo-bg-surface);
}

.abc-detail-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--momo-space-3);
  padding: var(--momo-space-4);
  border-bottom: 1px solid var(--momo-border-light);
}

.abc-detail-card__head h2 {
  margin: 0;
  font-family: var(--momo-font-display);
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: 0;
}

.abc-detail-table {
  padding: 0;
}

.abc-detail-page .table-responsive {
  max-width: 100%;
  overflow-x: auto;
}

.abc-detail-page .table {
  min-width: 1180px;
}

.abc-detail-page .table td,
.abc-detail-page .table th {
  vertical-align: middle;
}

.abc-detail-page .abc-product-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.abc-loading-card {
  display: grid;
  justify-items: center;
  gap: var(--momo-space-3);
  padding: clamp(2rem, 7vw, 4rem);
  border: 1px solid var(--momo-border-light);
  border-radius: var(--momo-radius-lg);
  background:
    radial-gradient(circle at 14px 14px, rgba(172, 92, 58, 0.14) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
    var(--momo-bg-surface);
  text-align: center;
}

.abc-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--momo-border-light);
  border-top-color: var(--momo-page-accent-dark);
  border-radius: 50%;
  animation: abc-spin 0.9s linear infinite;
}

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

@media (max-width: 900px) {
  .abc-detail-header {
    grid-template-columns: 1fr;
    align-items: start;
    padding: var(--momo-space-4);
  }

  .abc-detail-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .abc-detail-actions,
  .abc-factor-control {
    width: 100%;
  }

  .abc-detail-actions .btn,
  .abc-factor-control .btn {
    flex: 1 1 auto;
  }
}
