/* Xemry purchase controls v3.9.29. Keep v3.9.28 seat cards untouched. */
/* FIX: the XLP trust/benefits strip had been auto-placed in the second
   purchase grid column, forcing Add to Cart and Buy Now into narrow cells.
   Pin the three real purchase controls to explicit cells and give the badges
   their own full-width row regardless of source order. */
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart,
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form) {
  display:grid!important;
  grid-template-columns:minmax(92px,104px) minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  gap:10px!important;
  width:100%!important; min-width:0!important; max-width:100%!important;
  align-items:stretch!important; box-sizing:border-box!important;
}
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart::before,
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form)::before {content:none!important;display:none!important;}
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > .quantity:not(.hidden),
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form) > .quantity:not(.hidden) {
  grid-row:1!important;grid-column:1!important;
  width:100%!important;min-width:0!important;min-height:56px!important;
  display:flex!important; align-self:stretch!important; box-sizing:border-box!important;
}
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > .single_add_to_cart_button,
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form) > .single_add_to_cart_button {
  grid-row:1!important;grid-column:2!important;
  justify-self:stretch!important;align-self:stretch!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  min-height:56px!important;height:auto!important;
  margin:0!important;padding:12px 9px!important;
  border:1px solid #851335!important;border-radius:12px!important;
  background:#911539!important;color:#fff!important;
  box-shadow:0 5px 14px rgb(95 24 50 / 16%)!important;
  font:800 clamp(13px,3.8vw,16px)/1.3 system-ui,Arial,sans-serif!important;
  letter-spacing:.015em!important;text-transform:none!important;
  white-space:normal!important;text-align:center!important;
  overflow-wrap:normal!important;word-break:normal!important;
  cursor:pointer!important;
}
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > .single_add_to_cart_button:not(:disabled):hover,
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form) > .single_add_to_cart_button:not(:disabled):hover {background:#ab1e45!important;color:#fff!important;}
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > :is(.luania-buy-now,.xlp-buy-now,button[name="luania_buy_now"]),
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form) > :is(.luania-buy-now,.xlp-buy-now,button[name="luania_buy_now"]) {
  grid-row:2!important;grid-column:1/-1!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  justify-self:stretch!important;align-self:stretch!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  min-height:55px!important;height:auto!important;
  margin:0!important;padding:12px 14px!important;
  border:1px solid #d99e53!important;border-radius:12px!important;
  background:linear-gradient(105deg,#ffdfa9,#efba75)!important;
  color:#68303c!important;box-shadow:0 5px 12px rgb(145 99 35 / 12%)!important;
  font:850 clamp(14px,4vw,17px)/1.25 system-ui,Arial,sans-serif!important;
  text-align:center!important;letter-spacing:.02em!important;
  text-transform:uppercase!important;white-space:normal!important;
  cursor:pointer!important;
}
/* Allow badges from the XLP purchase module to occupy the full form width;
   their HTML and any existing links remain intact. */
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > :is(.xm-purchase-assurances,.xm-purchase-assurances-slot),
body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form) > :is(.xm-purchase-assurances,.xm-purchase-assurances-slot) {
  grid-row:3!important;grid-column:1/-1!important;
  display:grid!important;grid-template-columns:repeat(var(--xm-purchase-columns,3),minmax(0,1fr))!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  height:auto!important;min-height:0!important;
  box-sizing:border-box!important;margin:2px 0 0!important;
  padding:11px 8px!important;border:1px solid #c8e4d4!important;
  border-radius:11px!important;background:#eff8f1!important;
  gap:4px!important;align-items:center!important;
  box-shadow:none!important;
}
body.xm-product-responsive .xm-purchase-assurances > * {
  min-width:0!important;max-width:100%!important;width:auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:5px!important;margin:0!important;padding:2px 5px!important;
  background:transparent!important;box-sizing:border-box!important;
  font:600 10px/1.35 system-ui,Arial,sans-serif!important;
  text-align:center!important;white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.xm-product-responsive .xm-purchase-assurances > * + * {
  border-inline-start:1px solid #d6eadc!important;
}
body.xm-product-responsive .xm-purchase-assurances :is(svg,i) {flex:0 0 auto!important;max-width:18px!important;}
/* Hide old merchant-defined inline labels only when admin deliberately clears
   the corresponding badge field (a blank admin value is the opt-out). */
body.xm-product-responsive [data-xm-purchase-hidden="1"] {display:none!important;}
/* Product forms may have WooCommerce hidden fields interspersed; keep those
   hidden, not eligible for automatic grid placement. */
body.xm-product-responsive form.cart input[type="hidden"] {display:none!important;}
body.xm-product-responsive form.cart .quantity:not(.hidden) .qty {min-height:56px!important;}
body.xm-product-responsive form.cart .quantity:not(.hidden) .luania-qty-btn {z-index:3!important;}
body.xm-product-responsive form.cart .quantity:not(.hidden) {overflow:visible!important;}
body.xm-product-responsive form.cart :is(.single_add_to_cart_button,.luania-buy-now,.xlp-buy-now):is(:disabled,.disabled){opacity:.5!important;cursor:not-allowed!important;}
/* When quantity is intentionally hidden, allow Add to Cart to occupy the full row. */
body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart:has(> .quantity.hidden) > .single_add_to_cart_button,
body.xm-product-responsive form.cart:not(.variations_form):has(> .quantity.hidden) > .single_add_to_cart_button {grid-column:1/-1!important;}
@media(max-width:359px){
  body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart,
  body.xm-product-responsive form.cart:not(.variations_form):not(.grouped_form){grid-template-columns:92px minmax(0,1fr)!important;gap:8px!important;}
  body.xm-product-responsive .xm-purchase-assurances > *{padding:2px!important;font-size:9.5px!important;gap:3px!important;}
}
html[dir="rtl"] body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > .quantity:not(.hidden) {grid-column:1!important;}
html[dir="rtl"] body.xm-product-responsive form.cart .woocommerce-variation-add-to-cart > .single_add_to_cart_button {grid-column:2!important;}
