.alx-state-page,
.alx-search-page {
  max-width: 1080px;
}

.alx-state-page {
  display: grid;
  min-height: 62vh;
  place-items: center;
}

.alx-state-card,
.alx-page-heading,
.alx-result-card {
  border: 1px solid var(--alx-line);
  border-radius: var(--alx-radius-lg);
  background: var(--alx-surface);
  box-shadow: var(--alx-shadow-sm);
}

.alx-state-card {
  width: min(100%, 760px);
  padding: clamp(28px, 6vw, 64px);
  text-align: center;
}

.alx-state-code {
  margin: 0;
  color: var(--alx-primary-soft);
  font-size: clamp(88px, 18vw, 180px);
  font-weight: 900;
  line-height: .78;
  letter-spacing: -.08em;
}

.alx-state-card h1,
.alx-page-heading h1 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.alx-state-card > p:not(.alx-eyebrow, .alx-state-code),
.alx-page-heading > p:not(.alx-eyebrow) {
  color: var(--alx-text-muted);
}

.alx-state-search {
  margin-top: 28px;
  text-align: left;
}

.alx-state-search label {
  display: block;
  margin-bottom: 8px;
  color: #3f4e61;
  font-size: 14px;
  font-weight: 800;
}

.alx-state-search > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.alx-state-search input,
.alx-state-search button {
  min-height: 50px;
  border-radius: 12px;
}

.alx-state-search input {
  min-width: 0;
  border: 1px solid var(--alx-line);
  background: var(--alx-surface-strong);
  padding: 0 14px;
}

.alx-state-search button,
.alx-button {
  border: 0;
  color: #ffffff;
  background: var(--alx-primary);
  padding: 13px 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.alx-state-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.alx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.alx-button-secondary {
  border: 1px solid var(--alx-line);
  color: #3f4e61;
  background: var(--alx-surface-soft);
}

.alx-page-heading {
  padding: clamp(24px, 4vw, 46px);
}

.alx-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.alx-result-card {
  padding: 24px;
}

.alx-result-card h2 {
  margin: 4px 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.alx-result-card h2 a {
  color: var(--alx-text);
  text-decoration: none;
}

.alx-result-card p:not(.alx-result-type) {
  color: var(--alx-text-muted);
}

.alx-result-type {
  margin: 0;
  color: var(--alx-primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.alx-search-empty {
  margin-top: 16px;
}

.alx-pagination {
  margin-top: 24px;
}

.alx-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.alx-pagination .page-numbers {
  display: inline-grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--alx-line);
  border-radius: 10px;
  background: var(--alx-surface);
  text-decoration: none;
}

.alx-pagination .current {
  border-color: var(--alx-primary);
  color: #ffffff;
  background: var(--alx-primary);
}

/* Shared resilience rules for homepage fallbacks and compact search controls. */
.alx-brand-fallback-grid {
  margin-inline: 0;
  padding-left: 0;
  list-style: none;
}

.alx-search-tabs span[role="tab"] {
  flex: 0 0 auto;
}

.alx-brand-logo--fallback {
  color: #405064;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.alx-knowledge-thumb--fallback {
  display: grid;
  place-items: center;
  color: #405064;
  background:
    linear-gradient(135deg, rgba(8, 127, 245, .12), rgba(49, 181, 255, .15)),
    var(--alx-surface-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.alx-metrics > .alx-data-pending {
  grid-column: 1 / -1;
  display: flex;
  min-height: 102px;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  text-align: center;
}

.alx-quick-icon::before {
  color: #4d493f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
}
.alx-quick-icon--catalog::before { content: '≡'; font-size: 20px; }
.alx-quick-icon--spec::before { content: '⌀'; font-size: 18px; }
.alx-quick-icon--shield::before { content: '!'; font-size: 18px; }
.alx-quick-icon--cost::before { content: 'Ft'; }
.alx-quick-icon--book::before { content: 'i'; font-size: 18px; font-family: Georgia, serif; }

@media (max-width: 720px) {
  .alx-result-grid {
    grid-template-columns: 1fr;
  }

  .alx-state-search > div {
    grid-template-columns: 1fr;
  }

  .alx-state-search button {
    width: 100%;
  }
}
