/* JAECOO.INFO v7.1.25 — responsive consistency and layout repair */
:root{
  --jaecoo-live-header-height:62px;
  --jaecoo-page-gap:clamp(16px,3vw,28px);
  --jaecoo-content-max:1240px;
}

/* Never allow the document itself to slide horizontally. */
html,body{max-width:100%;overflow-x:hidden!important}
body{position:relative}
*,*::before,*::after{box-sizing:border-box}
img,video,iframe,svg,canvas{max-width:100%;height:auto}
:where(#page,.site,.site-content,#primary,.site-main,main,article,section,.container,.login-page-shell,.login-card-pro,.jservice-page,.jlegal-shell){min-width:0;max-width:100%}

/* One source of truth for fixed-header clearance. */
body:not(.home) #primary.site-main{
  padding-top:calc(var(--jaecoo-live-header-height) + var(--jaecoo-page-gap))!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{
  padding-top:calc(var(--jaecoo-live-header-height) + var(--jaecoo-page-gap))!important;
}
/* Single posts already own their article spacing; remove old stacked offsets. */
body.single-post #primary.site-main{
  padding-top:calc(var(--jaecoo-live-header-height) + 12px)!important;
}
body.single-post :where(article,.single-post-content,.post-detail,.entry-wrapper,.post-thumbnail,.featured-image){margin-top:0!important}
body.single-post #primary.site-main>:first-child{margin-top:0!important;padding-top:0!important}

/* Logo controls must be real, unconstrained values from the admin panel. */
#site-header .header-inner{justify-content:flex-start!important}
#site-header .brand-wrap{margin:0 auto 0 0!important;justify-content:flex-start!important;transform:none!important;position:static!important}
#site-header :where(.custom-logo-wrap,.custom-logo-link){
  width:var(--jaecoo-header-logo-width,230px)!important;
  height:var(--jaecoo-header-logo-height,48px)!important;
  max-width:none!important;max-height:none!important;
  margin:0!important;overflow:visible!important;justify-content:flex-start!important
}
#site-header :where(.custom-logo-wrap img,.custom-logo-link img,img.custom-logo){
  width:var(--jaecoo-header-logo-width,230px)!important;
  height:var(--jaecoo-header-logo-height,48px)!important;
  max-width:none!important;max-height:none!important;
  object-fit:contain!important;object-position:left center!important;margin:0!important
}

/* Google auth: no duplicate heading, centered and wider. */
.google-login-label{display:none!important}
.jaecoo-auth-panel .google-login-slot{
  display:flex!important;justify-content:center!important;align-items:center!important;
  width:min(100%,560px)!important;margin:12px auto 0!important;padding:0!important;
  border:0!important;background:transparent!important
}
.jaecoo-auth-panel .google-login-button{width:100%!important;display:flex!important;justify-content:center!important}
.jaecoo-auth-panel .google-login-button>*{width:100%!important;max-width:560px!important;margin-inline:auto!important}

/* Shared standard for static/legal/content page hero blocks. */
body.page :where(.page-header,.entry-header,.jlegal-hero,.legal-hero,.documents-hero,.docs-hero,.jservice-hero){
  width:min(calc(100% - 2 * var(--jaecoo-page-gap)),var(--jaecoo-content-max));
  margin-inline:auto!important;
  border-radius:clamp(18px,2.5vw,30px)!important;
  overflow:hidden!important;
}
body.page :where(.page-header,.entry-header,.jlegal-hero,.legal-hero,.documents-hero,.docs-hero,.jservice-hero) :where(h1,h2){
  font-size:clamp(30px,6vw,64px)!important;line-height:1.02!important;overflow-wrap:anywhere
}
body.page :where(.entry-content,.page-content,.jlegal-content,.documents-content,.jservice-layout){
  width:min(calc(100% - 2 * var(--jaecoo-page-gap)),var(--jaecoo-content-max));
  margin-inline:auto!important;
}
body.page :where(.entry-content,.page-content,.jlegal-content) :where(h1,h2,h3,p,li){overflow-wrap:anywhere}

/* Forms and cards must never exceed the viewport. */
:where(input,select,textarea,button){max-width:100%}
:where(.login-card-pro,.login-form-panel,.login-visual,.jaecoo-auth-switcher,.jaecoo-auth-panels,.jaecoo-auth-panel,.jaecoo-auth-form){min-width:0!important;max-width:100%!important}

/* Compact, professional mobile footer. */
@media(max-width:760px){
  :root{--jaecoo-page-gap:14px}
  #site-header .header-inner{padding-left:14px!important;padding-right:12px!important}
  #site-header :where(.custom-logo-wrap,.custom-logo-link),
  #site-header :where(.custom-logo-wrap img,.custom-logo-link img,img.custom-logo){
    width:min(var(--jaecoo-header-logo-width,230px),58vw)!important;
    height:min(var(--jaecoo-header-logo-height,48px),140px)!important;
  }

  body.single-post #primary.site-main{padding-top:calc(var(--jaecoo-live-header-height) + 8px)!important}
  body.single-post :where(.entry-header,.post-header){margin-top:0!important;padding-top:0!important}

  .site-footer.site-footer--v7111{margin-top:18px!important;padding-top:0!important}
  .site-footer--v7111 .footer-v7111-main{
    display:grid!important;grid-template-columns:1fr!important;gap:20px!important;
    padding:24px 16px 18px!important
  }
  .site-footer--v7111 .footer-v7111-brand{display:none!important}
  .site-footer--v7111 .footer-v7111-navigation{
    display:grid!important;grid-template-columns:1fr 1fr!important;gap:20px 24px!important
  }
  .site-footer--v7111 .footer-v7111-column{min-width:0!important}
  .site-footer--v7111 .footer-v7111-column:nth-child(3){grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr!important;column-gap:24px!important}
  .site-footer--v7111 .footer-v7111-column:nth-child(3) h2{grid-column:1/-1}
  .site-footer--v7111 .footer-v7111-column h2{font-size:16px!important;line-height:1.2!important;margin:0 0 10px!important}
  .site-footer--v7111 .footer-v7111-column a{font-size:13px!important;line-height:1.35!important;margin:0 0 9px!important}
  .site-footer--v7111 .footer-v7111-account{
    min-height:0!important;padding:16px!important;border-radius:18px!important;
    display:grid!important;grid-template-columns:40px 1fr auto!important;gap:6px 12px!important;align-items:center!important
  }
  .site-footer--v7111 .footer-v7111-account-icon{grid-row:1/3;width:40px!important;height:40px!important;border-radius:12px!important}
  .site-footer--v7111 .footer-v7111-account h2{font-size:17px!important;margin:0!important;align-self:end!important}
  .site-footer--v7111 .footer-v7111-account p{font-size:12px!important;line-height:1.45!important;margin:0!important;align-self:start!important}
  .site-footer--v7111 .footer-v7111-account a{
    grid-column:1/-1!important;min-height:42px!important;padding:0 16px!important;margin-top:8px!important;
    width:100%!important;border-radius:12px!important;font-size:13px!important
  }
  .site-footer--v7111 .footer-v7111-bottom{
    min-height:0!important;padding:14px 16px calc(88px + env(safe-area-inset-bottom))!important;
    gap:4px!important;font-size:12px!important
  }
  .jaecoo-back-top{right:14px!important;bottom:calc(88px + env(safe-area-inset-bottom))!important;width:44px!important;height:44px!important}
}
