.woocommerce nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  max-width: 100%;
  overflow: visible;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap; /* ✅ allows wrapping on small screens */
  justify-content: center;
  align-items: center;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--background-color);
  border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: none !important; /* no shadow */
}

/* Number buttons */
.woocommerce nav.woocommerce-pagination .page-numbers a,
.woocommerce nav.woocommerce-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 35px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  background: #fff;
  color: var(--paragraph-color);
  margin: 4px; /* ✅ equal spacing all around, wraps nicely */
  border: none !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

/* Hover effect */
.woocommerce nav.woocommerce-pagination .page-numbers a:hover {
  background: color-mix(in srgb, var(--secondary-color) 10%, #fff);
  transform: translateY(-1px);
}

/* Current page */
.woocommerce nav.woocommerce-pagination .page-numbers .current {
  background: var(--secondary-color);
  color: #fff;
}

/* Dots (...) */
.woocommerce nav.woocommerce-pagination .page-numbers .dots {
  background: transparent;
  color: var(--paragraph-color);
  margin: 6px;
}

/* Remove WooCommerce’s default arrow icons */
.woocommerce nav.woocommerce-pagination .page-numbers .prev::before,
.woocommerce nav.woocommerce-pagination .page-numbers .next::after {
  content: none !important;
}

/* Add clean single chevrons */
.woocommerce nav.woocommerce-pagination .page-numbers .prev::before {
  content: "‹";
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  margin-right: 4px;
}
.woocommerce nav.woocommerce-pagination .page-numbers .next::after {
  content: "›";
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  margin-left: 4px;
}

/* ✅ Remove right-side border after the next button */
.woocommerce nav.woocommerce-pagination ul.page-numbers li:last-child {
  border-right: none !important;
}

/* =========================
   Responsive Wrapping Adjustments
   ========================= */
@media (max-width: 640px) {
  .woocommerce nav.woocommerce-pagination ul.page-numbers {
    flex-wrap: wrap; /* ✅ wrap on small screens */
    justify-content: center;
    padding: 4px;
  }

  .woocommerce nav.woocommerce-pagination .page-numbers a,
  .woocommerce nav.woocommerce-pagination .page-numbers span {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 13px;
    margin: 4px; /* smaller spacing on mobile */
  }

  .woocommerce nav.woocommerce-pagination .page-numbers .prev::before,
  .woocommerce nav.woocommerce-pagination .page-numbers .next::after {
    font-size: 16px;
    margin: 0 3px;
  }
}