/* Update 76: compact, aligned catalogue cards. Staging header only.
   Keep native price, wishlist, award, review, swatch and cart markup intact. */
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__main {
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
  min-width: 0;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__meta {
  min-height: max(30px, var(--so76-meta-height, 0px)) !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__name {
  min-height: max(2.7em, var(--so76-title-height, 0px)) !important;
  height: auto !important;
  line-height: 1.35 !important;
  overflow: visible !important;
  margin: 0 !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__details {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 18px 20px minmax(var(--so76-price-height, 36px), auto) auto !important;
  gap: 6px !important;
  align-items: start;
  min-height: 0 !important;
  min-width: 0;
  margin-top: 0 !important;
  padding-top: 10px !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__details > :is([data-so-award-label], .so-award-winner) {
  grid-row: 1 !important;
  align-self: start !important;
  min-height: 0 !important;
  line-height: 18px !important;
  margin: 0 !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__reviews {
  grid-row: 2 !important;
  align-self: center !important;
  min-height: 0 !important;
  margin: 0 !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__price {
  grid-row: 3 !important;
  align-self: start !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding-top: 4px !important;
  box-sizing: border-box !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__price small {
  display: inline-block;
  margin-left: 5px !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__actions {
  grid-row: 4 !important;
  min-height: 0 !important;
  padding-top: var(--so76-caption-space, 2px) !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}
/* The native selected-size caption stays above its existing dropdown/cart.
   Only neighbours with a selected caption reserve that extra space. */
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product [data-so-buy-selection] {
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  margin: 0 !important;
}
/* Reserve a separate swatch row only for rows that contain native swatches. */
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product.so-v76-swatch-row .so-cat-product__details {
  grid-template-rows: 18px 20px minmax(var(--so76-swatch-height, 0px), auto) minmax(var(--so76-price-height, 36px), auto) auto !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-card-swatches {
  grid-row: 3 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product.so-v76-swatch-row .so-cat-product__price { grid-row: 4 !important; }
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product.so-v76-swatch-row .so-cat-product__actions { grid-row: 5 !important; }
/* Stars and the real review count stay on one line. Empty rows remain reserved. */
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__reviews .ts-reviews-rating {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__reviews :is(.ts-reviews-rating-options, .ts-reviews-count) {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__reviews .stars-container,
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-product__reviews .stars-container::before {
  --star-size: 17px;
  font-size: 17px !important;
  line-height: 1 !important;
}
/* Real cart feedback can expand naturally, rather than overlapping content. */
html body :is(#so-home-2026, #so-category-2026) .so-cat-product.so-cat-product .so-cat-cart-status:not([hidden]) {
  position: static !important;
  margin-top: 7px !important;
}
