body.woocommerce-shop main.site-main,
body.tax-product_cat main.site-main {
  --apex-paper: #f7f5f0;
  --apex-ink: #1b1e23;
  --apex-blue: #142e53;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 80px) 0;
  color: var(--apex-ink);
}
body.woocommerce-shop, body.tax-product_cat { background: #f7f5f0; }
.apex-catalog-header h1 {
  margin: 0 0 8px;
  font: 400 clamp(34px, 6vw, 72px)/1.04 Georgia, serif;
}
.apex-catalog-header p { margin: 0 0 24px; }
.apex-catalog-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 3px 12px;
  margin-bottom: 24px;
}
.apex-catalog-nav a {
  flex: none;
  padding: 10px 15px;
  color: var(--apex-blue);
  border: 1px solid #c9ced4;
  text-decoration: none;
}
.apex-catalog-nav a[aria-current="page"] {
  color: #fff;
  background: var(--apex-blue);
  border-color: var(--apex-blue);
}
body:is(.woocommerce-shop, .tax-product_cat) main ul.products {
  display: grid;
  clear: both;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
body:is(.woocommerce-shop, .tax-product_cat) main ul.products::before,
body:is(.woocommerce-shop, .tax-product_cat) main ul.products::after { display: none; }
body:is(.woocommerce-shop, .tax-product_cat) main ul.products li.product {
  display: flex;
  flex-direction: column;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}
body:is(.woocommerce-shop, .tax-product_cat) main li.product .woocommerce-loop-product__link {
  display: flex;
  flex-direction: column;
  color: var(--apex-ink);
  flex: 1;
}
body:is(.woocommerce-shop, .tax-product_cat) main li.product a img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin: 0;
  background: #ebe9e3;
}
body:is(.woocommerce-shop, .tax-product_cat) main li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  min-height: 2.7em;
  margin: 12px 0 4px;
  padding: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.apex-catalog-rating { display: block; margin: 2px 0 8px; }
.apex-catalog-stars { position: relative; display: inline-block; color: #626871; white-space: nowrap; }
.apex-catalog-stars > span {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: #142e53;
}
body:is(.woocommerce-shop, .tax-product_cat) main li.product .price {
  color: var(--apex-ink);
  min-height: 2.75em;
  margin-bottom: 0;
}
body:is(.woocommerce-shop, .tax-product_cat) main li.product .button {
  display: flex;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  padding: 6px;
  border-radius: 0;
  background: var(--apex-blue);
  color: #fff;
  text-align: center;
  font-size: .875rem;
}
body:is(.woocommerce-shop, .tax-product_cat) main li.product a.button:hover { background: #254b7d; }
body:is(.woocommerce-shop, .tax-product_cat) main li.product .apex-catalog-sold-out {
  color: #444;
  background: #e4e4e4;
}
@media (max-width: 1023px) {
  body:is(.woocommerce-shop, .tax-product_cat) main ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  body:is(.woocommerce-shop, .tax-product_cat) main ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  body:is(.woocommerce-shop, .tax-product_cat) main.site-main { width: calc(100% - 24px); }
  body:is(.woocommerce-shop, .tax-product_cat) main .woocommerce-ordering { float: none; clear: both; }
  body:is(.woocommerce-shop, .tax-product_cat) main .woocommerce-ordering select { max-width: 100%; }
}

/* The site's existing catalog stylesheet adds a second rating label here. */
body:is(.woocommerce-shop, .tax-product_cat) main li.product .price::before {
  content: none !important;
}
