/* =====================================================
   RESPONSIVE
   Mobile-first fixes for header
===================================================== */

@media (min-width:1025px) and (max-width:1260px){

  #desktop-menu > ul > li > a{
    font-size: clamp(8px, 0.5vw, 13px);
    padding-left: clamp(4px, 0.6vw, 10px);
    padding-right: clamp(4px, 0.6vw, 10px);
    white-space: nowrap;
  }

  #desktop-menu > ul{
    display:flex;
    flex-wrap:nowrap;
    gap: clamp(2px, 0.4vw, 8px);
  }

}

/* -----------------------------------------------------
   > 1024px
----------------------------------------------------- */
@media (min-width:1025px){
  .m-fixedbar{
    display:none !important;
  }
}

/* -----------------------------------------------------
   ≤ 1024px
----------------------------------------------------- */
@media (max-width:1024px){
  .header{
    padding-left:14px;
    padding-right:14px;
  }

  .greet-prefix{
    display:inline;
    white-space:pre;
  }

  #desktop-menu{
    display:none;
  }

  #loginWrap{
    display:inline-flex !important;
    align-items:center;
  }

  #loginWrap .logo-register{
    display:none !important;
  }

  .logo img{
    max-height:42px;
  }

  .header-right{
    gap:12px;
  }

  #globalSearch{
    display:block !important;
  }

  #globalSearch li{
    display:block !important;
  }

  .m-fixedbar{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:64px;
    background:#fff;
    border-top:1px solid #e9e9e9;
    display:flex !important;
    justify-content:space-around;
    align-items:center;
    z-index:9999;
  }

  .m-fixedbar .m-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    text-align:center;
    text-decoration:none;
    color:#111;
    font-size:11px;
    line-height:1;
  }

  .m-fixedbar .m-item i{
    font-size:20px;
    line-height:1;
  }

  .m-fixedbar .m-item em{
    font-style:normal;
    font-size:11px;
    line-height:1;
  }

  .m-fixedbar .m-item > *{
    pointer-events:none;
  }

  main{
    padding-bottom:76px;
  }
}



  #userGreetingLeft{
  display:flex;
  align-items:center;
  gap:4px;
}

#userGreetingLeft .greet-prefix{
  white-space:nowrap;
}

#userGreetingNameLeft{
  white-space:nowrap;
}


/* =====================================================
   ESTORIA COFFEE - TWO STRIP HEADER RESPONSIVE FINAL
===================================================== */
@media (min-width:1025px) and (max-width:1260px){
  #desktop-menu > ul.ec-header-nav-list > li > a{
    font-size:clamp(14px, 1.43vw, 19px) !important;
    padding-left:4px !important;
    padding-right:4px !important;
  }
}

@media (max-width:1024px){
  #header-sticky .header{
    padding:0 !important;
  }

  #header-sticky .header .container-fluid{
    padding-left:14px;
    padding-right:14px;
  }

  .ec-header-top-inner{
    min-height:42px;
    gap:11px;
  }

  .ec-header-logo img,
  #header-sticky .header .ec-header-logo img{
    max-height:84px !important;
  }

  .ec-header-actions{
    gap:10px;
  }

  .ec-header-nav-strip{
    display:none !important;
  }

  #desktop-menu{
    display:none !important;
  }

  #loginWrap{
    display:inline-flex !important;
    align-items:center;
  }

  #loginWrap .logo-register,
  .ec-header-top-strip .cart-label,
  .ec-header-top-strip .account-text,
  .ec-header-top-strip .ec-action-text{
    display:none !important;
  }

  .ec-header-action,
  .account-btn.ec-header-action,
  .header-shopping-cart.ec-header-action{
    min-width:30px;
    min-height:36px;
    gap:0;
  }

  .ec-search-toggle{
    min-width:30px;
    min-height:36px;
  }

  #searchForm{
    right:-30px;
  }

  .m-fixedbar{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:64px;
    background:#fff;
    border-top:1px solid #e9e9e9;
    display:flex !important;
    justify-content:space-around;
    align-items:center;
    z-index:9999;
  }

  main{
    padding-bottom:76px;
  }
}

