/* Make category cards flex containers for bottom-aligned button */
.woocommerce ul.products li.product-category {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 12px; /* balanced padding */
  box-sizing: border-box;
}

/* Style the "Explore" button */
.woocommerce ul.products li.product-category a.category-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: auto;
  transition: background-color 0.3s ease;

  background-color: var(--global-palette1, #000); /* Use palette1 for normal state */
  color: var(--global-palette9, #fff);
}

.woocommerce ul.products li.product-category a.category-button:hover {
  background-color: var(--global-palette2, #444);
  color: var(--global-palette9, #fff);
}

/* Desktop and tablet spacing */
.woocommerce ul.products {
  padding-left: 1px;
  padding-right: 1px;
  column-gap: 24px; /* increase column gap */
  row-gap: 36px;    /* increase row gap */
}

/* Mobile (up to 768px) - keep 2 columns */
@media only screen and (max-width: 768px) {
  .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    column-gap: 10px !important; /* a bit tighter on mobile */
    row-gap: 36px !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }

  .woocommerce ul.products li.product-category {
    padding: 10px; /* slightly less padding on mobile */
  }
}