/* BITANIK Commerce Conversion UX 2.9.38
 * Final, scoped conversion layer: archive purchase modes + mobile cart resilience.
 */

/* -------- Product archive / home cards: explicit buying paths -------- */
.bq2-card-actions-purchase{display:block!important;margin-top:9px!important}
.bq2-card-purchase-modes{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;min-width:0!important}
.bq2-card-mode-form{display:block!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;float:none!important}
.bq2-card-mode-form input[type="hidden"]{display:none!important}
.bq2-card-mode-button{appearance:none!important;-webkit-appearance:none!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:52px!important;margin:0!important;padding:8px 10px!important;border-radius:15px!important;text-align:center!important;text-decoration:none!important;white-space:normal!important;overflow-wrap:anywhere!important;font-family:var(--bq2-font)!important;cursor:pointer!important;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease!important}
.bq2-card-mode-button>span{display:block!important;font-size:12px!important;font-weight:900!important;line-height:1.55!important}
.bq2-card-mode-button>small{display:block!important;font-size:9px!important;font-weight:700!important;line-height:1.45!important;opacity:.92!important}
.bq2-card-mode-button:hover{transform:translateY(-1px)!important;filter:saturate(1.06) brightness(1.01)!important}
.bq2-card-mode-button:focus-visible{outline:3px solid rgba(38,112,220,.32)!important;outline-offset:2px!important}

/* Ordinary purchase stays visually distinct from installment and cash. */
body.bq2-active .bq2-normal-buy,.bq2-normal-buy{border:1px solid #7394a6!important;background:linear-gradient(145deg,#f9fdff,#e8f3f8)!important;color:#294b60!important;box-shadow:0 6px 14px rgba(41,75,96,.10)!important}

/* Indigo/blue = trust, planning, credit. */
body.bq2-active .bq2-installment-buy,.bq2-installment-buy{border:1px solid #5558bd!important;background:linear-gradient(145deg,#6f72df,#4045a8)!important;color:#fff!important;box-shadow:0 9px 20px rgba(64,69,168,.20),inset 0 1px 0 rgba(255,255,255,.35)!important}
/* Green = saving / cash value. */
body.bq2-active .bq2-cash-buy,.bq2-cash-buy{border:1px solid #15905a!important;background:linear-gradient(145deg,#2cbd79,#128551)!important;color:#fff!important;box-shadow:0 9px 20px rgba(18,133,81,.18),inset 0 1px 0 rgba(255,255,255,.35)!important}
.bq2-card-mode-button.is-view{border:1px solid rgba(96,130,150,.3)!important;background:linear-gradient(145deg,#f9fdff,#e8f3f8)!important;color:#385a6d!important;cursor:default!important}

/* Standard Woo product loops: suppress the superseded generic CTAs only. */
.woocommerce ul.products li.product>.button.add_to_cart_button,
.woocommerce ul.products li.product>.added_to_cart,
.woocommerce ul.products li.product>.bq2-loop-quick,
.woocommerce ul.products li.product>.bq2-quick-buy{display:none!important}
.woocommerce ul.products li.product .bq2-card-purchase-modes{margin-top:10px!important}
.woocommerce ul.products li.product .bq2-card-mode-button{min-height:56px!important}

/* If Compare is provided by its plugin, it remains a distinct comparison action. */
.woocommerce ul.products li.product .btncmp-add,
.bq2-product-card .btncmp-add{margin-top:8px!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}

/* -------- Cart: coupon / totals must never be clipped on mobile -------- */
@media (max-width: 768px){
  body.woocommerce-cart .bq2-woo-shell,
  body.woocommerce-cart .woocommerce,
  body.woocommerce-cart form.woocommerce-cart-form,
  body.woocommerce-cart table.shop_table,
  body.woocommerce-cart table.shop_table tbody,
  body.woocommerce-cart table.shop_table tr:not(.cart_item),
  body.woocommerce-cart table.shop_table tr:not(.cart_item) td.actions,
  body.woocommerce-cart .cart-collaterals,
  body.woocommerce-cart .cart_totals{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;float:none!important;clear:both!important;inset:auto!important;transform:none!important}

  body.woocommerce-cart table.shop_table tr:not(.cart_item) td.actions{display:block!important;padding:10px 0!important;overflow:visible!important}
  body.woocommerce-cart .actions .coupon{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;float:none!important;margin:0 0 10px!important;padding:12px!important;overflow:hidden!important;border-radius:22px!important}
  body.woocommerce-cart .actions .coupon :is(label,input.input-text,input[type="text"],button,.button){box-sizing:border-box!important;display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;float:none!important;position:static!important;inset:auto!important;transform:none!important;margin:0!important}
  body.woocommerce-cart .actions .coupon input.input-text,
  body.woocommerce-cart .actions .coupon input[type="text"]{height:auto!important;min-height:52px!important;padding:10px 14px!important;font-size:16px!important;line-height:1.5!important}
  body.woocommerce-cart .actions .coupon button,
  body.woocommerce-cart .actions .coupon .button{min-height:52px!important;padding:10px 14px!important;white-space:normal!important;line-height:1.5!important}
  body.woocommerce-cart button[name="update_cart"]{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-height:50px!important;margin:0!important;white-space:normal!important}
  body.woocommerce-cart .cart_totals{overflow:hidden!important;padding:14px!important}
  body.woocommerce-cart .cart_totals table{box-sizing:border-box!important;width:100%!important;max-width:100%!important;table-layout:fixed!important}
  body.woocommerce-cart .cart_totals th,
  body.woocommerce-cart .cart_totals td{box-sizing:border-box!important;width:50%!important;max-width:50%!important;min-width:0!important;padding:12px 7px!important;overflow-wrap:anywhere!important}
  body.woocommerce-cart .wc-proceed-to-checkout,
  body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;float:none!important}
  body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{min-height:56px!important;padding:11px 12px!important;white-space:normal!important;line-height:1.55!important}
  body.woocommerce-cart .bq2-main{padding-bottom:calc(104px + env(safe-area-inset-bottom))!important}
}

@media (max-width: 430px){
  .woocommerce ul.products li.product .bq2-card-mode-button,
  .bq2-product-card .bq2-card-mode-button{min-height:54px!important;padding:7px 8px!important}
  .woocommerce ul.products li.product .bq2-card-mode-button>span,
  .bq2-product-card .bq2-card-mode-button>span{font-size:11px!important}
  .woocommerce ul.products li.product .bq2-card-mode-button>small,
  .bq2-product-card .bq2-card-mode-button>small{font-size:8px!important}
}

/* Dedicated native submits keep Woo quantity and variation controls visible. */
.bq2-native-purchase-modes{display:grid;gap:10px;width:100%;clear:both;margin-top:12px}
.bq2-native-purchase-modes p{font-size:14px;line-height:1.8;margin:0}
.bq2-native-purchase-modes button{width:100%;min-height:48px;white-space:normal;line-height:1.7}
.bq2-native-purchase-modes button:disabled{opacity:.55;cursor:not-allowed}
.bq2-native-purchase-modes button:focus-visible{outline:3px solid #2470c9;outline-offset:3px}