@media (max-width:480px){
  .ec-header-actions{
    gap:7px;
  }

  #header-sticky .header .container-fluid{
    padding-left:10px;
    padding-right:10px;
  }

  .ec-header-logo img,
  #header-sticky .header .ec-header-logo img{
    max-height:76px !important;
  }

  #searchForm{
    right:-48px;
  }
}

/* =====================================================
   ESTORIA COFFEE - HEADER THIN FONT RESPONSIVE OVERRIDE
===================================================== */
#header-sticky .ec-header-top-strip,
#header-sticky .ec-header-top-strip a,
#header-sticky .ec-header-top-strip button,
#header-sticky .ec-header-top-strip span,
#header-sticky .ec-header-top-strip strong,
#header-sticky .ec-header-top-strip input,
#header-sticky .ec-header-top-strip .logo-register,
#header-sticky .ec-header-top-strip .cart-label,
#header-sticky .ec-header-top-strip .account-text,
#header-sticky .ec-header-top-strip .ec-action-text,
#header-sticky .ec-header-nav-strip,
#header-sticky .ec-header-nav-strip a,
#header-sticky .ec-header-nav-strip span,
#header-sticky .ec-header-nav-strip strong,
.m-fixedbar,
.m-fixedbar .m-item,
.m-fixedbar .m-item em,
.m-fixedbar .m-item span,
#mobile-menu-drawer,
#mobile-menu-drawer a,
.ec-header-action,
.account-btn.ec-header-action,
.header-shopping-cart.ec-header-action,
#searchInput,
.header-shopping-cart sup.s-count{
  font-weight:300 !important;
}

/* =====================================================
   ESTORIA COFFEE - HEADER NAV CENTERED GAP RESPONSIVE
   v9: 1025-1260px aralığında taşmayı önleyen dar boşluk
===================================================== */
@media (min-width:1025px) and (max-width:1260px){
  #desktop-menu > ul.ec-header-nav-list{
    justify-content:center !important;
    gap:clamp(12px, 1.6vw, 22px) !important;
  }

  #header-sticky .ec-header-nav-strip #desktop-menu > ul.ec-header-nav-list > li > a{
    padding-left:0 !important;
    padding-right:0 !important;
  }
}

/* =====================================================
   ESTORIA COFFEE - MOBILE SEARCH KEEP ORIGINAL
   Masaüstü ortalama kuralı mobilde devre dışı bırakılır.
===================================================== */
@media (max-width:1024px){
  #header-sticky #globalSearch.header-search{
    position:relative !important;
    left:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    margin:0 !important;
  }

  #header-sticky #globalSearch #searchForm{
    left:auto !important;
    transform:none !important;
  }
}


/* =====================================================
   ESTORIA COFFEE - MOBILE SEARCH BAR RESET
   Mobilde masaüstü arama barı değil, eski ikon/toggle görünümü kalır.
===================================================== */
@media (max-width:1024px){
  #header-sticky #globalSearch.header-search{
    position:relative !important;
    left:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    display:block !important;
  }

  #header-sticky #globalSearch > li{
    position:relative !important;
    width:auto !important;
    height:auto !important;
    display:block !important;
  }

  #header-sticky #globalSearch #searchToggle{
    position:static !important;
    transform:none !important;
    width:auto !important;
    min-width:30px !important;
    height:auto !important;
    min-height:36px !important;
    font-size:18px !important;
    color:#000 !important;
  }

  #header-sticky #globalSearch #searchForm{
    position:absolute !important;
    top:100% !important;
    right:-30px !important;
    left:auto !important;
    transform:none !important;
    width:auto !important;
    height:auto !important;
    margin-top:10px !important;
    display:none;
  }

  #header-sticky #globalSearch #searchInput{
    width:min(300px, 86vw) !important;
    height:auto !important;
    min-height:0 !important;
    padding:10px 12px !important;
    border-radius:10px !important;
    font-size:14px !important;
    line-height:normal !important;
    box-shadow:0 12px 32px rgba(0,0,0,.14) !important;
  }
}

@media (max-width:480px){
  #header-sticky #globalSearch #searchForm{
    right:-48px !important;
  }
}

