/* OPUS Category Navigation v1.6.0 | abas compactas e ordem personalizável */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500&display=swap');
#opus-category-navigation, #opus-category-navigation * {box-sizing:border-box}
#opus-category-navigation {
  --opus-cn-red:#d30820;
  --opus-cn-grey:#f7f7f7;
  width:100%;max-width:100%;min-width:0;
  margin:14px 0 24px;
  position:relative;z-index:20;
  background:transparent;
  clear:both;
  font-family:Poppins,Arial,sans-serif;
}
#opus-category-navigation .opus-cn-nav {width:100%;position:relative;isolation:isolate}
/* Permite todas as categorias em linhas compactas, centralizadas no desktop. */
#opus-category-navigation .opus-cn-scroll {
  width:100%;max-width:100%;overflow:visible;
  border-bottom:0;
}
#opus-category-navigation .opus-cn-tabs {
  display:flex;flex-wrap:wrap;align-items:stretch;justify-content:flex-start;
  width:max-content;max-width:100%;min-width:0;gap:0;
  margin-inline:0;
  border-bottom:0;
}
#opus-category-navigation .opus-cn-tab {
  display:flex;align-items:center;justify-content:center;
  position:relative;min-height:44px;max-width:100%;
  padding:0 7px;gap:3px;flex:0 0 auto;width:auto!important;min-width:0!important;background:transparent;
  white-space:nowrap;
  transition:background .2s ease,color .2s ease;
}
#opus-category-navigation .opus-cn-tab:first-child {padding-left:7px}
#opus-category-navigation .opus-cn-tab:hover,
#opus-category-navigation .opus-cn-tab.is-open {background:#f6f4f4}
/* Sem linha cinza no grupo e sem sublinhado vermelho nas abas. */
#opus-category-navigation .opus-cn-tab.is-active::after,
#opus-category-navigation .opus-cn-tab.is-open::after {content:none!important;display:none!important}
#opus-category-navigation .opus-cn-title {
  font-size:12.5px;font-weight:400!important;line-height:1.35;
  color:#161616!important;text-decoration:none!important;
  box-shadow:none!important;border:0!important;
  white-space:nowrap;transition:color .18s ease;
}
#opus-category-navigation .opus-cn-tab.is-active .opus-cn-title,
#opus-category-navigation .opus-cn-tab.is-open .opus-cn-title,
#opus-category-navigation .opus-cn-tab:hover .opus-cn-title {color:var(--opus-cn-red)!important}
#opus-category-navigation .opus-cn-toggle {
  position:relative;display:inline-flex;justify-content:center;align-items:center;
  background:none!important;border:0!important;box-shadow:none!important;
  color:var(--opus-cn-red)!important;width:15px;height:28px;
  margin:0;padding:0;cursor:pointer;outline-offset:3px;
}
#opus-category-navigation .opus-cn-toggle svg {width:11px;height:11px;transition:transform .22s ease}
#opus-category-navigation .opus-cn-tab.is-open .opus-cn-toggle svg {transform:rotate(180deg)}
/* Submenus saem do fluxo do documento para uma camada independente.
   Isso evita cortes por overflow e conflito de z-index do tema Arredo/Qode. */
.opus-cn-float-layer {
  position:fixed !important;
  top:0;left:0;
  display:none;
  pointer-events:auto;
  z-index:2147483000 !important;
  background:transparent;
  box-sizing:border-box;
}
.opus-cn-float-layer.is-visible {display:block}
.opus-cn-float-layer .opus-cn-subpanel {
  position:absolute !important;
  display:none;
  top:0 !important;
  left:0 !important;
  width:238px;
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - var(--opus-cn-layer-top, 0px) - 12px);
  overflow-y:auto;
  margin:0 !important;
  padding:5px 0 10px;
  background:#f7f7f7 !important;
  opacity:1 !important;
  visibility:visible !important;
  isolation:isolate;
  box-shadow:0 12px 28px rgba(0,0,0,.14) !important;
  border:1px solid #ededed;
  z-index:2 !important;
}
.opus-cn-float-layer .opus-cn-subpanel.is-open {display:block !important}
.opus-cn-float-layer .opus-cn-subinner {display:flex;flex-direction:column}
.opus-cn-float-layer .opus-cn-subitem {
  min-height:33px;padding:6px 13px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  color:#242424!important;font-size:12.5px;font-weight:400!important;
  line-height:1.5;text-decoration:none!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
  transition:color .2s ease,background .2s ease;
}
.opus-cn-float-layer .opus-cn-subitem svg {
  width:14px;height:14px;flex-shrink:0;color:#777;
  transition:transform .2s ease,color .2s ease;
}
.opus-cn-float-layer .opus-cn-subitem:hover,
.opus-cn-float-layer .opus-cn-subitem:focus-visible {
  color:var(--opus-cn-red)!important;background:#eee!important;
}
.opus-cn-float-layer .opus-cn-subitem:hover svg {
  transform:translate(2px,-2px);color:var(--opus-cn-red);
}
#opus-category-navigation .opus-cn-title:focus-visible,
#opus-category-navigation .opus-cn-toggle:focus-visible,
.opus-cn-float-layer .opus-cn-subitem:focus-visible {
  outline:2px solid var(--opus-cn-red);outline-offset:2px;
}
@media(max-width:768px) {
  #opus-category-navigation {margin:12px auto 20px;max-width:100%;}
  #opus-category-navigation .opus-cn-scroll {
    overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
  }
  #opus-category-navigation .opus-cn-tabs {
    width:max-content;max-width:none;min-width:0;flex-wrap:nowrap;
    justify-content:flex-start;margin-inline:0;
  }
  #opus-category-navigation .opus-cn-tab {min-height:44px;padding:0 8px;gap:3px}
  #opus-category-navigation .opus-cn-tab:first-child {padding-left:8px}
  #opus-category-navigation .opus-cn-title {font-size:12.5px}
  .opus-cn-float-layer .opus-cn-subpanel {max-width:calc(100vw - 24px);width:min(238px,calc(100vw - 24px))}
  .opus-cn-float-layer .opus-cn-subitem {font-size:12.5px;min-height:38px}
}
@media(prefers-reduced-motion:reduce) {
  #opus-category-navigation *,#opus-category-navigation *:before,#opus-category-navigation *:after {transition:none!important}
}

