/* Dynessco header search + categories widgets */
.dywa-product-search,
.dywa-categories-menu,
.dywa-product-search *,
.dywa-categories-menu *{box-sizing:border-box;font-family:'Montserrat',sans-serif;}

.dywa-product-search{position:relative;max-width:100%;z-index:9999;}
.dywa-search-form{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:#fff;border-radius:6px;overflow:hidden;}
.dywa-search-input{flex:1;min-width:0;width:100%;height:100%;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;font-size:14px;font-weight:500;}
.dywa-search-input::-webkit-search-decoration,.dywa-search-input::-webkit-search-cancel-button{display:none;}
.dywa-search-submit{border:0!important;background:transparent!important;color:#000;display:inline-flex;align-items:center;justify-content:center;padding:0!important;min-width:30px;cursor:pointer;box-shadow:none!important;line-height:1;transition:color .25s ease,transform .25s ease;}
.dywa-search-submit:hover{transform:scale(1.04);}
.dywa-search-submit svg{display:block;}
.dywa-search-results{position:absolute;left:0;right:0;top:calc(100% + 8px);display:none;overflow:hidden;z-index:999999;border:1px solid rgba(0,0,0,.08);}
.dywa-product-search.is-active .dywa-search-results{display:block;}
.dywa-search-loading,.dywa-search-empty,.dywa-search-view-all{display:block;padding:13px 14px;color:#111;font-size:13px;font-weight:600;text-decoration:none;}
.dywa-search-result-item{display:flex;align-items:center;gap:12px;padding:10px 12px;text-decoration:none!important;transition:background .2s ease;}
.dywa-search-result-img{width:48px;height:48px;border-radius:7px;background:#f7f7f7;display:flex;align-items:center;justify-content:center;flex:0 0 48px;overflow:hidden;}
.dywa-search-result-img img{width:100%;height:100%;object-fit:contain;display:block;}
.dywa-search-result-content{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;}
.dywa-search-result-title{display:block;line-height:1.25;font-size:13px;font-weight:700;color:#111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dywa-search-result-price{display:block;font-size:12px;font-weight:800;line-height:1.2;color:#B41F29;}
.dywa-search-view-all{border-top:1px solid rgba(0,0,0,.08);text-align:center;color:#B41F29!important;background:#fff;}

.dywa-categories-menu{position:relative;display:inline-block;z-index:9999;}
.dywa-cat-menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:13px;border:0!important;box-shadow:none!important;cursor:pointer;line-height:1;color:#fff;background:#EF233C;min-height:54px;font-weight:800;font-size:16px;transition:background .25s ease,color .25s ease;}
.dywa-cat-menu-toggle:focus{outline:0;}
.dywa-cat-hamburger{display:inline-flex;align-items:center;justify-content:center;line-height:1;}
.dywa-cat-hamburger svg{display:block;}
.dywa-cat-dropdown{position:absolute;left:0;top:100%;display:none;min-width:100%;padding:0;overflow:hidden;z-index:999999;background:#EF233C;}
.dywa-categories-menu.is-open .dywa-cat-dropdown,
.dywa-categories-menu[data-open="hover_click"]:hover .dywa-cat-dropdown{display:block;}
.dywa-cat-dropdown a{display:flex;align-items:center;justify-content:space-between;gap:12px;text-decoration:none!important;line-height:1.25;font-size:14px;font-weight:800;transition:background .22s ease,color .22s ease;}
.dywa-cat-dropdown a em{font-style:normal;font-size:.85em;opacity:.85;}
.dywa-cat-empty{display:block;padding:14px 18px;color:#fff;font-size:13px;}

@media (max-width:1024px){
  .dywa-product-search{width:100%!important;}
  .dywa-categories-menu{width:100%;}
  .dywa-cat-menu-toggle{width:100%!important;justify-content:flex-start;}
  .dywa-cat-dropdown{width:100%!important;max-height:60vh;overflow:auto;-webkit-overflow-scrolling:touch;}
}
@media (max-width:767px){
  .dywa-search-form{height:46px!important;}
  .dywa-search-result-img{width:42px;height:42px;flex-basis:42px;}
  .dywa-search-result-title{font-size:12px;}
  .dywa-cat-menu-toggle{min-height:48px!important;font-size:15px;gap:10px;}
}

/* v3.4: keep live search dropdown above mobile/header language bars */
.elementor-widget-dynessco_woo_product_search,
.elementor-widget-dynessco_woo_product_search .elementor-widget-container,
.elementor-widget-dynessco_woo_categories_menu,
.elementor-widget-dynessco_woo_categories_menu .elementor-widget-container{
  position:relative!important;
  z-index:999999!important;
  overflow:visible!important;
}
.dywa-search-zlift{
  position:relative!important;
  z-index:2147483645!important;
  overflow:visible!important;
}
.dywa-product-search.is-active{
  z-index:2147483645!important;
}
.dywa-product-search.is-active .dywa-search-results{
  z-index:2147483645!important;
  background:#fff;
  box-shadow:0 16px 40px rgba(0,0,0,.18);
  max-height:calc(100vh - 130px);
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
}
@media (max-width:767px){
  .dywa-product-search.is-active .dywa-search-results{
    top:calc(100% + 6px)!important;
    max-height:360px;
  }
}

/* v3.5: true portal dropdown. This fixes header/language bar overlay and clipped results. */
body > .dywa-search-results-portal{
  display:none;
  position:fixed!important;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  box-shadow:0 20px 50px rgba(0,0,0,.24);
  overflow:hidden;
  max-height:min(420px, calc(100vh - 120px));
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
  z-index:2147483647!important;
  font-family:'Montserrat',sans-serif;
  box-sizing:border-box;
}
body > .dywa-search-results-portal.is-active{display:block!important;}
body > .dywa-search-results-portal *{box-sizing:border-box;font-family:'Montserrat',sans-serif;}
body > .dywa-search-results-portal .dywa-search-loading,
body > .dywa-search-results-portal .dywa-search-empty,
body > .dywa-search-results-portal .dywa-search-view-all{display:block;padding:13px 14px;color:#111;font-size:13px;font-weight:600;text-decoration:none;}
body > .dywa-search-results-portal .dywa-search-result-item{display:flex;align-items:center;gap:12px;padding:10px 12px;text-decoration:none!important;transition:background .2s ease;background:#fff;}
body > .dywa-search-results-portal .dywa-search-result-item:hover{background:#f5f5f5;}
body > .dywa-search-results-portal .dywa-search-result-img{width:48px;height:48px;border-radius:7px;background:#f7f7f7;display:flex;align-items:center;justify-content:center;flex:0 0 48px;overflow:hidden;}
body > .dywa-search-results-portal .dywa-search-result-img img{width:100%;height:100%;object-fit:contain;display:block;}
body > .dywa-search-results-portal .dywa-search-result-content{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;}
body > .dywa-search-results-portal .dywa-search-result-title{display:block;line-height:1.25;font-size:13px;font-weight:700;color:#111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body > .dywa-search-results-portal .dywa-search-result-price{display:block;font-size:12px;font-weight:800;line-height:1.2;color:#B41F29;}
body > .dywa-search-results-portal .dywa-search-view-all{border-top:1px solid rgba(0,0,0,.08);text-align:center;color:#B41F29!important;background:#fff;}
@media (max-width:767px){
  body > .dywa-search-results-portal{max-height:min(360px, calc(100vh - 110px));}
  body > .dywa-search-results-portal .dywa-search-result-img{width:42px;height:42px;flex-basis:42px;}
  body > .dywa-search-results-portal .dywa-search-result-title{font-size:12px;}
}

/* v3.6: mobile search icon toggle widget */
.dywa-mobile-search-toggle-widget,
.dywa-mobile-search-toggle-widget *{box-sizing:border-box;font-family:'Montserrat',sans-serif;}
.dywa-mobile-search-toggle-widget{display:inline-flex;align-items:center;justify-content:center;position:relative;z-index:999999;}
.dywa-mobile-search-open{border:0!important;box-shadow:none!important;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0!important;line-height:1;transition:background .25s ease,color .25s ease,transform .25s ease;}
.dywa-mobile-search-open:hover{transform:translateY(-1px);}
.dywa-mobile-search-open svg{display:block;}
.dywa-mobile-search-overlay{display:none;position:fixed;inset:0;z-index:2147483645;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);}
.dywa-mobile-search-panel{display:none;position:fixed;left:0;right:0;top:0;width:100%;z-index:2147483646;box-shadow:0 18px 50px rgba(0,0,0,.32);}
.dywa-mobile-search-toggle-widget.is-open .dywa-mobile-search-overlay,
.dywa-mobile-search-toggle-widget.is-open .dywa-mobile-search-panel{display:block;}
.dywa-mobile-search-close{position:absolute;right:14px;top:14px;width:38px;height:38px;border:0!important;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;z-index:2;padding:0!important;box-shadow:none!important;transition:background .25s ease,transform .25s ease;}
.dywa-mobile-search-close:hover{transform:rotate(90deg);}
.dywa-mobile-search-close svg{width:18px;height:18px;display:block;}
.dywa-mobile-search-inner{width:100%!important;padding-right:52px;}
.dywa-mobile-search-inner .dywa-search-form{width:100%;}
.dywa-mobile-search-lock{overflow:hidden!important;}
.dywa-mobile-search-toggle-widget .dywa-search-results{display:none!important;}
.dywa-mobile-search-toggle-widget.is-open .dywa-product-search{z-index:2147483647!important;}

/* When mobile search is open, force all floating/cart/header cart icons behind or hidden.
   This prevents Caddy / Woo mini-cart icons from appearing above the search overlay. */
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-floating-cart,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-floating-cart-button,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-cart-button,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-trigger,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-cart-trigger,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-opener,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-icon,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-cart-count,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-count,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-badge,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .caddy-cart-badge,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .elementor-widget-woocommerce-menu-cart,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .elementor-menu-cart__toggle,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .elementor-menu-cart__toggle_button,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .site-header-cart,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .header-cart,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .cart-icon,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .mini-cart,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .woocommerce-mini-cart,
html.dywa-mobile-search-lock body.dywa-mobile-search-active a[href*="cart"].cart-contents{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-toggle-widget,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-overlay,
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-panel{
  opacity:1!important;
  visibility:visible!important;
}

@media (max-width:767px){
  .dywa-mobile-search-panel{top:0;}
  .dywa-mobile-search-inner{padding-right:50px;}
  .dywa-mobile-search-close{right:12px;top:12px;width:36px;height:36px;}
}

@media (min-width:768px){
  .dywa-mobile-search-panel{max-width:760px;left:50%;right:auto;transform:translateX(-50%);top:20px;border-radius:14px!important;}
  .dywa-mobile-search-overlay{background:rgba(0,0,0,.55)!important;}
}

/* v3.8: stronger mobile search overlay/cart hiding fix */
html.dywa-mobile-search-lock body.dywa-mobile-search-active::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:2147483644!important;
  background:rgba(0,0,0,.82)!important;
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  pointer-events:none;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active [data-dywa-cart-hidden="1"]{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-overlay{
  background:rgba(0,0,0,.82)!important;
  backdrop-filter:blur(7px)!important;
  -webkit-backdrop-filter:blur(7px)!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-panel{
  z-index:2147483647!important;
}

/* v3.9: mobile search visibility fix - do not cover the search form with the dark overlay */
html.dywa-mobile-search-lock body.dywa-mobile-search-active::before{
  content:none!important;
  display:none!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-overlay,
.dywa-mobile-search-toggle-widget.is-open .dywa-mobile-search-overlay{
  background:rgba(0,0,0,.58)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  z-index:99999990!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-panel,
.dywa-mobile-search-toggle-widget.is-open .dywa-mobile-search-panel{
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
  -webkit-filter:none!important;
  z-index:99999999!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-panel *,
.dywa-mobile-search-toggle-widget.is-open .dywa-mobile-search-panel *{
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
  -webkit-filter:none!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-panel .dywa-search-form{
  background:#ffffff!important;
  box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
}
html.dywa-mobile-search-lock body.dywa-mobile-search-active .dywa-mobile-search-close{
  background:#EF233C!important;
  color:#ffffff!important;
}

/* DYWA v6.1 uploaded search icon support */
.dywa-search-submit img.dywa-search-custom-icon{display:block;width:22px;height:22px;object-fit:contain;}
.dywa-search-submit svg,.dywa-search-submit img{transition:transform .2s ease;}
.dywa-search-submit:hover svg,.dywa-search-submit:hover img{transform:scale(1.04);}
