/* ==========================================================================
   Pagination component (catalog)
   File: /css/catalog/pagination.css
   ========================================================================== */

/* Screen-reader only helper (in case it's not already defined globally) */
.pagination .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Wrapper */
.pagination {
  margin-top: 22px;
  padding: 10px 0 4px;

  display: flex;
  justify-content: center;
}

/* List layout */
.pagination__list {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Base pill look for links and spans */
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;
  min-width: 44px;
  padding: 0 14px;

  border-radius: 999px;
  border: 2px solid var(--color-primary, #f6c400);

  background: var(--color-containers, #f3f3f3);
  color: var(--color-text, #111);

  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;

  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Hover only for links */
.pagination a:hover {
  background-color: var(--color-category-active, #111);
  color: var(--color-buttons, #fff);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Focus accessibility */
.pagination a:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.75);
  outline-offset: 3px;
}

/* Current page */
.pagination .active {
  background: var(--color-text, #111);
  color: var(--color-buttons, #fff);
  border-color: var(--color-category-active, #111);
}

/* Disabled prev/next */
.pagination .disabled {
  opacity: 0.45;
  cursor: default;
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.04);
}

/* Make prev/next look a bit more like “actions” than numbers */
.pagination a[rel="prev"],
.pagination a[rel="next"],
.pagination span.disabled {
  padding: 0 16px;
}

/* Responsive tightening */
@media (max-width: 520px) {
  .pagination__list {
    gap: 8px;
  }

  .pagination a,
  .pagination span {
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
}
