/* MAGIA ARCÂNICA V30 — Compact Density, dimensões somente.
   Carregado após a V29. Preserve cores, marca, HTML, interações e animações.
   A correção é de escala e largura útil, NÃO é um novo header. */

/* 1) A faixa do header é full-width; o conteúdo interno não deve ser
      artificialmente comprimido a 1240px em monitores de 1600–1920px. */
@media (min-width:761px) {
  html body.store-v2 .site-header:not(.magic-checkout-header) > .container.header-row,
  html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) > .container.header-row {
    width:calc(100% - 48px)!important;
    max-width:1500px!important;
    height:64px!important;min-height:64px!important;max-height:64px!important;
    grid-template-columns:210px minmax(0,1fr) 228px!important;
    column-gap:24px!important;
    align-items:center!important;
  }
  html body.store-v2 .site-header .logo.magia-logo,
  html body.store-v2.magic-landing-v9 .site-header .logo.magia-logo {
    width:210px!important;max-width:210px!important;
    height:64px!important;min-height:64px!important;
  }
  html body.store-v2 .site-header .logo.magia-logo img.brand-wordmark,
  html body.store-v2.magic-landing-v9 .site-header .logo.magia-logo img.brand-wordmark,
  html body.store-v2.magic-landing-v9 .site-header .brand-wordmark {
    width:210px!important;max-width:210px!important;
    height:62px!important;min-height:0!important;max-height:62px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  html body.store-v2 .site-header .header-actions,
  html body.store-v2.magic-landing-v9 .site-header .header-actions {
    gap:12px!important;
    flex-wrap:nowrap!important;
    justify-self:end!important;
    min-width:0!important;
  }
}

/* 2) A pesquisa precisa usar a coluna CENTRAL de verdade. Não deixar
      max-width antigo de 320/400px encolher o input ou seu dropdown. */
html body.store-v2 .site-header .live-search.magic-search,
html body.store-v2.magic-landing-v9 .site-header .live-search.magic-search {
  width:100%!important;
  max-width:680px!important;
  min-width:0!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  justify-self:center!important;
  flex:none!important;
  box-sizing:border-box!important;
  position:relative!important;
  z-index:250!important;
  border-radius:4px!important;
  overflow:visible!important;
}
html body.store-v2 .site-header .magic-search input,
html body.store-v2.magic-landing-v9 .site-header .magic-search input {
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  padding:0 60px 0 42px!important;
  font-size:13px!important;
  line-height:1.4!important;
  border-radius:4px!important;
}
html body.store-v2 .site-header .magic-search .search-icon {
  position:absolute!important;
  left:14px!important;top:50%!important;
  transform:translateY(-50%)!important;
  pointer-events:none!important;
}
html body.store-v2 .site-header .magic-search .search-icon svg {
  width:18px!important;height:18px!important;
}
html body.store-v2 .site-header .magic-search .magic-search-submit,
html body.store-v2.magic-landing-v9 .site-header .magic-search .magic-search-submit {
  position:absolute!important;right:0!important;top:0!important;bottom:0!important;
  width:52px!important;min-width:52px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  margin:0!important;padding:0!important;
  border-radius:0 4px 4px 0!important;
}

/* O menu de sugestões fica COLADO ao campo, com a MESMA largura.
   Não usar largura fixa, scrollbar horizontal nem scroll para quatro itens. */
html body.store-v2 .site-header:not(.magic-checkout-header),
html body.store-v2 .site-header:not(.magic-checkout-header) > .container.header-row {
  overflow:visible!important;
}
html body.store-v2 .site-header:not(.magic-checkout-header) > .container.header-row {
  z-index:220!important;
}
html body.store-v2 .site-header .live-search.magic-search #live-search-results,
html body.store-v2 .site-header .live-results {
  position:absolute!important;
  top:100%!important;left:0!important;right:0!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0!important;
  box-sizing:border-box!important;
  z-index:260!important;
  max-height:min(430px,calc(100dvh - 110px))!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  border-radius:0 0 4px 4px!important;
}
html body.store-v2 .site-header .live-results a {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  font-size:13px!important;
  line-height:1.35!important;
  gap:10px!important;
}
html body.store-v2 .site-header .live-results a span,
html body.store-v2 .site-header .live-results a strong {
  min-width:0!important;
}
html body.store-v2 .site-header .live-results a img {
  flex-shrink:0!important;
}
html body.store-v2 .site-header .magic-category-nav,
html body.store-v2.magic-landing-v9 .site-header .magic-category-nav {
  z-index:1!important;
}

/* 3) Submenu Enterprise: sem trocar ícones e sem encolher tipografia para 11px. */
html body.store-v2 .site-header .magic-category-nav .container.magic-category-links,
html body.store-v2.magic-landing-v9 .site-header .magic-category-nav .container.magic-category-links {
  width:calc(100% - 48px)!important;
  max-width:1500px!important;
  height:40px!important;min-height:40px!important;max-height:40px!important;
  justify-content:space-between!important;
  column-gap:clamp(10px,1.7vw,26px)!important;
  box-sizing:border-box!important;
}
html body.store-v2 .site-header .magic-category-links > a,
html body.store-v2.magic-landing-v9 .site-header .magic-category-nav .magic-category-links > a {
  font-size:13px!important;
  line-height:1.35!important;
  gap:8px!important;
  flex-shrink:0!important;
}
html body.store-v2 .site-header .magic-category-links > a svg,
html body.store-v2.magic-landing-v9 .site-header .magic-category-links > a svg {
  width:18px!important;height:18px!important;min-width:18px!important;
}

