/* Menu mobile moderno: hambúrguer fixo + painel fullscreen com slide.
   Vale até 1024px (Etapa 8, out/2026: antes só até 767px, e no tablet o
   cabeçalho mostrava os dois ícones de menu do Elementor, um de cada lado
   do logo). Acima de 1024px o menu de desktop resolve. */

.qdn-mobile-toggle,
.qdn-mobile-menu {
  /* !important necessário: o botão tem type="button", e o reset.css do tema
     tem uma regra `[type="button"]{display:inline-block}` com a MESMA
     especificidade de uma classe (seletor de atributo = 0,1,0); no empate,
     quem carrega depois vence, então sem !important o reset ganhava. */
  display: none !important;
}

html.qdn-menu-open {
  overflow: hidden;
}

@media (max-width: 1024px) {

  /* !important em (quase) tudo aqui: o botão tem type="button", e o
     reset.css do tema (`[type="button"], [type="submit"], button {...}`)
     também define display/border/padding/background — e o seletor de
     atributo `[type="button"]` empata em especificidade com uma classe
     simples. No empate quem carrega depois (o reset) vencia, então sem
     !important várias propriedades eram silenciosamente ignoradas. */
  .qdn-mobile-toggle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important; /* vive dentro do bloco do shortcode, no lugar do widget antigo */
    width: 30px !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
  }

  .qdn-mobile-toggle__bar {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    border-radius: 2px !important;
    background-color: #FFFFFF;
    transform-origin: center;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), opacity .25s ease, background-color .3s ease;
  }

  body.qdn-header-is-scrolled .qdn-mobile-toggle__bar {
    background-color: #000000;
  }

  .qdn-mobile-toggle.is-open .qdn-mobile-toggle__bar {
    background-color: #FDFCF8 !important;
  }

  .qdn-mobile-toggle.is-open .qdn-mobile-toggle__bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  .qdn-mobile-toggle.is-open .qdn-mobile-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .qdn-mobile-toggle.is-open .qdn-mobile-toggle__bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .qdn-mobile-menu {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 44px;
    position: fixed;
    inset: 0;
    z-index: 100000;
    /* em cima, a faixa do logo (22px + 60px + respiro): com 8 itens no menu
       (out/2026, entrou "Vinhos") a lista centralizada encostava no logo.
       "safe center" + rolagem: em tela baixa nada fica cortado em cima. */
    padding: 104px 24px 32px;
    justify-content: safe center;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: #0B0906;
    transform: translateX(100%);
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
  }

  .qdn-mobile-menu.is-open {
    transform: translateX(0);
  }

  /* Logo à esquerda, fechar à direita — mesma linha, nas pontas,
     alinhado com a posição original do hambúrguer (top:22px/right:20px). */
  .qdn-mobile-menu__top {
    position: absolute;
    top: 22px;
    left: 24px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .qdn-mobile-menu__logo {
    /* !important: `.elementor img{height:auto;max-width:100%}` do Elementor
       tem mais especificidade (classe + tag) que uma classe só, e vencia. */
    display: block !important;
    height: 60px !important;
    width: auto !important;
    max-width: none !important;
  }

  .qdn-mobile-menu__close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    color: #FDFCF8;
    transition: color .3s ease;
  }

  .qdn-mobile-menu__close:hover {
    color: #BF8848;
  }

  .qdn-mobile-menu__close svg {
    display: block;
        width: 60px;
        height: 60px;
  }

  .qdn-mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
  }

  .qdn-mobile-menu__item a {
    font-family: "Satoshi", sans-serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #FDFCF8;
    text-decoration: none;
    transition: color .3s ease;
  }

  .qdn-mobile-menu__item a:hover,
  .qdn-mobile-menu__item a:active {
    color: #BF8848;
  }

  /* celulares mais baixos (ex.: 375x667): itens mais próximos e menores */
  @media (max-height: 760px) {
    .qdn-mobile-menu { gap: 30px; padding-top: 96px; }
    .qdn-mobile-menu__list { gap: 18px; }
    .qdn-mobile-menu__item a { font-size: 23px; }
  }

  .qdn-mobile-menu__social {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .qdn-mobile-menu__social a {
    display: block;
    width: 22px;
    height: 22px;
    background-color: #BF8848;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: background-color .3s ease;
  }

  .qdn-mobile-menu__social a:hover {
    background-color: #FDFCF8;
  }
}

/* tablet (768–1024px): cabeçalho igual ao do celular — esconde os dois
   menus do Elementor (cada um trazia o próprio ícone de menu) e deixa o
   logo à esquerda, com Agendar + hambúrguer à direita */
@media (min-width: 768px) and (max-width: 1024px) {
  #header .elementor-element-d93fa22,
  #header .elementor-element-01c5f36 {
    display: none !important;
  }
  #header .elementor-element-d328a83 > .e-con-inner {
    justify-content: space-between !important;
  }
}
