/* =========================================================
   BabyLife 2.7.8 — compact commerce header
   Mobile visual order (RTL): product search | cart icon | hamburger.
   No navigation URLs, Woo cart logic or SEO output are changed.
   ========================================================= */
.blsc-product-search-form{
  display:flex;
  direction:rtl;
  width:100%;
  min-width:0;
  min-height:46px;
  overflow:hidden;
  border:1px solid var(--bl-line,#e6e0e4);
  border-radius:14px;
  background:#faf9fb;
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
.blsc-product-search-form:focus-within{
  border-color:#b982a7;
  background:#fff;
  box-shadow:0 0 0 3px rgba(115,28,83,.08);
}
.blsc-product-search-form input[type="search"]{
  flex:1 1 auto;
  width:100%;
  min-width:0;
  margin:0;
  padding:10px 14px;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  color:#252027;
  font-family:inherit;
  font-size:13px;
}
.blsc-product-search-form button{
  flex:0 0 auto;
  min-width:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0;
  padding:0 14px;
  border:0;
  background:#731c53;
  color:#fff;
  font-family:inherit;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.blsc-product-search-form button svg{width:19px;height:19px;display:block;flex:0 0 auto}

.blsc-cart-link{position:relative}
.blsc-cart-icon{
  position:relative;
  width:24px;
  height:24px;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
}
.blsc-cart-icon>svg{width:23px;height:23px;display:block}
.blsc-cart-icon>.blsc-cart-count{
  position:absolute;
  top:-9px;
  right:-10px;
  min-width:18px;
  height:18px;
  display:grid;
  place-items:center;
  padding:0 4px;
  border:2px solid #fff;
  border-radius:999px;
  background:#ff7a30;
  color:#fff;
  font-size:9px;
  font-weight:900;
  line-height:1;
}
.blsc-checkout-brand-text{display:none}

@media (max-width:820px){
  .blsc-header-main,
  .blsc-header-main.blsc-no-brand{
    display:flex !important;
    flex-direction:row !important;
    direction:ltr !important;
    align-items:center !important;
    width:100% !important;
    min-height:62px !important;
    gap:7px !important;
    padding-block:8px !important;
  }
  .blsc-header-main>.blsc-brand{display:none !important}
  .blsc-header-main>.blsc-search{
    order:2 !important;
    flex:1 1 auto !important;
    width:auto !important;
    min-width:0 !important;
    grid-area:auto !important;
  }
  .blsc-header-main>.blsc-header-actions{
    order:1 !important;
    flex:0 0 auto !important;
    display:flex !important;
    flex-direction:row !important;
    direction:ltr !important;
    align-items:center !important;
    gap:6px !important;
    grid-area:auto !important;
  }
  .blsc-header-actions .blsc-cart-link{
    order:2 !important;
    width:44px !important;
    min-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    display:grid !important;
    place-items:center !important;
    padding:0 !important;
    border:1px solid #e6dfe4 !important;
    border-radius:12px !important;
    background:#fff !important;
    color:#183b56 !important;
  }
  .blsc-header-actions .blsc-menu-toggle{
    order:1 !important;
    width:44px !important;
    min-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 !important;
    border-radius:12px !important;
  }
  .blsc-cart-label,.blsc-menu-text{display:none !important}
  .blsc-menu-icon{width:22px !important}
  .blsc-product-search-form{min-height:44px;border-radius:12px}
  .blsc-product-search-form input[type="search"]{padding:9px 11px;font-size:12px}
  .blsc-product-search-form button{min-width:44px;width:44px;padding:0}
  .blsc-product-search-form button .blsc-search-button-text{display:none}
  .blsc-product-search-form button svg{width:20px;height:20px}
  .blsc-cart-icon{width:24px;height:24px}
}

@media (max-width:390px){
  .blsc-header-main,.blsc-header-main.blsc-no-brand{gap:5px !important}
  .blsc-header-actions{gap:5px !important}
  .blsc-header-actions .blsc-cart-link,
  .blsc-header-actions .blsc-menu-toggle{width:42px !important;min-width:42px !important;height:42px !important;min-height:42px !important}
  .blsc-product-search-form{min-height:42px}
  .blsc-product-search-form button{width:42px;min-width:42px}
  .blsc-product-search-form input[type="search"]{font-size:11.5px;padding-inline:9px}
}

/* Checkout keeps a trustworthy brand cue even when the normal header controls are hidden. */
body.woocommerce-checkout:not(.woocommerce-order-received) .blsc-header-main{
  position:relative;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .blsc-checkout-brand-text{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:7px 18px;
  border-radius:13px;
  color:#731c53 !important;
  font-size:17px;
  font-weight:950;
  text-decoration:none !important;
}


/* v2.8.5 — permanent mobile order, independent of conversion assets.
   RIGHT -> product search -> cart -> hamburger. */
@media (max-width:820px){
  .blsc-header-main,
  .blsc-header-main.blsc-no-brand{direction:rtl!important;flex-direction:row!important}
  .blsc-header-main>.blsc-search{order:1!important;flex:1 1 auto!important}
  .blsc-header-main>.blsc-header-actions{order:2!important;direction:rtl!important;flex-direction:row!important}
  .blsc-header-actions .blsc-cart-link{order:1!important}
  .blsc-header-actions .blsc-menu-toggle{order:2!important}
}

/* v2.8.7 — My Account utility link.
   Adds one lightweight account button only; existing search/cart/menu order stays intact. */
.blsc-account-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:8px 13px;
  border:1px solid var(--bl-line,#e6e0e4);
  border-radius:13px;
  background:#fff;
  color:#183b56 !important;
  text-decoration:none !important;
  font-weight:700;
  white-space:nowrap;
}
.blsc-account-link:hover,
.blsc-account-link:focus-visible{
  color:#731c53 !important;
  border-color:#cfb6c7;
  background:#fffafb;
}
.blsc-account-icon{
  width:24px;
  height:24px;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
}
.blsc-account-icon>svg{width:23px;height:23px;display:block}
.blsc-account-label{font-size:12px;line-height:1}

@media (max-width:820px){
  .blsc-header-actions .blsc-account-link{
    order:2 !important;
    width:44px !important;
    min-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 !important;
    border-radius:12px !important;
  }
  .blsc-header-actions .blsc-cart-link{order:1 !important}
  .blsc-header-actions .blsc-menu-toggle{order:3 !important}
  .blsc-account-label{display:none !important}
}

@media (max-width:390px){
  .blsc-header-actions .blsc-account-link{
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    min-height:42px !important;
  }
}
