/* Saheliyo v2.3.0 — shared customer UI core.
   Single source of truth for common navigation/logo/account/cart/bottom-nav across Home/Shop/Product/Sell/Earn. */
:root{
  --sah-core-header-h:66px;
  --sah-core-header-pad:18px;
  --sah-core-control-h:38px;
  --sah-core-account:38px;
  --sah-core-account-icon:18px;
  --sah-core-brand-size:20px;
  --sah-core-heart-size:9px;
  --sah-core-gap:8px;
  --sah-core-radius:12px;
  --sah-core-line:rgba(77,45,63,.11);
  --sah-core-bg:rgba(255,252,253,.97);
  --sah-core-brand:#d82e74;
  --sah-core-brand2:#7d3ff0;
  --sah-core-header-z:1200;
  --sah-core-bottom-z:1300;
  --sah-core-cart-z:1350;
  --sah-core-bottomnav-h:64px;
}
*{box-sizing:border-box}

/* === ONE HEADER GEOMETRY === */
html body[data-page="home"] .market-header,
html body[data-page="shop"] .market-header,
html body[data-page="product"] .market-header,
html body .join-top{
  position:sticky!important;top:0!important;left:0!important;right:0!important;
  width:100%!important;height:var(--sah-core-header-h)!important;
  min-height:var(--sah-core-header-h)!important;max-height:var(--sah-core-header-h)!important;
  margin:0!important;padding:0!important;transform:none!important;translate:none!important;
  transition:none!important;z-index:var(--sah-core-header-z)!important;
  background:var(--sah-core-bg)!important;border-bottom:1px solid var(--sah-core-line)!important;
  box-shadow:0 3px 16px rgba(45,22,36,.035)!important;
  backdrop-filter:blur(18px) saturate(1.08)!important;-webkit-backdrop-filter:blur(18px) saturate(1.08)!important;
}
html body[data-page="home"] .market-head-inner,
html body[data-page="shop"] .market-head-inner,
html body[data-page="product"] .market-head-inner,
html body .join-top-inner{
  width:min(100%,1220px)!important;max-width:1220px!important;height:100%!important;min-height:0!important;
  margin:0 auto!important;padding:0 var(--sah-core-header-pad)!important;
  display:flex!important;align-items:center!important;gap:var(--sah-core-gap)!important;overflow:visible!important;
}
html body[data-page="home"] .market-head-inner .actions,
html body[data-page="shop"] .market-head-inner .actions,
html body[data-page="product"] .market-head-inner .actions{
  margin-left:auto!important;display:flex!important;align-items:center!important;gap:var(--sah-core-gap)!important;
  min-width:0!important;overflow:visible!important;
}
html body .join-top-spacer{flex:1 1 auto!important}

/* === ONE LOGO + ONE SVG HEART === */
html body[data-page="home"] .market-head-inner>.brand,
html body[data-page="shop"] .market-head-inner>.brand,
html body[data-page="product"] .market-head-inner>.brand,
html body .join-brand{
  flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:3px!important;min-width:0!important;margin:0!important;padding:0!important;
  font-size:var(--sah-core-brand-size)!important;line-height:1!important;letter-spacing:.3px!important;
  font-weight:950!important;text-decoration:none!important;white-space:nowrap!important;transform:none!important;
}
.sah-brand-word{display:inline-block!important;font:inherit!important;line-height:1!important;letter-spacing:inherit!important}
.sah-brand-heart{
  display:block!important;width:var(--sah-core-heart-size)!important;height:var(--sah-core-heart-size)!important;
  min-width:var(--sah-core-heart-size)!important;max-width:var(--sah-core-heart-size)!important;
  min-height:var(--sah-core-heart-size)!important;max-height:var(--sah-core-heart-size)!important;
  flex:0 0 var(--sah-core-heart-size)!important;margin:0!important;padding:0!important;
  color:#ea2f78!important;fill:currentColor!important;stroke:none!important;transform:none!important;vertical-align:middle!important;
}

/* === COMMON TOP CONTROLS === */
html body[data-page="home"] .market-header .lang-toggle,
html body[data-page="shop"] .market-header .lang-toggle,
html body[data-page="product"] .market-header .lang-toggle,
html body[data-page="home"] .market-header #earnBtn,
html body[data-page="shop"] .market-header #earnBtn,
html body[data-page="product"] .market-header #earnBtn,
html body .join-top .join-top-btn{
  box-sizing:border-box!important;height:var(--sah-core-control-h)!important;min-height:var(--sah-core-control-h)!important;
  max-height:var(--sah-core-control-h)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 auto!important;margin:0!important;line-height:1!important;transform:none!important;translate:none!important;
  white-space:nowrap!important;
}
html body[data-page="home"] .market-header .lang-toggle,
html body[data-page="shop"] .market-header .lang-toggle,
html body[data-page="product"] .market-header .lang-toggle,
html body .join-top #joinLang{
  padding:0 11px!important;border-radius:999px!important;background:#fff!important;border:1px solid var(--sah-core-line)!important;
  box-shadow:none!important;font-size:12px!important;font-weight:850!important;color:inherit!important;
}
html body[data-page="home"] .market-header #earnBtn,
html body[data-page="shop"] .market-header #earnBtn,
html body[data-page="product"] .market-header #earnBtn{
  display:inline-flex!important;visibility:visible!important;opacity:1!important;padding:0 13px!important;border-radius:999px!important;
  background:#fff!important;border:1px solid rgba(216,43,108,.20)!important;color:#b82e67!important;
  box-shadow:none!important;font-size:12px!important;font-weight:900!important;
}

