/* BITANIK Quantum 2.9.13 — Final commerce/mobile hardening */

/* Native no-JS fallback: the menu can open via #bq2-mobile-menu even if an
   optimization/cache plugin delays or breaks the JavaScript controller. */
#bq2-mobile-menu:target{display:grid!important;pointer-events:auto!important}
.bq2-mobile-menu-toggle{touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important;text-decoration:none!important;cursor:pointer!important}
.bq2-mobile-menu-head [data-bq2-mobile-menu-close]{display:grid;place-items:center;width:39px;height:39px;border:1px solid #bee5f4;border-radius:50%;background:#fff;color:#12516f;font-size:24px;line-height:1;text-decoration:none}

/* Top page rail has only Back + Home. Bottom rail keeps Back + Top + Home. */
.bq2-page-rails-top{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.bq2-page-rails-bottom{grid-template-columns:repeat(3,minmax(0,1fr))!important}

/* Express button is a peer CTA, never a giant standalone mobile control. */
@media(max-width:860px){
  .woocommerce ul.products li.product .bq2-loop-quick,
  .woocommerce ul.products li.product .bq2-quick-buy,
  .bq2-product-card .bq2-quick-buy,
  .bq2-product-card .bq2-add{
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:40px!important;height:40px!important;max-height:40px!important;
    padding:0 8px!important;margin:0!important;border-radius:13px!important;
    font-size:10px!important;line-height:1.25!important;white-space:nowrap!important;
    writing-mode:horizontal-tb!important;text-orientation:mixed!important;
    overflow:hidden!important;text-overflow:ellipsis!important;
  }
  .bq2-quick-buy.is-loading{opacity:.72!important;cursor:wait!important}
}

/* Checkout/PAY button must not bleed out of 320–430px mobile viewports. */
body.woocommerce-checkout #payment,
body.woocommerce-checkout .woocommerce-checkout-review-order,
body.woocommerce-checkout .wc_payment_methods,
body.woocommerce-checkout .form-row.place-order{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
body.woocommerce-checkout #place_order{
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
  box-sizing:border-box!important;margin:12px 0 0!important;padding:13px 12px!important;height:auto!important;min-height:52px!important;
  white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;
}

/* Bottom mobile navigation: enough vertical room for the full Persian labels. */
@media(max-width:782px){
  body.bq2-active{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  .bq2-footer{padding-bottom:calc(112px + env(safe-area-inset-bottom))!important}
  .bq2-mobile-nav{
    height:auto!important;min-height:82px!important;overflow:visible!important;
    padding:7px 7px calc(9px + env(safe-area-inset-bottom))!important;
    align-items:stretch!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  .bq2-mobile-nav a{
    min-width:0!important;min-height:66px!important;height:auto!important;
    padding:3px 2px!important;margin:0 2px!important;overflow:visible!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:4px!important;
  }
  .bq2-mobile-nav a>span{flex:0 0 auto!important;overflow:visible!important}
  .bq2-mobile-nav small{
    display:block!important;width:100%!important;max-width:none!important;min-height:15px!important;
    padding:0 1px!important;margin:0!important;overflow:visible!important;text-overflow:clip!important;
    white-space:nowrap!important;text-align:center!important;font-size:9.5px!important;line-height:1.45!important;font-weight:900!important;
  }
  .bq2-page-rails-top{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .bq2-page-rails-bottom{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:359px){
  .bq2-mobile-nav{padding-inline:4px!important;gap:2px!important}
  .bq2-mobile-nav a{margin:0 1px!important}
  .bq2-mobile-nav small{font-size:8.5px!important;letter-spacing:-.15px!important}
  .bq2-page-rail{padding-inline:7px!important;gap:6px!important}
  .bq2-page-rail-copy strong{font-size:10px!important}.bq2-page-rail-copy small{font-size:8px!important}
}
