/* PROMOWLAM • MOBILE UX PREMIUM FLUIDO (<=780px) */
@media (max-width: 780px) {
  
  /* ========================================================
     1. CABECALHO - ALINHAMENTO GEOMETRICO
     ======================================================== */
  body header.site { 
    padding-bottom: 12px;
  }
  
  /* Substitui o padding grosso do desktop por um ajustado ao mobile */
  body header.site .wrap {
    padding: 16px 16px 0 16px !important;
  }
  
  body header.site .row { 
    display: flex; 
    flex-direction: column; 
    align-items: center; /* Garante que TUDO fique no eixo central */
    gap: 14px; 
    padding: 0; /* Remove o erro de double padding */
    margin: 0;
  }
  
  body header.site .brand { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
  }
  
  body header.site .brand img { 
    height: 50px; /* Logo grande e imponente */
    width: auto; 
    max-width: 100%;
    object-fit: contain;
  }
  
  body header.site .brand span, 
  body header.site .brand h1, 
  body header.site .brand p,
  body header.site .nav { 
    display: none; 
  } 

  body input.search { 
    width: 100%; 
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 18px; 
    font-size: 16px; 
    min-height: 48px; 
    border-radius: 12px; 
    border: 1px solid rgba(0,0,0,0.08); /* Borda mais elegante e sutil */
    background: #ffffff;
    color: #222;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    -webkit-appearance: none; 
  }

  /* ========================================================
     2. CATEGORIAS ESTILO APP (SANGRAMENTO DE TELA)
     ======================================================== */
  body .wrap { 
    padding: 16px; /* Padding base do corpo */
    box-sizing: border-box;
    overflow-x: hidden; /* Previne bug de scroll horizontal na tela toda */
  }

  body .filters {
    display: flex; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 10px;
    /* MAGICA AQUI: Margem negativa quebra as paredes do wrap para encostar na borda do celular */
    margin: 0 -16px;
    padding: 12px 16px;
    overscroll-behavior-x: contain; 
    scroll-snap-type: x mandatory;
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch;
  }
  body .filters::-webkit-scrollbar { display: none; } 
  
  body .filters .chip {
    scroll-snap-align: start; 
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #444;
    border-radius: 99px;
    padding: 0 18px; 
    min-height: 40px; 
    font-size: 14px; 
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  body .filters .chip.active {
    background: #222;
    color: #fff;
    font-weight: 600;
  }
  body .filters .chip .count { display: none; } 

  /* ========================================================
     3. GRID INTELIGENTE
     ======================================================== */
  body .grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); 
    gap: 12px; 
    margin-top: 4px;
  }
  
  body .card { 
    display: flex;
    flex-direction: column;
    border-radius: 12px; 
    overflow: hidden;
    height: 100%;
    background: #fff;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  }
  
  body .card .img { 
    width: 100%; 
    aspect-ratio: 1/1; 
    padding: 12px; 
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
  }

  body .card .img img {
      max-height: 100%;
      width: auto;
      object-fit: contain;
  }
  
  body .card .body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
  }

  body .card .title { 
    font-size: 13px; 
    line-height: 1.35;
    margin-bottom: auto; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    color: #222;
  }

  body .card .meta { margin-top: 8px; }
  
  body .card .foot {
    padding: 0 12px 12px 12px;
    margin: 0;
    display: flex;
    justify-content: center;
  }

  body .card .foot a.btn {
    width: 100%; 
    min-height: 44px; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    padding: 0 10px;
  }
}
