/* MXonnowell v0.2.06 — Tek Header/Admin-Bar Offset Motoru + Mobil Drawer Güvenli Alanı */
:root{
  --mx106-header-h:72px;
  --mx106-adminbar-h:0px;
  --mx106-nav-top:var(--mx106-header-h);
  --mx106-header-ease:cubic-bezier(.22,.61,.36,1);
}

/* WordPress admin-bar alanı tek kez body padding ile ayrılır. wp_head içindeki geç bump CSS'i functions.php tarafından sıfırlanır. */
html body.admin-bar,html body.home.admin-bar{
  --mx106-adminbar-h:32px;
  padding-top:var(--mx106-adminbar-h)!important;
}
body:not(.admin-bar){--mx106-adminbar-h:0px}
body.admin-bar #wpadminbar{
  position:fixed!important;
  top:0!important;
  right:0!important;
  left:0!important;
  margin:0!important;
  z-index:999999!important;
}

/* v0.1.x boyunca birikmiş fixed/sticky/top kurallarının tek sahibi artık bu katmandır. */
html body .mx-header-v0148,
html body .mx-header-v0148.mx-header--overlay,
html body.home .mx-header-v0148.mx-header--overlay,
html body:not(.home) .mx-header-v0148,
html body.admin-bar .mx-header-v0148,
html body.admin-bar.home .mx-header-v0148.mx-header--overlay{
  position:sticky!important;
  top:var(--mx106-adminbar-h)!important;
  right:auto!important;
  left:auto!important;
  margin-top:0!important;
  margin-bottom:0!important;
  transform:translate3d(0,0,0)!important;
  transition:transform .22s var(--mx106-header-ease),box-shadow .2s ease,background-color .2s ease!important;
  will-change:transform;
  z-index:12100!important;
}

/* Sticky header akışta yer kaplar; eski hero/header telafi boşlukları tekrar eklenmez. */
/* Home header artık akışta olduğu için transparan overlay yerine okunaklı kurumsal mavi zemin kullanır. */
html body.home .mx-header-v0148.mx-header--overlay{
  background-image:linear-gradient(rgba(2,48,88,.86),rgba(2,48,88,.86)),var(--mx56-blue-bg)!important;
  background-size:cover!important;
  background-position:center!important;
  box-shadow:0 8px 28px rgba(0,30,58,.12)!important;
  backdrop-filter:none!important;
}

html body.home .mx-global-entry-media{
  padding-top:0!important;
  margin-top:0!important;
}
html body.home .mx-header-v0148 + *{margin-top:0!important}
html body.home .mx-global-entry-media__frame{
  max-height:calc(100svh - var(--mx106-header-h) - var(--mx106-adminbar-h))!important;
}

/* Aşağı kaydırmada gizle / yukarıda görünür tut. */
html.mx106-header-hidden body .mx-header-v0148{
  transform:translate3d(0,calc(-1 * var(--mx106-header-h)),0)!important;
  pointer-events:none!important;
}
html.mx106-header-visible body .mx-header-v0148,
body.mx-menu-open .mx-header-v0148,
body .mx-header-v0148:focus-within{
  transform:translate3d(0,0,0)!important;
  pointer-events:auto!important;
}

html.mx106-header-hidden{scroll-padding-top:calc(var(--mx106-adminbar-h) + 12px)!important}
html:not(.mx106-header-hidden){scroll-padding-top:calc(var(--mx106-adminbar-h) + var(--mx106-header-h) + 14px)!important}
body [id]{scroll-margin-top:calc(var(--mx106-adminbar-h) + var(--mx106-header-h) + 14px)!important}

/* Mobil/tablet drawer artık ayrı sabit 60/68px değil, gerçek header + admin bar yüksekliğini kullanır. */
@media(max-width:1480px){
  html body .mx-mobile-menu-overlay-v0161,
  html body .mx-mobile-drawer-v0161{
    top:calc(var(--mx106-adminbar-h) + var(--mx106-header-h))!important;
  }
  html body .mx-mobile-drawer-v0161{
    max-height:calc(100dvh - var(--mx106-adminbar-h) - var(--mx106-header-h))!important;
  }
}

/* WordPress medya/link/thickbox pencereleri header'ın her zaman üstündedir. */
body .media-modal-backdrop{z-index:499900!important}
body .media-modal{z-index:500000!important}
body .media-modal-content{z-index:500001!important}
body #TB_overlay,body #wp-link-backdrop{z-index:499800!important}
body #TB_window,body #wp-link-wrap{z-index:499850!important}
html.mx106-overlay-open body .mx-header-v0148{
  transform:translate3d(0,calc(-1 * var(--mx106-header-h)),0)!important;
  pointer-events:none!important;
  visibility:hidden!important;
}
html.mx106-overlay-open body .mx-mobile-drawer-v0161,
html.mx106-overlay-open body .mx-mobile-menu-overlay-v0161{visibility:hidden!important}

/* Sipariş/sepet sticky özetleri de aynı tek offset kaynağını kullanır. */
.mx93-summary,.mx90-cart-summary{
  top:calc(var(--mx106-adminbar-h) + var(--mx106-header-h) + 16px)!important;
  transition:top .2s ease!important;
}
html.mx106-header-hidden .mx93-summary,
html.mx106-header-hidden .mx90-cart-summary{top:calc(var(--mx106-adminbar-h) + 14px)!important}

@media(max-width:1279px){
  :root{--mx106-header-h:68px}
}
@media(max-width:782px){
  html body.admin-bar,html body.home.admin-bar{--mx106-adminbar-h:46px;padding-top:var(--mx106-adminbar-h)!important}
}
@media(max-width:767px){
  :root{--mx106-header-h:60px}
  html body .mx-header-v0148{transition-duration:.18s!important}
  .mx93-summary,.mx90-cart-summary{position:static!important;top:auto!important}
}
@media(prefers-reduced-motion:reduce){
  html body .mx-header-v0148{transition:none!important}
}
