/*
 * v7.1.22 — definitive inner-page header offset and logo sizing safety.
 * Built from v7.1.20. v7.1.21 changes are intentionally not included.
 */

:root{
  --jaecoo-fixed-header-height:62px;
  --jaecoo-inner-page-gap:24px;
}

/* The fixed header must never overlap the first page title/content block. */
body:not(.home) #primary.site-main{
  box-sizing:border-box!important;
  padding-top:calc(var(--jaecoo-fixed-header-height) + var(--jaecoo-inner-page-gap))!important;
}

/* Templates with a full-bleed shell receive the offset on the shell, not twice. */
body:not(.home) #primary.site-main > :first-child{
  margin-top:0!important;
}

body.page-template-page-login #primary.site-main,
body.page-template-templatespage-login-php #primary.site-main{
  padding-top:0!important;
}
body.page-template-page-login .login-page-shell,
body.page-template-templatespage-login-php .login-page-shell{
  box-sizing:border-box!important;
  padding-top:calc(var(--jaecoo-fixed-header-height) + var(--jaecoo-inner-page-gap))!important;
}

/* WordPress admin bar support. */
body.admin-bar:not(.home) #primary.site-main{
  padding-top:calc(var(--jaecoo-fixed-header-height) + var(--jaecoo-inner-page-gap))!important;
}

/* Keep anchors and headings visible when navigated directly. */
body:not(.home) :where(h1,h2,h3,[id]){
  scroll-margin-top:calc(var(--jaecoo-fixed-header-height) + 24px)!important;
}

/* Logo width is controlled from JAECOO Yönetim > Tema Ayarları > Site Kimliği. */
#site-header .custom-logo-wrap,
#site-header .custom-logo-link{
  flex:0 1 auto!important;
  min-width:0!important;
  overflow:visible!important;
}
#site-header .custom-logo-wrap img,
#site-header .custom-logo-link img,
#site-header img.custom-logo{
  width:var(--jaecoo-header-logo-width,230px)!important;
  max-width:min(62vw,320px)!important;
  max-height:48px!important;
  object-fit:contain!important;
}

@media (max-width:760px){
  :root{--jaecoo-inner-page-gap:18px}
  body:not(.home) #primary.site-main{
    padding-top:calc(var(--jaecoo-fixed-header-height) + var(--jaecoo-inner-page-gap))!important;
  }
  #site-header .custom-logo-wrap img,
  #site-header .custom-logo-link img,
  #site-header img.custom-logo{
    width:min(var(--jaecoo-header-logo-width,230px),230px)!important;
    max-width:62vw!important;
    max-height:46px!important;
  }
}

@media (max-width:390px){
  #site-header .custom-logo-wrap img,
  #site-header .custom-logo-link img,
  #site-header img.custom-logo{
    max-width:58vw!important;
  }
}
