/* ══════════════════════════════════════════════════════════════
   PRODUCT CARD + "ADD TO CART" LAYOUT FIX
   Loaded LAST so it always wins over the page stylesheets.

   What was wrong
   ──────────────
   The action rows were `display:flex` with `flex:1` children and no
   `min-width:0`. A flex item's default `min-width:auto` means it can
   never shrink below the width of its own text, so on narrow columns
   (tablet `col-sm-6`, desktop `col-lg-4`, and the 992–1199px band) the
   "ADD TO CART" button pushed past the edge of the card and sat on top
   of the neighbouring button / card border.
   The fixed mobile CTA bar on the product page also sat on top of the
   last section of the page because nothing reserved space for it.

   What this file does
   ───────────────────
   1. Lets the buttons shrink (`min-width:0`) and wrap onto a second
      row (`flex-wrap:wrap`) instead of overflowing.
   2. Gives each button a sensible flex-basis so they share the row
      evenly and never get narrower than their label.
   3. Pins the action row to the bottom of the card (`margin-top:auto`)
      so every card in a row lines up and has an equal height.
   4. Reserves space at the bottom of the page for the sticky mobile
      CTA bar so it can no longer cover the footer/content.

   Nothing is hidden and no button is removed — colours, fonts,
   radii, shadows and animations are all untouched.
   ══════════════════════════════════════════════════════════════ */

/* ── 1. EQUAL-HEIGHT CARDS ─────────────────────────────────── */
.prod-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.prod-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
/* long product names / specs must wrap, never spill out */
.prod-card-title,
.prod-card-name,
.prod-card-desc,
.prod-card-sub,
.spec-row .sv {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.spec-row { gap: 10px; }
.spec-row .sv { text-align: right; }

/* ── 2. ACTION ROWS CAN WRAP AND SHRINK ────────────────────── */
.prod-card-actions,
.prod-card-footer,
.prod-ctas,
.product-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  margin-top: auto;          /* keeps every card's buttons on one line */
}
.prod-card-actions > *,
.prod-card-footer > *,
.prod-ctas > *,
.product-cta-row > * {
  min-width: 0;              /* the actual overlap fix */
}

/* listing cards — "Add to Cart" + "Quote"  (allproducts / search) */
.prod-card-actions { gap: 10px; }
.prod-card-actions .btn-card-cart  { flex: 3 1 148px; }
.prod-card-actions .btn-card-quote { flex: 1 1 96px; }
.prod-card-actions .btn-card-cart,
.prod-card-actions .btn-card-quote { padding-left: 10px; padding-right: 10px; }

/* related-product cards — "Buy Now" + "Cart" + wishlist */
.prod-card-footer { gap: 8px; }
.prod-card-footer .btn-card-buy,
.prod-card-footer .btn-card-cart { flex: 1 1 84px; }
.prod-card-footer .btn-card-wish { flex: 0 0 auto; }

/* home page product block — "Add to Cart" + "Buy Now" */
.prod-ctas { gap: 14px; }
.prod-ctas .btn-cart,
.prod-ctas .btn-buynow { flex: 1 1 190px; justify-content: center; }

/* product detail page — "Buy Now" + "Add to Cart" + wishlist */
.product-cta-row { gap: 12px; }
.product-cta-row .btn-buy-now,
.product-cta-row .btn-add-cart { flex: 1 1 175px; }
.product-cta-row .btn-wishlist { flex: 0 0 50px; }

/* every cart / buy button: text centred, on one line, never clipped */
.btn-card-cart,
.btn-card-quote,
.btn-card-buy,
.btn-cart,
.btn-buynow,
.btn-add-cart,
.btn-buy-now {
  min-width: 0;
  white-space: nowrap;
  text-align: center;
  line-height: 1.25;
}

/* ── 3. NARROW-COLUMN BEHAVIOUR ────────────────────────────── */
/* 992–1199px: three cards per row is the tightest layout there is  */
@media (min-width: 992px) and (max-width: 1199px) {
  .prod-card-actions .btn-card-cart,
  .prod-card-actions .btn-card-quote { font-size: 12px; letter-spacing: .6px; padding: 11px 8px; }
}
/* tablet two-up */
@media (min-width: 576px) and (max-width: 767px) {
  .prod-card-actions .btn-card-cart,
  .prod-card-actions .btn-card-quote { font-size: 12px; letter-spacing: .6px; padding: 11px 8px; }
}
/* phones: one clean full-width button per line */
@media (max-width: 420px) {
  .prod-card-actions .btn-card-cart,
  .prod-card-actions .btn-card-quote,
  .prod-ctas .btn-cart,
  .prod-ctas .btn-buynow,
  .product-cta-row .btn-buy-now,
  .product-cta-row .btn-add-cart { flex: 1 1 100%; }
}

/* ── 4. STICKY MOBILE CTA NO LONGER COVERS THE PAGE ────────── */
.sticky-cta { box-shadow: 0 -6px 24px rgba(13,35,81,.12); }
.sticky-cta > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 576px) {
  body.has-sticky-cta { padding-bottom: 78px; }
  .toast-msg { bottom: 88px; }
  .cart-toast { left: 16px; right: 16px; bottom: 20px; }
}
