/* Página de error */
.error-page {
  width: 100%;
  min-height: calc(100vh - 120px);
  padding: 64px 0 80px;
  background-color: var(--bg-light);
  box-sizing: border-box;
}

.error-page__container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.error-page__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.error-page__badge {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 8px;
  color: var(--primary);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.error-page__code {
  display: block;
  margin: 0;
  color: var(--primary);
  font-size: clamp(4.5rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  user-select: none;
}

.error-page__title {
  margin: 20px 0 10px;
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.error-page__description {
  max-width: 480px;
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.6;
}

/* Buscador de libros */
.error-page__search-box {
  width: 100%;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.error-page__search-form {
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  background-color: var(--bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.error-page__search-form:focus-within {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--bg-light);
}

.error-page__search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  background-color: transparent;
  border: none;
  outline: none;
  box-sizing: border-box;
}

.error-page__search-input::placeholder {
  color: var(--placeholder);
  font-size: var(--fs-xs);
}

.error-page__search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  height: 100%;
  padding: 0 20px;
  color: var(--text-inverse);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  background-color: var(--primary);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.error-page__search-submit:hover {
  background-color: var(--primary-hover);
}

.error-page__search-submit svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

/* Sugerencias de categorias */
.error-page__categories {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 32px;
}

.error-page__categories-title {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.error-page__categories-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.error-page__chip {
  display: inline-block;
  padding: 6px 14px;
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.error-page__chip:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-light);
}

/* Acciones principales */
.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.error-page__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 42px;
  padding: 0 20px;
  color: var(--text-inverse);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: none;
  background-color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.error-page__button:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.error-page__button--secondary {
  color: var(--text);
  background-color: var(--bg);
  border-color: var(--border);
}

.error-page__button--secondary:hover {
  color: var(--text);
  background-color: var(--bg-light);
  border-color: var(--border-hover);
}

/* Responsive */
@media (max-width: 767px) {
  .error-page {
    padding: 40px 0 56px;
  }

  .error-page__container {
    padding: 0 16px;
  }

  .error-page__search-submit span {
    display: none;
  }

  .error-page__search-submit {
    padding: 0 16px;
  }

  .error-page__actions {
    flex-direction: column;
    gap: 10px;
  }

  .error-page__button {
    width: 100%;
  }
}