/* ==================================================================
   Product miniatures (listings, related products) — BigMat Clemente Lorenzo
   Linked from templates/_partials/head.tpl after the combined theme CSS. Markup:
   templates/catalog/_partials/miniatures/_product/grid.tpl.
   2026-11-15: equal card heights, price and button pinned to the bottom, category/brand line,
   no duplicate cart icon on the photo, button with real padding.
   ================================================================== */

/* Rows start from the left: an odd last card no longer floats in the middle */
.products.row,
#js-product-list .products {
  justify-content: flex-start;
}

/* Equal heights: every card fills its column and the text block takes the free space */
.products .product {
  display: flex;
}
.products .product > .product-miniature,
.products .product .thumbnail-container {
  width: 100%;
  height: 100%;
}
.product-miniature .thumbnail-container {
  display: flex;
  flex-direction: column;
}
.product-miniature .product-description {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
}

/* Category · brand above the name */
.product-miniature .cl-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
  min-height: 1.35em;
  margin: 0 0 6px;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.product-miniature .cl-card-meta__category {
  color: #6C6C6C;
}
.product-miniature .cl-card-meta__brand {
  color: #001635;
  font-weight: 700;
  text-decoration: none;
}
.product-miniature .cl-card-meta__brand:hover {
  color: #D60812;
}
.product-miniature .cl-card-meta__category + .cl-card-meta__brand::before {
  content: "\00B7";
  margin-right: 6px;
  color: #9AA3AF;
  font-weight: 400;
}

/* Name on two lines at most, always two lines tall */
.product-miniature .product-title {
  display: block;
  min-height: 2.7em;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.35;
}
.product-miniature .product-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price and button sit at the bottom of every card */
.product-miniature .product-price-and-shipping {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px 6px;
  margin: auto 0 12px;
}
.product-miniature .product-price-and-shipping .price {
  font-weight: 700;
  font-size: 16px;
}
.product-miniature .product-price-and-shipping .discount-product {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.product-miniature .product-description .product-add-to-cart {
  margin-top: 0;
}
.product-miniature .product-description .product-add-to-cart .btn.add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  white-space: normal;
  font-size: 14px;
  line-height: 1.25;
}

/* The full-width button below is enough: no second cart icon on the photo */
.product-miniature .mini-actions .product-add-to-cart {
  display: none;
}

@media (max-width: 575.98px) {
  .product-miniature .product-description {
    padding-left: 8px;
    padding-right: 8px;
  }
  .product-miniature .product-title {
    font-size: 13px;
  }
  .product-miniature .product-description .product-add-to-cart .btn.add-to-cart {
    padding: 8px 6px;
    font-size: 13px;
  }
}
