﻿@media (max-width: 768px) {
  body {
    padding-top: var(--altura-cabecalho, 108px);
  }

  body.filtros-mobile-abertos {
    overflow: hidden;
  }

  header {
    padding: 10px 20px;
  }

  .cabecalho-conteudo {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo carrinho"
      "slogan slogan";
    gap: 6px;
  }

  .area-logo {
    grid-area: logo;
  }

  .logo {
    max-width: 125px;
    max-height: 54px;
  }

  .slogan {
    grid-area: slogan;
    font-size: 21px;
    margin-top: 2px;
    letter-spacing: 1px;
    line-height: 1.1;
  }

  .botao-carrinho-header {
    grid-area: carrinho;
    padding: 8px 12px;
    min-width: 64px;
  }

  main {
    padding: 10px 20px 20px 20px;
  }

  .carrossel-banners {
    margin-bottom: 14px;
  }

  .carrossel-container {
    border-radius: 12px;
  }

  .carrossel-imagens {
    aspect-ratio: 2172 / 1222;
  }

  .botao-carrossel {
    width: 34px;
    height: 46px;
    font-size: 30px;
  }

  .botao-carrossel-anterior {
    left: 8px;
  }

  .botao-carrossel-proximo {
    right: 8px;
  }

  .indicadores-carrossel {
    margin-top: 8px;
  }

  .barra-catalogo {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 10px;
  }

  .barra-catalogo.filtro-mobile-fixo {
    padding-bottom: var(--espaco-botao-filtro, 72px);
  }

  .area-filtros-com-menu {
    width: 100%;
  }

  .filtros {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filtro-icone {
    flex: 0 0 auto;
    width: 64px;
    height: 62px;
    padding: 4px 4px 2px 4px;
    border-radius: 12px;
  }

  .filtro-icone img {
    width: 44px;
    height: 28px;
  }

  .filtro-icone span {
    font-size: 10px;
    line-height: 1;
  }

  .filtro-icone:hover {
    background-color: rgba(0, 0, 0, 0.68);
    transform: none;
  }

  .filtro-icone:hover img {
    transform: none;
  }

  .filtro-icone.ativo,
  .filtro-icone.ativo:hover {
    background-color: rgba(0, 0, 0, 0.92);
    transform: translateY(-2px);
  }

  .filtro-icone.ativo img,
  .filtro-icone.ativo:hover img {
    transform: none;
  }

  .painel-subfiltros {
    position: fixed;
    left: 14px;
    right: 14px;
    top: calc(var(--altura-cabecalho, 108px) + 58px);
    bottom: auto;
    width: auto;
    padding: 16px;
    max-height: calc(100vh - var(--altura-cabecalho, 108px) - 74px);
    overflow-y: auto;
    border-radius: 18px;
    z-index: 3200;
  }

  .painel-subfiltros::before {
    display: none;
  }

  .painel-subfiltros-cabecalho {
    align-items: center;
  }

  .botao-limpar-subfiltros {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .pesquisa-produtos {
    flex: none;
    min-width: 100%;
    max-width: 100%;
  }

  .lista-produtos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .busca-vazia-descanso {
    min-height: 360px;
    padding: 22px;
  }

  .busca-vazia-descanso p {
    max-width: 300px;
    padding: 15px 16px;
    font-size: 18px;
  }

  .item-categoria-flutuante {
    width: 82px;
    height: 82px;
    opacity: 0.36;
  }

  .paginacao-produtos {
    margin-top: 18px;
  }

  .botao-paginacao {
    padding: 9px 11px;
    font-size: 13px;
  }

  .produto {
    width: 100%;
    min-height: 325px;
    padding: 12px;
  }

  .produto h3 {
    font-size: 15px;
    min-height: 56px;
  }

  .controle-quantidade-catalogo {
    grid-template-columns: 42px 1fr 42px;
  }

  .controle-quantidade-catalogo button {
    height: 38px;
    font-size: 19px;
  }

  .controle-quantidade-catalogo span {
    height: 38px;
  }

  .detalhe-card {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
    overflow: hidden;
  }

  .detalhe-coluna-imagem,
  .detalhe-info {
    min-width: 0;
  }

  .detalhe-coluna-imagem > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .detalhe-info h2 {
    font-size: 22px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .lista-sugestoes {
    width: 100%;
    max-width: 100%;
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 38vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .sugestao-card {
    padding: 8px;
  }

  .area-click-sugestao img {
    margin-bottom: 8px;
  }

  .area-click-sugestao h4 {
    font-size: 12px;
  }

  .area-click-sugestao p {
    font-size: 12px;
  }

  .zoom-produto {
    display: none !important;
  }

  .carrinho-card {
    padding: 20px;
  }

  .item-carrinho {
    grid-template-columns: 64px 1fr;
  }

  .miniatura-carrinho {
    width: 64px;
  }

  .linha-cupom {
    grid-template-columns: 1fr;
  }

  .whatsapp-flutuante {
    right: 18px;
    bottom: 18px;
    width: 76px;
    height: 76px;
  }

  .whatsapp-flutuante.destaque-busca {
    width: 92px;
    height: 92px;
  }

  .whatsapp-flutuante.destaque-busca::before {
    right: 74px;
    max-width: 132px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .whatsapp-flutuante.destaque-busca::after {
    right: 66px;
  }

  .botao-filtro-mobile {
    position: relative;
    z-index: 60;
    width: auto;
    min-width: 104px;
    height: 48px;
    align-self: flex-start;
    padding: 0 16px;
    margin-top: -2px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  }

  .botao-filtro-mobile.fixo {
    position: fixed;
    left: 18px;
    top: var(--altura-cabecalho, 108px);
    z-index: 3100;
  }

  .botao-filtro-mobile.ativo {
    background-color: #333;
  }

  .rodape-loja {
    margin-top: 24px;
    padding: 24px 20px 108px 20px;
  }

  .rodape-conteudo {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 380px) {
  body {
    padding-top: var(--altura-cabecalho, 100px);
  }

  header {
    padding: 8px 12px;
  }

  .logo {
    max-width: 112px;
    max-height: 48px;
  }

  .slogan {
    font-size: 18px;
  }

  main {
    padding: 8px 12px 18px 12px;
  }

  .filtro-icone {
    width: 60px;
    height: 58px;
  }

  .filtro-icone img {
    width: 40px;
    height: 26px;
  }

  .filtro-icone span {
    font-size: 9px;
  }

  .lista-produtos {
    gap: 10px;
  }

  .busca-vazia-descanso {
    min-height: 330px;
    padding: 18px;
  }

  .busca-vazia-descanso p {
    max-width: 260px;
    font-size: 16px;
  }

  .produto {
    min-height: 305px;
    padding: 10px;
  }

  .produto h3 {
    font-size: 13px;
    min-height: 50px;
  }

  .produto .preco {
    font-size: 14px;
  }

  .botao-adicionar-catalogo {
    padding: 10px 8px;
    font-size: 12px;
  }

  .lista-sugestoes {
    grid-auto-columns: minmax(110px, 42vw);
  }

  .whatsapp-flutuante {
    right: 12px;
    bottom: 12px;
    width: 66px;
    height: 66px;
  }

  .whatsapp-flutuante.destaque-busca {
    width: 78px;
    height: 78px;
  }

  .whatsapp-flutuante.destaque-busca::before {
    right: 62px;
    max-width: 112px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .whatsapp-flutuante.destaque-busca::after {
    right: 55px;
    border-top-width: 6px;
    border-bottom-width: 6px;
    border-left-width: 8px;
  }

  .botao-filtro-mobile {
    min-width: 92px;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }

  .botao-filtro-mobile.fixo {
    left: 12px;
    top: var(--altura-cabecalho, 100px);
  }

  .painel-subfiltros {
    left: 12px;
    right: 12px;
    top: calc(var(--altura-cabecalho, 100px) + 50px);
    bottom: auto;
    max-height: calc(100vh - var(--altura-cabecalho, 100px) - 62px);
  }
}
