/* Source of truth for the four zones in each Simcha bottle row.
   This file loads after the legacy package styles so wrapped names never push
   the quantity, bottle art, or price out of vertical alignment. */
body .pack-builder.simcha-pack-editor .simcha-target-product-row {
  align-items: stretch;
  grid-template-columns: 2.45rem 2.8rem minmax(0, 1fr) 5.45rem;
  min-height: 5.6rem;
  padding: 0 0 0 .55rem;
}

body .pack-builder.simcha-pack-editor .simcha-target-quantity {
  align-self: stretch;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  height: auto;
  margin: 0;
}

body .pack-builder.simcha-pack-editor .simcha-target-quantity button,
body .pack-builder.simcha-pack-editor .simcha-target-quantity strong {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 0;
}

body .pack-builder.simcha-pack-editor .simcha-target-thumb {
  align-items: center;
  align-self: stretch;
  display: flex;
  height: auto;
  justify-content: center;
}

body .pack-builder.simcha-pack-editor .simcha-target-thumb .simcha-editor-product-art {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
}

body .pack-builder.simcha-pack-editor .simcha-target-thumb .product-image,
body .pack-builder.simcha-pack-editor .simcha-target-thumb .product-bottle {
  height: min(4.25rem, 76%);
  max-height: 76%;
  object-position: center;
}

/* Generated fallback bottles carry a decorative label pseudo-element on
   catalogue cards. A compact package row already has the real name beside
   the thumbnail, so suppress it rather than allowing it to spill below. */
body .pack-builder.simcha-pack-editor .simcha-target-thumb .product-bottle::after {
  display: none;
}

body .pack-builder.simcha-pack-editor .simcha-target-product-info {
  align-items: center;
  align-self: stretch;
  display: flex;
}

body .pack-builder.simcha-pack-editor .simcha-target-product-info strong { margin: 0; }

body .pack-builder.simcha-pack-editor .simcha-target-product-actions {
  align-self: stretch;
  display: grid;
  min-height: 0;
  padding: 0;
  place-items: stretch;
}

body .pack-builder.simcha-pack-editor .simcha-target-price {
  align-items: center;
  align-self: stretch;
  display: flex;
  grid-area: 1 / 1;
  justify-content: center;
  margin: 0;
  min-height: 0;
  padding: .45rem;
  text-align: center;
}

body .pack-builder.simcha-pack-editor .simcha-target-swap-trigger {
  align-self: stretch;
  grid-area: 1 / 1;
  height: 100%;
  min-height: 0;
}

@media (max-width: 620px) {
  body .pack-builder.simcha-pack-editor .simcha-target-product-row {
    column-gap: .55rem;
    grid-template-columns: 2.25rem 2.45rem minmax(0, 1fr) 5.1rem;
  }
}