/* =====================================================
   ESTORIA COFFEE - HEADER AUTH/CART SHINE RESPONSIVE FINAL
   Mobilde giriş yapılmış / yapılmamış aksiyon butonları.
===================================================== */

@media (max-width:1024px){
  body.user-logged-in #loginWrap{
    display:none !important;
  }

  body:not(.user-logged-in) #loginWrap{
    display:inline-flex !important;
    align-items:center !important;
  }

  body.user-logged-in #mobileAuthLeft,
  body.user-logged-in #desktopAuthRight{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
  }

  body.user-logged-in #userGreetingWrap{
    display:none !important;
  }

  #mobileAuthLeft #userGreetingLeft,
  body.user-logged-in #desktopAuthRight #accountBtn.account-btn.ec-header-action,
  #loginWrap #openAuthModal.ec-header-action,
  #cartLink.header-shopping-cart.ec-header-action{
    position:relative !important;
    isolation:isolate !important;
    overflow:hidden !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:auto !important;
    min-height:34px !important;
    height:34px !important;
    padding:0 10px !important;
    gap:5px !important;
    border:1px solid #0F3747 !important;
    border-radius:6px !important;
    background:#0F3747 !important;
    color:#fff !important;
    font-size:12px !important;
    font-weight:700 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    transform:translateZ(0);
    box-shadow:0 0 0 0 rgba(15,55,71,0);
    animation:ecHeaderCtaPulse 2.2s ease-in-out infinite;
  }

  #mobileAuthLeft #userGreetingLeft,
  #mobileAuthLeft #userGreetingLeft .greet-prefix,
  #mobileAuthLeft #userGreetingLeft strong,
  body.user-logged-in #desktopAuthRight #accountBtn.account-btn.ec-header-action,
  body.user-logged-in #desktopAuthRight #accountBtn.account-btn.ec-header-action .account-text,
  #loginWrap #openAuthModal.ec-header-action,
  #loginWrap #openAuthModal.ec-header-action .icon-users,
  #loginWrap #openAuthModal.ec-header-action .logo-register,
  #loginWrap #openAuthModal.ec-header-action .ec-action-text,
  #cartLink.header-shopping-cart.ec-header-action,
  #cartLink.header-shopping-cart.ec-header-action .icon-shopping-bag,
  #cartLink.header-shopping-cart.ec-header-action .cart-label,
  #cartLink.header-shopping-cart.ec-header-action .ec-action-text{
    color:#fff !important;
  }

  body.user-logged-in #desktopAuthRight #accountBtn.account-btn.ec-header-action .icon-users{
    display:none !important;
  }

  body.user-logged-in #desktopAuthRight #accountBtn.account-btn.ec-header-action .account-text,
  #loginWrap #openAuthModal.ec-header-action .logo-register,
  #loginWrap #openAuthModal.ec-header-action .ec-action-text,
  #cartLink.header-shopping-cart.ec-header-action .cart-label,
  #cartHeaderText{
    display:inline !important;
    margin:0 !important;
    padding:0 !important;
    color:#fff !important;
  }

  #cartLink.header-shopping-cart.ec-header-action .ec-cart-icon-wrap{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    color:#fff !important;
    z-index:2 !important;
  }

  #cartLink.header-shopping-cart.ec-header-action sup.s-count{
    top:-10px !important;
    right:-10px !important;
    background:#fff !important;
    color:#0F3747 !important;
    border:1px solid #0F3747 !important;
    animation:none !important;
  }
}

@media (max-width:480px){
  body.user-logged-in #mobileAuthLeft,
  body.user-logged-in #desktopAuthRight{
    gap:5px !important;
  }

  #mobileAuthLeft #userGreetingLeft,
  body.user-logged-in #desktopAuthRight #accountBtn.account-btn.ec-header-action,
  #loginWrap #openAuthModal.ec-header-action,
  #cartLink.header-shopping-cart.ec-header-action{
    height:32px !important;
    min-height:32px !important;
    padding:0 8px !important;
    font-size:11px !important;
  }
}

