/* =========================================================================
   Product card text alignment (shop, categories, search, homepage carousels,
   related products). Goal: in any row of cards, the title block, the rating
   row, the price and the button each start at the same height.

   Why they drifted before:
   - titles are clamped to 2 lines but 1-line titles made the card shorter
     inside, pulling the rating/price up;
   - the rating row had its own margins and the star icon floated differently
     from the "(3)" / "No reviews yet" text;
   - prices wrap to 2 lines for sale / variable products.
   Fix: reserve a fixed 2-line title, a fixed-height rating row, then pin
   price + button to the bottom of every card.
   (Doubled class names below only raise specificity to beat the page-scoped
   rules in shop-style.css / home-cards-style.css.)
   ========================================================================= */

ul.products.products li.product.product {
  display: flex !important;
  flex-direction: column;
  text-align: left;
}

/* Title: always occupies exactly two lines */
ul.products.products li.product.product .woocommerce-loop-product__title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.35 !important;
  min-height: calc(1.35em * 2);
  margin: 0 0 6px !important;
  text-align: left;
}

/* Rating row: icon + count on one centred line, fixed height */
ul.products.products li.product.product .fmke-card-rating {
  display: flex !important;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  margin: 0 0 8px !important;
  padding: 0;
}
ul.products.products li.product.product .fmke-card-rating .star-rating {
  float: none !important;
  flex: 0 0 auto;
  margin: 0 !important;
}
ul.products.products li.product.product .fmke-card-rating__count { line-height: 1; white-space: nowrap; }

/* Price + button pinned to the bottom, so they line up across the row */
ul.products.products li.product.product .price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin: auto 0 10px !important;
  padding-top: 4px;
  min-height: 1.5em;
  text-align: left;
}
ul.products.products li.product.product .price del { margin: 0 !important; }
ul.products.products li.product.product a.button.button,
ul.products.products li.product.product a.add_to_cart_button.add_to_cart_button {
  margin: 0 !important;      /* the price above now takes up the spare space */
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
