/* ==========================================================================
   pagination.css — pager for the product / blog listing pages
   Loaded on top of /assets/css/style.css. Consumes the same tokens
   (--accent, --line, --r) so it stays visually consistent with the rest
   of the site.
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.pagination li {
  display: block;
  margin: 0;
}

/* ----------------------------------------------------------------- link --- */
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.pagination a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-tint);
}

.pagination a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- states --- */
/* the current page is a span, not a link, so it gets the filled treatment */
.pagination .active span,
.pagination span.current {
  color: var(--on-ink);
  background: var(--accent);
  border-color: var(--accent);
  cursor: default;
}

/* disabled prev/next */
.pagination .disabled a,
.pagination .disabled span {
  color: var(--muted-2);
  background: var(--surface-tint);
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination .disabled a:hover {
  color: var(--muted-2);
  border-color: var(--line);
  background: var(--surface-tint);
}

/* ellipsis for long ranges */
.pagination .dots span {
  min-width: 24px;
  padding: 0 4px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

/* ------------------------------------------------------------ result count - */
.pagination-meta {
  margin: 16px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* ----------------------------------------------------------- responsive --- */
@media (max-width: 640px) {
  .pagination {
    gap: 6px;
    margin-top: 36px;
  }

  .pagination a,
  .pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 0.8125rem;
  }
}