/* =====================================================
   ESTORIA COFFEE - DESKTOP SEARCH SHRINK + 1024 ICON CTA
   header.css dosyasındaki final davranışı responsive tarafta da korunur.
===================================================== */
@media (min-width:1025px){
  #header-sticky #globalSearch.header-search{
    width:clamp(300px, calc(100vw - 720px), 720px) !important;
    min-width:0 !important;
    max-width:720px !important;
    transition:width .18s ease !important;
  }

  #header-sticky #globalSearch > li,
  #header-sticky #globalSearch #searchForm,
  #header-sticky #globalSearch #searchInput{
    min-width:0 !important;
    max-width:100% !important;
  }
}

@media (max-width:1024px){
  #header-sticky #globalSearch.header-search{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:auto !important;
    min-width:0 !important;
    height:auto !important;
    position:relative !important;
    margin:0 !important;
  }

  #header-sticky #globalSearch > li{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:auto !important;
    height:auto !important;
    position:relative !important;
  }

  #header-sticky .ec-header-top-strip #globalSearch #searchToggle.icon-search,
  #header-sticky #globalSearch #searchToggle{
    position:relative !important;
    isolation:isolate !important;
    overflow:hidden !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:0 !important;
    margin:0 !important;
    border:1px solid #0F3747 !important;
    border-radius:6px !important;
    background:#0F3747 !important;
    color:#fff !important;
    font-size:18px !important;
    line-height:1 !important;
    cursor:pointer !important;
    box-shadow:0 0 0 0 rgba(15,55,71,0);
    animation:ecHeaderCtaPulse 2.2s ease-in-out infinite;
  }

  #header-sticky #globalSearch #searchToggle::before{
    position:relative !important;
    z-index:2 !important;
  }

  #header-sticky #globalSearch #searchToggle::after{
    content:"" !important;
    position:absolute !important;
    top:0 !important;
    left:-140%;
    width:70% !important;
    height:100% !important;
    background:linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.12),
      rgba(255,255,255,.35),
      rgba(255,255,255,.12),
      transparent
    ) !important;
    transform:skewX(-22deg);
    animation:ecHeaderCtaShine 3s ease-in-out infinite;
    pointer-events:none !important;
    z-index:1 !important;
  }

  #header-sticky #globalSearch #searchToggle:hover,
  #header-sticky #globalSearch #searchToggle:focus{
    background:#0F3747 !important;
    color:#fff !important;
    border-color:#0F3747 !important;
    opacity:1 !important;
    outline:none !important;
  }

  #header-sticky #globalSearch #searchForm{
    position:absolute !important;
    top:100% !important;
    right:-30px !important;
    left:auto !important;
    transform:none !important;
    width:auto !important;
    height:auto !important;
    margin-top:10px !important;
    z-index:1300 !important;
  }
}

@media (max-width:480px){
  #header-sticky .ec-header-top-strip #globalSearch #searchToggle.icon-search,
  #header-sticky #globalSearch #searchToggle{
    width:32px !important;
    min-width:32px !important;
    max-width:32px !important;
    height:32px !important;
    min-height:32px !important;
    max-height:32px !important;
    font-size:17px !important;
  }

  #header-sticky #globalSearch #searchForm{
    right:-48px !important;
  }
}

/* =====================================================
   ESTORIA COFFEE - GREETING NAME ONLY AT 1550
   1550px ve altında selamlamada sadece kullanıcı adı görünür.
===================================================== */
@media (max-width:1550px){
  body.user-logged-in #mobileAuthLeft #userGreetingLeft .greet-prefix,
  body.user-logged-in #userGreetingWrap .greet-prefix,
  body.user-logged-in .user-greet .greet-prefix,
  body.user-logged-in .user-greet-left .greet-prefix{
    display:none !important;
  }

  body.user-logged-in #mobileAuthLeft #userGreetingLeft strong,
  body.user-logged-in #userGreetingWrap strong,
  body.user-logged-in .user-greet strong,
  body.user-logged-in .user-greet-left strong,
  body.user-logged-in #userGreetingName,
  body.user-logged-in #userGreetingNameLeft{
    margin-left:0 !important;
  }
}

