/* All rules are scoped to classic WooCommerce product loops; categories are excluded. */
body.mate-pc-active {
  --mpc-green: #176348;
  --mpc-ink: #203b30;
  --mpc-muted: #65736c;
  --mpc-line: #e2eae4;
  --mpc-radius: 18px;
}
body.mate-pc-active ul.products:has(> li.product:not(.product-category)):not(:has(> li.product-category)) {
  --mpc-columns: 4;
  display: grid !important;
  grid-template-columns: repeat(var(--mpc-columns), minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch;
  justify-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  padding: 0 !important;
  list-style: none;
}
body.mate-pc-active ul.products.columns-1 { --mpc-columns: 1 !important; }
body.mate-pc-active ul.products.columns-2 { --mpc-columns: 2 !important; }
body.mate-pc-active ul.products.columns-3 { --mpc-columns: 3 !important; }
body.mate-pc-active ul.products.columns-5 { --mpc-columns: 5 !important; }
body.mate-pc-active ul.products.columns-6 { --mpc-columns: 6 !important; }
body.mate-pc-active ul.products:has(> li.product:not(.product-category)):not(:has(> li.product-category))::before,
body.mate-pc-active ul.products:has(> li.product:not(.product-category)):not(:has(> li.product-category))::after { display: none !important; content: none !important; }
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) {
  box-sizing: border-box;
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--mpc-line) !important;
  border-radius: var(--mpc-radius) !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(25,60,42,.055);
  text-align: left !important;
  transition: box-shadow .18s ease, border-color .18s ease;
  list-style: none;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) > :is(a.woocommerce-LoopProduct-link, a.woocommerce-loop-product__link) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 0 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(img.attachment-woocommerce_thumbnail, img.wp-post-image, a.woocommerce-LoopProduct-link > img, a.woocommerce-loop-product__link > img, img.mate-pc-photo) {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 1.6 / 1;
  object-fit: cover;
  border-radius: 12px !important;
  margin: 0 0 12px !important;
  background: #f3f5f2;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.woocommerce-loop-product__title, .mate-pc-title, h2.woocommerce-loop-product__title) {
  color: var(--mpc-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  letter-spacing: -.015em !important;
  text-transform: none !important;
  text-align: left !important;
  padding: 0 !important;
  margin: 0 0 6px !important;
  min-height: 2.56em;
  overflow-wrap: anywhere;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.mate-pc-rating, .woocommerce-product-rating) {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: var(--mpc-muted);
  margin: 0 0 7px !important;
  text-align: left !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .star-rating {
  color: #b98216 !important;
  font-size: 12px !important;
  margin: 0 0 6px !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price {
  color: var(--mpc-green) !important;
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  letter-spacing: -.02em !important;
  margin: auto 0 10px !important;
  padding-top: 2px;
  text-align: left !important;
  overflow-wrap: anywhere;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price :is(.amount, bdi) { color: inherit !important; font-size: inherit !important; font-weight: inherit !important; }
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price .woocommerce-Price-currencySymbol { font-size: .72em !important; margin-inline-start: .25em; font-weight: 650 !important; }
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price del { opacity: .65; font-size: .78em; }
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price ins { text-decoration: none; }
/* Preserve existing links, event handlers, loading state, and button semantics. */
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) > :is(a.button, button.button, a.add_to_cart_button),
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.mate-pc-add, .mate-pc-order) {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  min-height: 42px;
  height: auto !important;
  padding: 8px 9px !important;
  margin: 0 0 7px !important;
  border: 1px solid #d2e2d8 !important;
  border-radius: 10px !important;
  color: var(--mpc-green) !important;
  background: #f2f8f4 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  text-transform: none !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-decoration: none !important;
  float: none !important;
  transition: background .15s ease, color .15s ease;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-order.mate-pc-order {
  color: #fff !important;
  background: var(--mpc-green) !important;
  border-color: var(--mpc-green) !important;
  margin-bottom: 0 !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.mate-pc-add, .mate-pc-order, a.button):focus-visible { outline: 2px solid #b98216; outline-offset: 2px; }
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) > a.added_to_cart { font-size: 12px; text-align: center; margin-top: 5px; }
/* Existing adjacent direct buttons sit side-by-side on desktop. */
@media (min-width: 1100px) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)):not(.columns-5):not(.columns-6) > li.product:not(.product-category).mate-pc-pair {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    grid-template-rows: 1fr auto;
    column-gap: 7px;
    align-items: start;
  }
  body.mate-pc-active ul.products:not(:has(> li.product-category)):not(.columns-5):not(.columns-6) > li.product.mate-pc-pair > * { grid-column: 1 / -1; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)):not(.columns-5):not(.columns-6) > li.product.mate-pc-pair > .mate-pc-add { grid-column: 1; align-self: end; margin: 0 !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)):not(.columns-5):not(.columns-6) > li.product.mate-pc-pair > .mate-pc-order { grid-column: 2; align-self: end; margin: 0 !important; }
}
@media (hover:hover) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category):hover { border-color: #c3d9ca !important; box-shadow: 0 9px 24px rgba(25,60,42,.10); }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-add.mate-pc-add:hover { background: #e3f0e7 !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-order.mate-pc-order:hover { background: #104c36 !important; }
}
@media (max-width: 1024px) {
  body.mate-pc-active ul.products:has(> li.product:not(.product-category)):not(:has(> li.product-category)):not(.columns-1):not(.columns-2) { --mpc-columns: 3 !important; gap: 14px !important; }
}
@media (max-width: 640px) {
  body.mate-pc-active ul.products:has(> li.product:not(.product-category)):not(:has(> li.product-category)):not(.columns-1):not(.columns-1) { --mpc-columns: 2 !important; gap: 10px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) { padding: 8px !important; border-radius: 14px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(img.attachment-woocommerce_thumbnail, img.wp-post-image, a.woocommerce-LoopProduct-link > img, a.woocommerce-loop-product__link > img, img.mate-pc-photo) { aspect-ratio: 1.32 / 1; border-radius: 9px !important; margin-bottom: 9px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.woocommerce-loop-product__title, .mate-pc-title) { font-size: 12px !important; min-height: 2.5em; margin-bottom: 5px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.mate-pc-rating, .woocommerce-product-rating) { font-size: 11px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price { font-size: 12px !important; margin-bottom: 8px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) > :is(a.button, button.button, a.add_to_cart_button),
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.mate-pc-add, .mate-pc-order) { font-size: 11.5px !important; min-height: 40px; padding: 7px 5px !important; border-radius: 8px !important; }
}
@media (max-width: 290px) {
  body.mate-pc-active ul.products:has(> li.product:not(.product-category)):not(:has(> li.product-category)):not(.columns-1):not(.columns-1) { --mpc-columns: 1 !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category), body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.mate-pc-add,.mate-pc-order) { transition: none; }
}

