/* ==========================================================================
   FORCE CENTER OVERRIDE
   Centers all table headers and cells except the product column.
   This file is loaded last to win over other per-column rules.
   ========================================================================== */
.table-container th:not(:nth-child(1)),
.table-container td:not(:nth-child(1)),
table th:not(:nth-child(1)),
table td:not(:nth-child(1)) {
  text-align: center !important;
}

/* Ensure inline/anchor contents follow the cell alignment */
.table-container td:not(:nth-child(1)) a:not(.availability-store-link),
.table-container td:not(:nth-child(1)) .check-inventory-link {
  display: inline-block;
  width: 100%;
  text-align: center !important;
}

/* Availability store links need to wrap, not be constrained */
.table-container td:not(:nth-child(1)) .availability-store-link {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

/* Allow availability store items to expand beyond cell width if needed */
.table-container td:not(:nth-child(1)) .availability-store-item {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

/* Allow availability link text for Stock column to break into multiple lines */
.table-container td:nth-child(4) .check-inventory-link,
table td:nth-child(4) .check-inventory-link {
  white-space: pre-line !important; /* allow newline (<br>) to render as line break */
  display: inline-block;
  width: 100%;
  text-align: center !important;
}

/* Internal flex components */
.price-combo,
.price-combo__total,
.price-combo__per-ml,
.price-combined {
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

/* Pack size: ensure vertical display is centered */
td:nth-child(3) .size-pack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Keep product column left-aligned */
.table-container th:nth-child(1),
.table-container td:nth-child(1),
table th:nth-child(1),
table td:nth-child(1) {
  text-align: left !important;
}

/* Stock header should display actual DOM text ("Stock").
   Cell link labels are handled in JS and will render "Nearby Stores". */

/* Ensure discounted price/100mL uses the same sale color as main sale price */
.price-per-100ml-column .price-per-ml__value--sale,
.price-per-100ml-column .price-per-ml__value.is-sale,
.price-per-100ml-column .price-per-ml__value.sale {
  color: #b91c1c !important; /* red-700 */
  font-weight: var(--font-weight-semibold, 600) !important;
}

/* Make single sizes (no quantity/pack) bold, e.g. "473mL", "4L" */
td:nth-child(3):not(:has(.size-pack)) {
  font-weight: var(--font-weight-bold, 700) !important;
}