/* === ONE ACCOUNT BUTTON + GLYPH === */
html body #accountBtn,
html body #joinAccount{
  box-sizing:border-box!important;position:relative!important;width:var(--sah-core-account)!important;height:var(--sah-core-account)!important;
  min-width:var(--sah-core-account)!important;max-width:var(--sah-core-account)!important;
  min-height:var(--sah-core-account)!important;max-height:var(--sah-core-account)!important;
  flex:0 0 var(--sah-core-account)!important;padding:0!important;margin:0!important;border:0!important;
  border-radius:var(--sah-core-radius)!important;display:block!important;line-height:0!important;font-size:0!important;
  overflow:hidden!important;vertical-align:middle!important;transform:none!important;translate:none!important;
  color:#fff!important;background:linear-gradient(135deg,var(--brand,var(--sah-core-brand)),var(--brand2,var(--sah-core-brand2)))!important;
  box-shadow:0 8px 20px rgba(188,43,112,.18)!important;
}
html body #accountBtn::before,html body #accountBtn::after,
html body #joinAccount::before,html body #joinAccount::after{content:none!important;display:none!important}
html body #accountBtn>.sah-shared-account-icon,
html body #joinAccount>.sah-shared-account-icon{
  position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;
  width:var(--sah-core-account-icon)!important;height:var(--sah-core-account-icon)!important;
  min-width:var(--sah-core-account-icon)!important;min-height:var(--sah-core-account-icon)!important;
  max-width:var(--sah-core-account-icon)!important;max-height:var(--sah-core-account-icon)!important;
  display:block!important;margin:0!important;padding:0!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;pointer-events:none!important;
}
.sah-shared-sr{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;
  clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

/* === DESKTOP NAV === */
html body[data-page="home"] .market-nav,
html body[data-page="shop"] .market-nav,
html body[data-page="product"] .market-nav{align-self:stretch!important;display:flex!important;align-items:center!important;gap:4px!important}
html body[data-page="home"] .market-nav a,
html body[data-page="shop"] .market-nav a,
html body[data-page="product"] .market-nav a{
  display:inline-flex!important;align-items:center!important;height:var(--sah-core-control-h)!important;padding:0 11px!important;
  border-radius:11px!important;font-size:13px!important;font-weight:800!important;text-decoration:none!important;white-space:nowrap!important;
}

/* === ONE FLOATING CART === */
html body[data-page="home"] #cartBtn,
html body[data-page="shop"] #cartBtn,
html body[data-page="product"] #cartBtn{
  position:fixed!important;right:20px!important;bottom:22px!important;z-index:var(--sah-core-cart-z)!important;
  width:auto!important;height:48px!important;min-width:106px!important;min-height:48px!important;padding:0 16px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  border:1px solid rgba(255,255,255,.28)!important;border-radius:16px!important;
  background:linear-gradient(135deg,var(--brand,var(--sah-core-brand)),var(--brand2,var(--sah-core-brand2)))!important;color:#fff!important;
  box-shadow:0 14px 34px rgba(177,38,104,.30)!important;font-size:13px!important;font-weight:900!important;line-height:1!important;
  white-space:nowrap!important;isolation:isolate!important;transform:none!important;visibility:visible!important;opacity:1!important;
}
html body #cartBtn svg{width:17px!important;height:17px!important;flex:0 0 17px!important}
html body #cartBtn #cartCount{display:inline-grid!important;place-items:center!important;min-width:21px!important;height:21px!important;padding:0 5px!important;border-radius:999px!important;background:rgba(255,255,255,.18)!important;font-size:11px!important;font-weight:950!important}