/* v1.0.1: Mate outline Order Now button, based on supplied reference. */
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center;
  gap: 10px !important;
  width: 160px !important;
  max-width: 100% !important;
  min-height: 46px !important;
  height: auto !important;
  padding: 8px 16px !important;
  margin: 0 auto !important;
  border: 1px solid #286c53 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #286c53 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta:not(.loading):not(.added)::after {
  content: "" !important;
  display: block !important;
  position: static !important;
  flex: 0 0 14px !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 1 !important;
  transform: none !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category).mate-pc-single-cta .mate-pc-order {
  display: none !important;
}
@media (hover:hover) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta:hover {
    background: #f1f7f3 !important;
    color: #286c53 !important;
    border-color: #286c53 !important;
  }
}
/* Keep the reference shape without clipping in narrow two-column mobile cards. */
@media (max-width: 640px) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta {
    width: 156px !important;
    min-height: 38px !important;
    padding: 7px 12px !important;
    gap: 6px !important;
    font-size: clamp(11.5px, 3.1vw, 13px) !important;
  }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta:not(.loading):not(.added)::after {
    flex-basis: 12px !important;
    width: 12px !important;
    height: 12px !important;
  }
}
/* Container-based sizing is safe with explicit full grid-cell width and zero card margins. */
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) { container-type: inline-size; }
@container (max-width: 165px) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta {
    width: 100% !important;
    min-height: 36px !important;
    padding: 6px 10px !important;
    gap: 5px !important;
    font-size: 12px !important;
  }
}

/* v1.0.3 — compact, centered product typography and outline CTA. */
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.woocommerce-loop-product__title, .mate-pc-title, h2.woocommerce-loop-product__title) {
  color: #202322 !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  text-align: center !important;
  min-height: 2.7em;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price {
  font-size: 12.5px !important;
  text-align: center !important;
  line-height: 1.35 !important;
  margin-bottom: 9px !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price .woocommerce-Price-currencySymbol {
  font-size: .80em !important;
  margin-inline-start: .08em;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta {
  align-self: center !important;
  width: 144px !important;
  max-width: 100% !important;
  min-height: 40px !important;
  font-size: 13.5px !important;
  padding: 7px 12px !important;
  gap: 8px !important;
  margin-inline: auto !important;
}
body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta:not(.loading):not(.added)::after {
  flex-basis: 12px !important;
  width: 12px !important;
  height: 12px !important;
}
@media (max-width: 640px) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) :is(.woocommerce-loop-product__title, .mate-pc-title, h2.woocommerce-loop-product__title) { font-size: 12px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .price { font-size: 12px !important; }
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta {
    width: 128px !important;
    min-height: 36px !important;
    font-size: 12px !important;
    padding: 6px 7px !important;
    gap: 5px !important;
  }
}
@container (max-width: 120px) {
  body.mate-pc-active ul.products:not(:has(> li.product-category)) > li.product:not(.product-category) .mate-pc-cta.mate-pc-cta {
    width: 100% !important;
    font-size: 11px !important;
    padding-inline: 3px !important;
    gap: 4px !important;
    white-space: normal !important;
  }
}
