/*
Theme Name: Kayazh Bakala Child
Theme URI: https://kayazh.com/
Description: Update-safe customizations for the Kayazh storefront, based on Bakala.
Author: Kayazh
Author URI: https://kayazh.com/
Template: bakala
Version: 2.4.1
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: kayazh-bakala-child
*/

/* Update-safe Kayazh storefront customizations. */

/* Keep fixed commerce actions behind an open Bakala/Bootstrap dialog. */
body.modal-open iframe#goftino_w,
body.modal-open #goftino_w,
body.ar-panel-expanded iframe#goftino_w,
body.ar-panel-expanded #goftino_w{
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

@media(max-width:767px){
  /* Bakala's mobile FiboSearch rule shrinks the home hero input to 85%. */
  body.page-id-18589 #khp .khp-hero .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:62px!important;
    padding:10px 47px 10px 43px!important;
    font-size:16px!important;
  }

  /* Keep the requested one-row shortcuts and hint that more items can scroll. */
  body.page-id-18589 #khp .khp-hero .khp-quick{
    padding-inline-end:16px;
    -webkit-overflow-scrolling:touch;
    -webkit-mask-image:linear-gradient(to right,transparent 0,#000 18px);
    mask-image:linear-gradient(to right,transparent 0,#000 18px);
  }

  body:not(.page-id-18589) .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input{
    font-size:16px!important;
  }

  body.single-product main#content.container-bakala.main-woo-div{
    padding-bottom:calc(128px + env(safe-area-inset-bottom))!important;
  }

  body.single-product iframe#goftino_w.goftino-wakeup,
  body.single-product #goftino_w.goftino-wakeup{
    bottom:calc(124px + env(safe-area-inset-bottom))!important;
  }

  body.single-product.modal-open .product-info-box > form.cart .add-to-cart-holder,
  body.single-product.modal-open .bakala_product_float_box .add-to-cart-holder,
  body.single-product.modal-open .product_bar{
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
}

/* Bakala applies its .woocommerce content cap to the WooCommerce body too.
   Keep the page canvas fluid; native inner containers retain their own limits. */
body.woocommerce {
  max-width: none;
}