/* Evita estilos globais de links e caixas do tema dentro do portal. */
.opus-cn-float-layer, .opus-cn-float-layer * {box-sizing:border-box}
.opus-cn-float-layer .opus-cn-subinner {width:100%;}
.opus-cn-float-layer .opus-cn-subitem {font-family:Poppins,Arial,sans-serif!important;width:100%;white-space:normal!important;opacity:1!important;visibility:visible!important;}
@media(prefers-reduced-motion:reduce) { .opus-cn-float-layer * {transition:none!important;} }

/* 1.3.1: posicionar abas no início da coluna de conteúdo */
#opus-category-navigation .opus-cn-scroll {text-align:left!important;border-bottom:0!important;}
#opus-category-navigation .opus-cn-nav .opus-cn-tabs {
  margin-left:0!important;margin-right:0!important;
  justify-content:flex-start!important;
  border-bottom:0!important;
}
#opus-category-navigation .opus-cn-nav .opus-cn-tab::after,
#opus-category-navigation .opus-cn-nav .opus-cn-tab::before {
  content:none!important;display:none!important;
}

/* 1.3.3: seletor legado removido com seguranca via reconhecimento de rotulo. */
body.tax-product_cat .opus-cn-legacy-hidden{display:none!important;visibility:hidden!important;}

/* 1.3.4: Oculta dropdown legado confirmado no Inspetor (Qode).
   Somente paginas de categoria com opcao de ocultacao ativa.
   O container .qodef-pl-main-holder e o plugin de filtros sao preservados. */
body.tax-product_cat:has(#opus-category-navigation[data-hide-old="1"]) .qodef-pl-main-holder > span:has(+ div.dropdown),
body.tax-product_cat:has(#opus-category-navigation[data-hide-old="1"]) .qodef-pl-main-holder > span + div.dropdown,
body.tax-product_cat:has(#opus-category-navigation[data-hide-old="1"]) .qodef-pl-main-holder > span + div.dropdown + div[style*="padding-bottom"] {
  display:none !important;
}

/* v1.6.0: terceiro nivel dentro do painel flutuante. */
.opus-cn-float-layer .opus-cn-subgroup {display:block;width:100%;}
.opus-cn-float-layer .opus-cn-subrow {display:flex;align-items:stretch;min-width:0;}
.opus-cn-float-layer .opus-cn-subrow .opus-cn-parent-link {
  flex:1;min-width:0;width:auto!important;justify-content:flex-start;
  padding-right:5px;
}
.opus-cn-float-layer .opus-cn-grand-toggle {
  display:inline-flex!important;align-items:center;justify-content:center;
  flex:0 0 34px;min-width:34px;min-height:33px;
  padding:0;border:0!important;box-shadow:none!important;
  color:#777!important;background:transparent!important;
  cursor:pointer;
}
.opus-cn-float-layer .opus-cn-grand-toggle:hover,
.opus-cn-float-layer .opus-cn-grand-toggle:focus-visible {color:#d30820!important;background:#eee!important;}
.opus-cn-float-layer .opus-cn-grand-toggle svg {width:13px;height:13px;transition:transform .2s ease;}
.opus-cn-float-layer .opus-cn-grand-toggle[aria-expanded="true"] svg {transform:rotate(180deg);}
.opus-cn-float-layer .opus-cn-grandchildren {display:flex;flex-direction:column;background:#eeeeee;}
.opus-cn-float-layer .opus-cn-grandchildren[hidden] {display:none!important;}
.opus-cn-float-layer .opus-cn-granditem {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:30px;padding:6px 12px 6px 26px;
  color:#4a4a4a!important;font:400 12px/1.4 Poppins,Arial,sans-serif!important;
  text-decoration:none!important;background:transparent!important;box-shadow:none!important;
}
.opus-cn-float-layer .opus-cn-granditem svg {width:12px;height:12px;flex-shrink:0;color:#888;}
.opus-cn-float-layer .opus-cn-granditem:hover,
.opus-cn-float-layer .opus-cn-granditem:focus-visible {color:#d30820!important;background:#e3e3e3!important;}
.opus-cn-float-layer .opus-cn-grand-toggle:focus-visible,
.opus-cn-float-layer .opus-cn-granditem:focus-visible {outline:2px solid #d30820;outline-offset:-2px;}
