/* Astra listing cards only; all commercial HTML and native controls are reused. */
.bio-catalog-cards.woocommerce ul.products li.product {
  display: grid;
  /* Astra's tablet rule also targets li.product, not just the outer list. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1.6rem auto;
  /* Astra's outer grid may stretch a row; optional purchase UI must not make
     every sibling reserve the same tall internal purchase area. */
  align-self: start;
  align-content: start;
  height: auto;
  min-width: 0;
}
.bio-catalog-cards ul.products li.product .astra-shop-thumbnail-wrap {
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
}
.bio-catalog-cards.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link {
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  /* Keep two compact badge rows clear of the image, even on untagged cards. */
  padding: 18px 12px 48px;
}
.bio-catalog-cards ul.products li.product .astra-shop-thumbnail-wrap img {
  margin: 0;
  object-fit: contain;
}
.bio-catalog-cards ul.products li.product .loop-product-brand {
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.bio-catalog-cards ul.products li.product .astra-shop-summary-wrap {
  grid-row: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding-top: .35rem;
}
.bio-catalog-cards.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px;
  line-height: 1.35;
  height: 2.7em;
  margin: 0 0 .5rem;
  padding: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: pretty;
}
/* Prices, discount and optional SRP flow together; no empty commercial rows. */
.bio-catalog-cards.woocommerce ul.products li.product .astra-shop-summary-wrap > .price {
  display: block;
  box-sizing: border-box;
  margin: 0;
}
.bio-catalog-cards .astra-shop-summary-wrap > .price > br { display: none; }
.bio-catalog-cards .astra-shop-summary-wrap > .price > .bf-mdr-badge {
  display: table;
  margin: .25em 0;
}
.bio-catalog-cards .astra-shop-summary-wrap > .price > .srp-price {
  display: block;
  max-width: 100%;
  line-height: 1.4;
}
.bio-catalog-cards .bio-catalog-offers {
  align-content: flex-start;
  margin: 4px 0 0;
}
/* Optional offers have no placeholder. Existing variation events own visibility. */
.bio-catalog-cards .bio-catalog-offers[hidden] {
  display: none;
}
/* Only switchable M6 cards with real offer text keep that text's measured
   space, so choosing a deal does not move the selector underneath the pointer.
   Ordinary cards and cards without possible offers have no reserved slot. */
.bio-catalog-cards .bio-catalog-offers--switching[hidden] {
  display: flex;
  visibility: hidden;
}
.bio-catalog-cards .bio-catalog-purchase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.bio-catalog-cards .bio-catalog-purchase > div:has(> .quantity) { margin: 0 !important; }
.bio-catalog-cards .bio-catalog-purchase form.hps-m6-card { margin: 0; }
.bio-catalog-cards .bio-catalog-purchase form.hps-m6-card .hps-m6-batch-row { margin-bottom: 8px; }
.bio-catalog-cards .bio-catalog-purchase form.hps-m6-card .variations_button { align-items: center; gap: 8px; }
.bio-catalog-cards .bio-catalog-purchase .quantity { margin: 0 !important; align-self: center; }
.bio-catalog-cards.woocommerce .bio-catalog-purchase :is(a.button, button.single_add_to_cart_button) {
  box-sizing: border-box;
  align-self: center;
  float: none;
  display: block;
  width: 100%;
  max-width: 200px;
  min-height: 44px;
  margin: 0 auto !important;
  padding: .7em .6em;
  font-size: 14px;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
}
.bio-catalog-cards .bio-product-properties {
  position: absolute;
  z-index: 4;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}
.bio-catalog-cards .astra-shop-thumbnail-wrap .ast-onsale-card {
  top: 8px;
  right: 8px;
  left: auto;
  margin: 0;
}
.bio-product-properties .bio-product-property {
  /* Plain UI tiles: deliberately no circular seals, crests or logo artwork. */
  display: inline-flex;
  box-sizing: border-box;
  flex: 0 0 30px;
  width: 30px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  font-family: system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  /* Native full-name tooltips without making the markers links/buttons. */
  pointer-events: auto;
}
.bio-product-property[data-property="eko"] { background: #dceedd; color: #245737; }
.bio-product-property[data-property="vegan"] { background: #ece4fa; color: #5b3a82; }
.bio-product-property[data-property="glutenfri"] { background: #dfecfa; color: #28557c; }
.bio-product-property[data-property="raw"] { background: #f5e6d5; color: #744926; }
.bio-product-property[data-property="rattvisemarkt"] { background: #f3dfe7; color: #78394e; }
@media (max-width: 600px) {
  .bio-catalog-cards .astra-shop-thumbnail-wrap:has(.stock-badge) .ast-onsale-card { top: 36px; }
  .bio-catalog-cards.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }
}
/* Keep the existing narrow-screen card layout from the 1.62 consistency pass. */
@media (max-width: 359px) {
  .bio-catalog-cards.woocommerce ul.products:not(.elementor-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
