/* =========================================================
   LOVESTOCK HEADER CONSOLIDADO V6
   Uma única regra global para Home, Carrinho, Login,
   Minha Conta e rotas /c/...

   Corrige a causa real:
   - o elemento sticky é .ls-sticky-shell;
   - .topbar não pode ser sticky dentro de outro sticky;
   - páginas curtas também encolhem com qualquer rolagem real.
========================================================= */

@media (max-width:760px){

  :root{
    --ls-header-open-h:140px;
    --ls-header-small-h:66px;
  }

  .ls-sticky-shell{
    position:sticky !important;
    top:0 !important;
    z-index:5000 !important;
    width:100% !important;
    height:var(--ls-header-open-h) !important;
    min-height:var(--ls-header-open-h) !important;
    overflow:hidden !important;
    background:#35164f !important;
    transition:
      height .27s cubic-bezier(.22,.72,.25,1),
      min-height .27s cubic-bezier(.22,.72,.25,1),
      box-shadow .27s ease !important;
    box-shadow:0 7px 20px rgba(42,16,55,.10) !important;
  }

  .topbar{
    position:relative !important;
    top:auto !important;
    z-index:2 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    background:#35164f !important;
    border:0 !important;
    box-shadow:none !important;
    transition:none !important;
    animation:none !important;
  }

  .topbar .row{
    position:relative !important;
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:100% !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  .topbar .brand{
    position:relative !important;
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:100% !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  .topbar .brand img.logo{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    object-fit:contain !important;
    object-position:center !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:transparent !important;
    transform:translate(-50%,-50%) !important;
    transform-origin:center !important;
    transition:
      width .27s cubic-bezier(.22,.72,.25,1),
      filter .27s ease !important;
    animation:none !important;
    will-change:width;
  }

  html.ls-header-small .ls-sticky-shell{
    height:var(--ls-header-small-h) !important;
    min-height:var(--ls-header-small-h) !important;
    box-shadow:0 10px 24px rgba(39,14,52,.20) !important;
  }

  html.ls-header-small .topbar .brand img.logo{
    width:47% !important;
    filter:drop-shadow(0 4px 10px rgba(20,5,28,.16));
  }

  .topbar .brand::before,
  .topbar .brand::after{
    display:none !important;
    content:none !important;
  }

  /* Desktop megamenu não deve reservar altura no mobile. */
  .ls-sticky-shell .ls-meganav{
    display:none !important;
  }
}

@media (max-width:380px){
  :root{
    --ls-header-open-h:126px;
    --ls-header-small-h:60px;
  }

  html.ls-header-small .topbar .brand img.logo{
    width:49% !important;
  }
}

@media (prefers-reduced-motion:reduce){
  .ls-sticky-shell,
  .topbar .brand img.logo{
    transition:none !important;
  }
}