/* 4) Conteúdo comercial: aproveita tela horizontal sem ampliar componentes.
   Não interfere em páginas administrativas, checkout ou modais. */
@media(min-width:1025px){
  html body.store-v2 .container.magic-product-page {
    width:calc(100% - 48px)!important;
    max-width:1480px!important;
    box-sizing:border-box!important;
  }
  html body.store-v2.magic-landing-v9 .magic-home > .container {
    width:calc(100% - 48px)!important;
    max-width:1400px!important;
    box-sizing:border-box!important;
  }
}

/* 5) Adaptar somente quando faltar largura. Navegação rola DENTRO da faixa. */
@media(min-width:761px) and (max-width:1160px){
  html body.store-v2 .site-header:not(.magic-checkout-header) > .container.header-row,
  html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) > .container.header-row {
    grid-template-columns:178px minmax(0,1fr) 203px!important;
    column-gap:14px!important;
  }
  html body.store-v2 .site-header .logo.magia-logo,
  html body.store-v2.magic-landing-v9 .site-header .logo.magia-logo {
    width:178px!important;max-width:178px!important;
  }
  html body.store-v2 .site-header .logo.magia-logo img.brand-wordmark,
  html body.store-v2.magic-landing-v9 .site-header .logo.magia-logo img.brand-wordmark,
  html body.store-v2.magic-landing-v9 .site-header .brand-wordmark {
    width:178px!important;max-width:178px!important;
  }
  html body.store-v2 .site-header .magic-category-nav .container.magic-category-links,
  html body.store-v2.magic-landing-v9 .site-header .magic-category-nav .container.magic-category-links {
    justify-content:flex-start!important;
    gap:clamp(12px,2vw,24px)!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
  }
  html body.store-v2 .site-header .magic-category-links > a,
  html body.store-v2.magic-landing-v9 .site-header .magic-category-nav .magic-category-links > a {
    font-size:13px!important;
  }
}
@media(max-width:760px){
  html body.store-v2 .site-header .live-search.magic-search,
  html body.store-v2.magic-landing-v9 .site-header .live-search.magic-search {
    width:100%!important;max-width:none!important;
    justify-self:stretch!important;
    height:36px!important;min-height:36px!important;max-height:36px!important;
  }
  html body.store-v2 .site-header:not(.magic-checkout-header) > .container.header-row,
  html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) > .container.header-row {
    grid-template-rows:54px 36px!important;
    gap:7px 8px!important;
    min-height:104px!important;
    height:auto!important;
  }
  html body.store-v2 .site-header .magic-category-nav .container.magic-category-links,
  html body.store-v2.magic-landing-v9 .site-header .magic-category-nav .container.magic-category-links {
    width:calc(100% - 28px)!important;max-width:none!important;
    height:40px!important;min-height:40px!important;max-height:40px!important;
    justify-content:flex-start!important;
    gap:20px!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    scrollbar-width:none!important;
  }
  html body.store-v2 .site-header .magic-category-links > a,
  html body.store-v2.magic-landing-v9 .site-header .magic-category-nav .magic-category-links > a {
    font-size:13px!important;
  }
  html body.store-v2 .site-header .live-results {
    max-height:min(370px,calc(100dvh - 145px))!important;
  }
}

/* 6) Prioridade explícita sobre V12/V13: essas versões usavam :not()
      no seletor e voltavam a forçar a busca para 56px e width:auto.
      Sem essa paridade a busca fica com ~364px mesmo em desktop amplo. */
html body.store-v2 .site-header:not(.magic-checkout-header) form.live-search.magic-search,
html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) form.live-search.magic-search {
  width:100%!important;
  max-width:680px!important;
  min-width:0!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  padding:0!important;
  flex:none!important;
  box-sizing:border-box!important;
  border-radius:4px!important;
}
html body.store-v2 .site-header:not(.magic-checkout-header) form.magic-search input,
html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) form.magic-search input {
  width:100%!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  font-size:13px!important;
  padding:0 60px 0 42px!important;
  border-radius:4px!important;
}
html body.store-v2 .site-header:not(.magic-checkout-header) form.magic-search .magic-search-submit,
html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) form.magic-search .magic-search-submit {
  height:36px!important;min-height:36px!important;max-height:36px!important;
  width:52px!important;min-width:52px!important;
  right:0!important;top:0!important;bottom:0!important;
  border-radius:0 4px 4px 0!important;
}
html body.store-v2 .site-header:not(.magic-checkout-header) form.magic-search #live-search-results,
html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) form.magic-search #live-search-results {
  top:100%!important;left:0!important;right:0!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin-top:0!important;
  border-radius:0 0 4px 4px!important;
  max-height:min(480px,calc(100dvh - 110px))!important;
}
@media(max-width:760px){
  html body.store-v2 .site-header:not(.magic-checkout-header) form.live-search.magic-search,
  html body.store-v2.magic-landing-v9 .site-header:not(.magic-checkout-header) form.live-search.magic-search {
    max-width:none!important;
  }
}