/* === ONE MOBILE BOTTOM NAV === */
html body[data-page="home"] .bottomnav.sah-bottomnav,
html body[data-page="shop"] .bottomnav.sah-bottomnav,
html body[data-page="product"] .bottomnav.sah-bottomnav{display:none}
.sah-bottomnav .sah-bottom-icon{width:23px!important;height:23px!important;display:grid!important;place-items:center!important;margin:0 auto 2px!important;border-radius:10px!important;color:#766b72!important}
.sah-bottomnav .sah-bottom-icon svg{width:19px!important;height:19px!important;display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.sah-bottomnav .sah-bottom-label{display:block!important;font-size:10px!important;line-height:1.1!important;font-weight:800!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.sah-bottomnav .active .sah-bottom-icon,.sah-bottomnav [aria-current="page"] .sah-bottom-icon{background:linear-gradient(135deg,rgba(217,44,112,.11),rgba(128,53,239,.11))!important;color:var(--brand,var(--sah-core-brand))!important}
.sah-bottomnav .active .sah-bottom-label,.sah-bottomnav [aria-current="page"] .sah-bottom-label{color:var(--brand,var(--sah-core-brand))!important;font-weight:950!important}

/* Shared height variables for page-specific sticky layers. */
body[data-page="home"],body[data-page="shop"],body[data-page="product"]{--customer-header-height:var(--sah-core-header-h)!important}
html body[data-page="shop"]{--shop-header-h:var(--sah-core-header-h)!important}
.market-footer{position:relative;z-index:1!important}

@media(max-width:900px){
  :root{
    --sah-core-header-h:58px;--sah-core-header-pad:11px;--sah-core-control-h:34px;
    --sah-core-account:34px;--sah-core-account-icon:17px;--sah-core-brand-size:18px;--sah-core-heart-size:8px;
    --sah-core-gap:7px;--sah-core-radius:11px;
  }
  html body[data-page="home"] .market-head-inner,
  html body[data-page="shop"] .market-head-inner,
  html body[data-page="product"] .market-head-inner,
  html body .join-top-inner{width:100%!important;max-width:none!important;padding-left:var(--sah-core-header-pad)!important;padding-right:var(--sah-core-header-pad)!important}
  html body[data-page="home"] .market-nav,
  html body[data-page="shop"] .market-nav,
  html body[data-page="product"] .market-nav{display:none!important}
  html body[data-page="home"] .market-header .lang-toggle,
  html body[data-page="shop"] .market-header .lang-toggle,
  html body[data-page="product"] .market-header .lang-toggle,
  html body[data-page="home"] .market-header #earnBtn,
  html body[data-page="shop"] .market-header #earnBtn,
  html body[data-page="product"] .market-header #earnBtn,
  html body .join-top .join-top-btn{padding-left:9px!important;padding-right:9px!important;font-size:11px!important}
  html body .join-top .join-top-btn.back-label span{display:none!important}

  html body[data-page="home"] .bottomnav.sah-bottomnav,
  html body[data-page="shop"] .bottomnav.sah-bottomnav,
  html body[data-page="product"] .bottomnav.sah-bottomnav{
    position:fixed!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    left:8px!important;right:8px!important;bottom:calc(7px + env(safe-area-inset-bottom))!important;z-index:var(--sah-core-bottom-z)!important;
    min-height:var(--sah-core-bottomnav-h)!important;padding:6px 6px 5px!important;border:1px solid rgba(97,61,81,.10)!important;
    border-radius:20px!important;background:rgba(255,255,255,.965)!important;box-shadow:0 10px 34px rgba(42,23,34,.13)!important;
    backdrop-filter:blur(20px) saturate(1.1)!important;-webkit-backdrop-filter:blur(20px) saturate(1.1)!important;
  }
  .sah-bottomnav .sah-bottom-item{
    border:0!important;background:transparent!important;color:#746a71!important;text-decoration:none!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    padding:3px 2px!important;min-height:49px!important;border-radius:14px!important;font-size:10px!important;font-weight:800!important;
  }
  html body[data-page="home"] #cartBtn,
  html body[data-page="shop"] #cartBtn,
  html body[data-page="product"] #cartBtn{
    right:14px!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;
    height:44px!important;min-height:44px!important;min-width:94px!important;padding:0 13px!important;border-radius:15px!important;font-size:12px!important;
    box-shadow:0 12px 30px rgba(177,38,104,.28)!important;
  }
  body[data-page="home"],body[data-page="shop"],body[data-page="product"]{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
}
@media(max-width:380px){
  :root{--sah-core-header-pad:9px;--sah-core-gap:5px;--sah-core-brand-size:16px;--sah-core-heart-size:7px}
  html body[data-page="home"] .market-header .lang-toggle,
  html body[data-page="shop"] .market-header .lang-toggle,
  html body[data-page="product"] .market-header .lang-toggle,
  html body[data-page="home"] .market-header #earnBtn,
  html body[data-page="shop"] .market-header #earnBtn,
  html body[data-page="product"] .market-header #earnBtn,
  html body .join-top .join-top-btn{padding-left:8px!important;padding-right:8px!important}
  .sah-bottomnav .sah-bottom-label{font-size:9px!important}
}
