/* Bio-Essence standalone mobile search patch; nothing outside <=767px. */
@media (max-width:767px) {
  /* Redundant Elementor cross in the mobile header (not the popup's proper close button). */
  body .elementor-location-header .elementor-element-707aa0f .elementor-element-3c98cc2 { display:none!important; }

  /* Polish the existing working search popup. No icon or form injected by this plugin. */
  body .be-mobile-search-v2 { display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 40px!important;width:40px!important;min-width:40px!important;margin-left:auto!important;margin-right:8px!important; }
  body .be-mobile-search-v2 > button {display:inline-flex!important;align-items:center!important;justify-content:center!important;width:40px!important;min-width:40px!important;height:44px!important;min-height:44px!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#111!important;}
  body .be-mobile-search-v2 svg {width:23px!important;height:23px!important;}
  body .be-mobile-search-overlay-v2 {position:fixed!important;inset:0!important;z-index:2147483640!important;padding:64px 16px 18px!important;overflow-x:hidden!important;overflow-y:auto!important;box-sizing:border-box!important;background:rgba(0,0,0,.48)!important;}
  body .be-mobile-search-overlay-v2[hidden] {display:none!important;}
  body .be-mobile-search-overlay-v2 .be-mobile-search-panel-v2 {width:100%!important;max-width:420px!important;margin:0 auto!important;padding:20px!important;border-radius:14px!important;border:0!important;background:#fff!important;box-shadow:0 14px 42px rgba(0,0,0,.18)!important;box-sizing:border-box!important;}
  body .be-mobile-search-overlay-v2 .be-mobile-search-top-v2 {display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 18px!important;}
  body .be-mobile-search-overlay-v2 .be-mobile-search-title-v2 {font-size:19px!important;font-weight:500!important;line-height:1.35!important;color:#111!important;}
  body .be-mobile-search-overlay-v2 button.be-mobile-search-close-v2 {appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 36px!important;width:36px!important;max-width:36px!important;min-width:36px!important;height:36px!important;max-height:36px!important;min-height:36px!important;padding:0!important;margin:0!important;border:none!important;border-radius:50%!important;background:#f2f4f5!important;color:#171717!important;font:400 25px/1 Arial,sans-serif!important;box-shadow:none!important;}
  body .be-mobile-search-overlay-v2 .be-mobile-search-form-v2 {display:flex!important;flex-direction:column!important;gap:12px!important;width:100%!important;margin:0!important;}
  body .be-mobile-search-overlay-v2 input.be-mobile-search-input-v2 {appearance:none!important;width:100%!important;min-height:50px!important;height:50px!important;padding:0 14px!important;margin:0!important;border:1px solid #d7dce0!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;color:#222!important;font-size:15px!important;box-sizing:border-box!important;}
  body .be-mobile-search-overlay-v2 input.be-mobile-search-input-v2:focus {border-color:#198ac3!important;outline:2px solid rgba(25,138,195,.18)!important;}
  body .be-mobile-search-overlay-v2 button.be-mobile-search-submit-v2 {display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:46px!important;padding:9px 12px!important;margin:0!important;border:0!important;border-radius:8px!important;background:#168ac4!important;color:#fff!important;font-size:15px!important;font-weight:600!important;box-shadow:none!important;}

}

/* v1.3.0 — self-contained search icon and dialog. No functions.php dependency. */
@media (max-width:767px) {
  /* Header-specific legacy cross, never hide Elementor popup close controls. */
  body .elementor-location-header .elementor-element-707aa0f .elementor-element-4659f8a { display:none!important; }
  body #be26-search-launch {display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 42px!important;width:42px!important;height:44px!important;margin:0 8px 0 auto!important;padding:0!important;position:relative!important;z-index:2!important;}
  body #be26-search-launch button {appearance:none!important;display:flex!important;align-items:center!important;justify-content:center!important;min-width:42px!important;width:42px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;background-image:none!important;box-shadow:none!important;color:#111!important;cursor:pointer!important;}
  body #be26-search-launch svg {display:block!important;width:23px!important;height:23px!important;stroke:currentColor!important;}
  body #be26-search-dialog[hidden] {display:none!important;}
  body #be26-search-dialog {position:fixed!important;inset:0!important;width:100%!important;height:100vh!important;height:100dvh!important;z-index:2147483645!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;padding:64px 16px 24px!important;overflow:auto!important;box-sizing:border-box!important;background:rgba(18,25,32,.50)!important;}
  body #be26-search-dialog .be26-dialog-panel {width:100%!important;max-width:420px!important;margin:0 auto!important;padding:20px!important;border-radius:14px!important;box-sizing:border-box!important;background:#fff!important;box-shadow:0 18px 50px rgba(0,0,0,.20)!important;}
  body #be26-search-dialog .be26-dialog-top {display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:18px!important;}
  body #be26-search-dialog .be26-dialog-title {font-size:19px!important;line-height:1.35!important;font-weight:500!important;color:#171717!important;}
  body #be26-search-dialog button.be26-dialog-close {appearance:none!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:#f1f4f6!important;background-image:none!important;box-shadow:none!important;color:#222!important;font:400 24px/1 Arial,sans-serif!important;cursor:pointer!important;}
  body #be26-search-dialog form {display:flex!important;flex-direction:column!important;gap:12px!important;margin:0!important;padding:0!important;}
  body #be26-search-dialog input[type=search] {appearance:none!important;display:block!important;width:100%!important;height:50px!important;min-height:50px!important;margin:0!important;padding:0 14px!important;border:1px solid #d8dee3!important;border-radius:9px!important;box-shadow:none!important;background:#fff!important;font-size:15px!important;color:#202020!important;box-sizing:border-box!important;}
  body #be26-search-dialog input[type=search]:focus {outline:2px solid rgba(23,142,196,.2)!important;border-color:#168ac4!important;}
  body #be26-search-dialog button[type=submit] {appearance:none!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important;min-height:46px!important;padding:10px!important;margin:0!important;border:0!important;border-radius:9px!important;background:#168ac4!important;background-image:none!important;box-shadow:none!important;color:#fff!important;font-size:15px!important;font-weight:600!important;cursor:pointer!important;}
}
@media (min-width:768px) {body #be26-search-launch, body #be26-search-dialog {display:none!important;}}

/* V1.3: true iPhone Safari search grid. Only product-search results, mobile only. */
@media only screen and (max-width:767px) {
  body.be26-mso-results ul.products:not(.slick-track):not(.swiper-wrapper),
  body.be26-mso-results ul.products.be26-mso-grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:18px 10px!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:12px 0 20px!important;padding:0 8px!important;
    float:none!important;clear:both!important;box-sizing:border-box!important;
    list-style:none!important;align-items:start!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid::before,
  body.be26-mso-results ul.products.be26-mso-grid::after {content:none!important;display:none!important;}
  body.be26-mso-results ul.products.be26-mso-grid > li.product {
    display:block!important;float:none!important;clear:none!important;position:relative!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;margin:0!important;padding:0!important;
    box-sizing:border-box!important;overflow:visible!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid > li.product .product-block,
  body.be26-mso-results ul.products.be26-mso-grid > li.product .product-transition {
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;box-sizing:border-box!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid > li.product .product-image,
  body.be26-mso-results ul.products.be26-mso-grid > li.product .be26-mso-image-frame {
    display:block!important;position:relative!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;max-height:none!important;min-height:0!important;
    aspect-ratio:1 / 1!important;overflow:hidden!important;
    padding:0!important;margin:0!important;background:#f7f7f7!important;
    box-sizing:border-box!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid > li.product .product-image > a {
    display:block!important;width:100%!important;height:100%!important;
    max-width:100%!important;overflow:hidden!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid > li.product img.be26-mso-product-img,
  body.be26-mso-results ul.products.be26-mso-grid > li.product .product-image img {
    display:block!important;position:static!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;max-height:none!important;min-height:0!important;
    aspect-ratio:1 / 1!important;object-fit:contain!important;object-position:center center!important;
    margin:0 auto!important;padding:0!important;transform:none!important;
    top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
    float:none!important;box-sizing:border-box!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid > li.product .product-caption {
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;padding:9px 2px 4px!important;
    text-align:center!important;box-sizing:border-box!important;
  }
  body.be26-mso-results ul.products.be26-mso-grid > li.product .woocommerce-loop-product__title,
  body.be26-mso-results ul.products.be26-mso-grid > li.product h2,
  body.be26-mso-results ul.products.be26-mso-grid > li.product h3 {
    font-size:13px!important;line-height:1.45!important;font-weight:400!important;
    text-align:center!important;white-space:normal!important;overflow-wrap:break-word!important;
    width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;
    margin:0!important;padding:0!important;
  }
  body.be26-mso-results .woocommerce-products-header__title,
  body.be26-mso-results .page-title {
    font-size:clamp(23px,6vw,27px)!important;line-height:1.3!important;
    overflow-wrap:anywhere!important;margin:0 0 18px!important;
  }
  body.be26-mso-results .woocommerce-pagination ul.page-numbers {
    display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:4px!important;
  }
}
