/* ================= OPUS Mega Menu – CSS COMPLETO (v1.0.4) ================= */
:root{
  --opus-accent:#E30613;   /* vermelho dos itens destacados (featured) */
  --opus-hover:#000;       /* cor do hover padrão (preto) */
}

@media (min-width:1025px){

  .qodef-page-header, .qodef-menu-area { overflow: visible !important; }
  li.opus-mega{ position: static !important; }

  /* painel fixo logo abaixo do header */
  li.opus-mega > .second{
    position: fixed !important;
    top: calc(var(--header-h, 80px) + 10px); /* +10px de respiro abaixo do navbar */
    left: 0; right: 0;
    z-index: 9999;
    background:#fff;
    border-top:1px solid #eee;
    box-shadow:0 10px 24px rgba(0,0,0,.06);
    display:block !important;
    opacity:0; visibility:hidden; pointer-events:none;
    transform:translateY(8px);
    transition:opacity .22s ease, transform .22s ease, visibility .22s ease;
  }
  li.opus-mega:hover > .second,
  li.opus-mega:focus-within > .second{ opacity:1; visibility:visible; pointer-events:auto; transform:none; }

  /* oculto ao descer */
  li.opus-mega > .second.mega-hidden{
    opacity:0 !important; visibility:hidden !important; pointer-events:none !important;
    transform: translateY(8px) !important;
  }

  /* grid: 1 coluna de imagem + 6 colunas (gap 12px) */
  li.opus-mega > .second > .inner{
    width:100% !important; max-width:none !important;
    padding:20px clamp(28px,4vw,48px) 24px clamp(18px,3vw,28px) !important;
    display:grid !important;
    grid-template-columns: 240px repeat(6, minmax(128px,1fr));
    column-gap:12px; row-gap:14px;
    background:#fff !important; border:0 !important; box-shadow:none !important;
  }

  .opus-mega-promo{
    grid-column:1 / span 1;
    align-self:stretch;
    border-right:1px solid #eee;
    padding-right:10px;
    display:flex; flex-direction:column; gap:8px;
    min-width:0; overflow:hidden;
  }
  .opus-mega-promo a{ display:block; text-decoration:none; }
  .opus-mega-promo img{ width:100%; height:auto; display:block; border-radius:4px; object-fit:cover; }
  .opus-mega-promo .caption{ font-size:12px; line-height:1.3; color:#555; }

  /* CATEGORIAS x SUBCATEGORIAS */
  li.opus-mega .opus-mega-col{ min-width:0; margin:0 !important; padding:0 !important; }
  li.opus-mega .opus-mega-col > a.opus-mega-title,
  li.opus-mega .opus-mega-col > a.is-category{
    display:block;
    font-size:15px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:0;
    margin:0 0 6px 0;
    color:#111; text-decoration:none;
  }

  li.opus-mega .opus-mega-col ul{ margin:0 !important; padding:0 !important; border:0 !important; list-style:none; }
  li.opus-mega .opus-mega-col li{ margin:0 !important; padding:0 !important; text-indent:0 !important; }

  /* subcategorias – hover PRETO */
  li.opus-mega .opus-mega-col ul a,
  li.opus-mega .opus-mega-link{
    display:block;
    padding:2px 0 !important;
    font-size:13px;
    line-height:1.22 !important;
    font-weight:500;
    color:#222; text-decoration:none;
    text-underline-offset:3px; text-decoration-thickness:1px;
  }
  li.opus-mega .opus-mega-col ul a:hover,
  li.opus-mega .opus-mega-link:hover{
    color:var(--opus-hover);
    text-decoration:underline;
  }

  /* DESTACADOS (sempre vermelhos) */
  li.opus-mega .opus-mega-col ul a.is-featured{
    color: var(--opus-accent) !important;
    font-weight: 700;
  }
  li.opus-mega .opus-mega-col ul a.is-featured:hover{
    color: var(--opus-accent) !important;
    text-decoration: underline;
  }
}

@media (max-width:1024px){
  li.opus-mega > .second{
    position:static !important; top:auto !important; left:auto !important; right:auto !important;
    opacity:1 !important; visibility:visible !important; pointer-events:auto !important;
    transform:none !important; background:transparent !important; box-shadow:none !important; border:0 !important;
  }
  li.opus-mega > .second > .inner{
    display:block !important; padding:0 !important; max-width:none !important;
  }
  .opus-mega-promo{ display:none !important; }
}

/* ===== Hover animado nos TÍTULOS das categorias ===== */
@media (min-width:1025px){
  /* o título vira inline-block para o sublinhado seguir só o texto */
  li.opus-mega .opus-mega-col > a.opus-mega-title{
    display: inline-block !important;
    position: relative;
    text-decoration: none !important;
    /* opcional: escurecer levemente no hover */
    transition: color .15s ease;
  }
  /* linha animada (fina) que cresce da esquerda p/ direita */
  li.opus-mega .opus-mega-col > a.opus-mega-title::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;         /* ajuste de distância do texto (ex.: -1px, 0) */
    height: 1.5px;        /* espessura da linha (ex.: 1px, 2px) */
    width: 0;             /* começa sem linha */
    background: currentColor; /* usa a cor atual do título */
    transition: width .22s ease;
  }
  li.opus-mega .opus-mega-col > a.opus-mega-title:hover::after,
  li.opus-mega .opus-mega-col > a.opus-mega-title:focus-visible::after{
    width: 100%;
  }
  /* cor no hover dos TÍTULOS (segue seu padrão de hover preto) */
  li.opus-mega .opus-mega-col > a.opus-mega-title:hover{
    color: var(--opus-hover, #000);
  }
}

/* Mobile: mantém suave, sem atrapalhar o acordeão */
@media (max-width:1024px){
  li.opus-mega .opus-mega-col > a.opus-mega-title{
    position: relative; text-decoration: none !important;
  }
  li.opus-mega .opus-mega-col > a.opus-mega-title::after{
    content:""; position:absolute; left:0; bottom:6px;
    height: 1.5px; width: 0; background: currentColor; transition: width .22s ease;
  }
  li.opus-mega .opus-mega-col.open > a.opus-mega-title::after{ width: 100%; } /* quando a seção está aberta */
}
