:root { --wal-yellow: #F5E400; --wal-red: #D61B1B; --wal-blue: #1F2F86; }
body { background: #f7f7f9; }

/* Loader overlay (carregamento inicial) */
.wal-loader{
  position: fixed;
  inset: 0;
  z-index: 1600; /* acima do conteúdo e abaixo do offcanvas/modal (bootstrap costuma 1050/1060) */
  background: rgba(255,255,255,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.wal-loader-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
  text-align: center;
  min-width: 240px;
}



.navbar-wal { background: #fff; border-bottom: 1px solid rgba(0,0,0,.06); }
.brand-logo { height: 46px; width: auto; object-fit: contain; }
.card-product { transition: transform .08s ease, box-shadow .08s ease; }
.card-product:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.06); }
.price { font-weight: 700; }
.badge-stock { font-weight: 600; }
.cart-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 1040;
  border-radius: 999px; padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.small-muted { color: rgba(0,0,0,.55); font-size: .92rem; }
.form-required::after { content:" *"; color: var(--wal-red); }
.qty-btn { width: 34px; height: 34px; display:inline-flex; align-items:center; justify-content:center; }
.cart-item-name { font-weight: 600; line-height: 1.1; }
.cart-item-sub { font-size: .88rem; color: rgba(0,0,0,.6); }
.placeholder-img {
  background: linear-gradient(135deg, rgba(0,0,0,.03), rgba(0,0,0,.08));
  height: 160px; display:flex; align-items:center; justify-content:center; color: rgba(0,0,0,.55);
}



/* Hover do carrinho: força fundo azul mais claro e ícone branco */
#cartBtn.btn.btn-outline-primary:hover{
  color: #fff !important;                      /* emoji/texto branco */
  background-color: rgba(13,110,253,0.40) !important; /* azul com 0.7 */
  border-color: rgba(13,110,253,0.40) !important;
}

/* também aplica no clique (active) e no foco */
#cartBtn.btn.btn-outline-primary:active,
#cartBtn.btn.btn-outline-primary:focus{
  color: #fff !important;
  background-color: rgba(13,110,253,0.40) !important;
  border-color: rgba(13,110,253,0.40) !important;
}

/* foco mais limpo */
#cartBtn.btn.btn-outline-primary:focus{
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.25) !important;
}


.card-product .card-img-top{
  cursor: zoom-in;
}

.card-product .placeholder-img{
  cursor: zoom-in;
}



/* =========================
   Categorias: visual mais profissional
   (substituir o bloco atual das categorias por este)
   ========================= */

.cat-bar{
  display:flex;
  align-items:center;
  gap:.75rem;
}

/* Botão "Todos" */
.cat-all{
  flex:0 0 auto;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  padding: .46rem .9rem;
  border-width: 1px;
  box-shadow: 0 8px 18px rgba(0,0,0,.05);
}

/* Container com setas + trilha */
.cat-scroll-wrap{
  position:relative;
  flex:1 1 auto;
  min-width: 0;
  display:flex;
  align-items:center;
  gap:.5rem;
}

/* Trilho com fundo suave (parece "componente") */
.cat-scroll{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  gap:.55rem;
  overflow-x:auto;
  overflow-y:hidden;
  white-space:nowrap;
  padding: .45rem .55rem;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */

  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,.04);
}
.cat-scroll::-webkit-scrollbar{ display:none; } /* Chrome/Safari */

/* Pílulas (categorias) */
.cat-pill{
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  padding: .44rem .9rem;
  border: 1px solid rgba(31,47,134,.18); /* wal-blue suave */
  color: rgba(31,47,134,.92);
  background: rgba(255,255,255,.92);
  transition: transform .08s ease, box-shadow .08s ease, background-color .08s ease, border-color .08s ease;
}

.cat-pill:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  border-color: rgba(31,47,134,.30);
  background: rgba(31,47,134,.04);
}

/* Quando estiver ativo (você já troca entre btn-primary e btn-outline-primary no JS)
   Vamos “refinar” o btn-primary sem perder a lógica atual */
.cat-scroll .btn.btn-primary.cat-pill,
.cat-all.btn.btn-primary{
  background-color: var(--wal-blue) !important;
  border-color: rgba(31,47,134,.35) !important;
  box-shadow: 0 12px 26px rgba(31,47,134,.18) !important;

  color: #fff !important; /* <<< ADICIONE ESTA LINHA */
}


/* Setas: mais elegantes e discretas */
.cat-arrow{
  flex:0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.95);
  font-size: 18px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  transition: transform .08s ease, box-shadow .08s ease, opacity .08s ease;
}
.cat-arrow:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.08);
}
.cat-arrow:disabled{
  opacity: .35;
  box-shadow:none;
  transform:none;
}

/* Pequenas: pode ocultar setas (mantém swipe/scroll) */
@media (max-width: 576px){
  .cat-arrow{ display:none; }
  .cat-scroll{
    border-radius: 16px;
    padding: .45rem .5rem;
  }
}
/* =========================
   Categorias — hover/focus (COMPLEMENTO)
   Cole logo após o @media (max-width: 576px) das categorias
   ========================= */

/* Hover do trilho (a barra toda responde ao mouse) */
.cat-scroll-wrap:hover .cat-scroll{
  background: rgba(255,255,255,.92);
  border-color: rgba(31,47,134,.12);
  box-shadow: 0 14px 32px rgba(0,0,0,.06);
}

/* Hover mais refinado nas pílulas */
.cat-pill:hover{
  background: rgba(31,47,134,.06);
  border-color: rgba(31,47,134,.28);
  color: rgba(31,47,134,.98);
}

/* Hover quando a pílula está ativa (btn-primary) */
.cat-scroll .btn.btn-primary.cat-pill:hover,
.cat-all.btn.btn-primary:hover{
  filter: brightness(1.03);
  color: #fff !important; /* <<< GARANTE QUE NÃO “APAGUE” NO HOVER */
}


/* Foco de teclado (profissional e acessível) */
.cat-pill:focus-visible,
.cat-all:focus-visible,
.cat-arrow:focus-visible{
  outline: none;
  box-shadow: 0 0 0 .22rem rgba(31,47,134,.18) !important;
}

/* Setas com hover mais “clicável” */
.cat-arrow:hover{
  background: rgba(31,47,134,.04);
  border-color: rgba(31,47,134,.16);
}




/* =========================
   Toast “Adicionado ao carrinho” com check + animação
   ========================= */

.toast-add-check{
  display:flex;
  align-items:center;
  gap:.6rem;
}
.toast-add-icon{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.18);
  font-weight: 800;
  transform: scale(.85);
  animation: walPop .24s ease-out forwards;
}
@keyframes walPop{
  to { transform: scale(1); }
}


/* =========================
   FIX: Navbar compacto em telas muito estreitas (<= 390px)
   ========================= */
@media (max-width: 390px){

  /* Evita o topo ficar alto (quebra de linha no container do navbar) */
  .navbar-wal .container{
    flex-wrap: nowrap !important;
    gap: .5rem !important;
    padding-top: .5rem !important;
    padding-bottom: .5rem !important;
  }

  /* Marca/Logo mais compacto */
  .navbar-wal .navbar-brand{
    flex: 0 0 auto;
    gap: .5rem !important;
    margin-right: .25rem !important;
  }

  .navbar-wal .brand-logo{
    height: 40px !important; /* ajuste fino: 38-44 se quiser */
    width: auto !important;
  }

  /* O bloco da busca deve poder encolher */
  .navbar-wal .d-flex.align-items-center.gap-2{
    flex: 1 1 auto !important;
    min-width: 0 !important; /* CRÍTICO: permite o input encolher */
    gap: .5rem !important;
  }

  .navbar-wal .input-group{
    flex: 1 1 auto !important;
    min-width: 0 !important; /* CRÍTICO */
  }

  .navbar-wal .input-group .form-control{
    min-width: 0 !important; /* CRÍTICO */
    font-size: .95rem;
    padding: .45rem .55rem;
  }

  .navbar-wal .input-group .input-group-text{
    padding: .45rem .55rem;
  }

  /* Carrinho menor para não empurrar o layout */
  #cartBtn{
    flex: 0 0 auto !important;
    padding: .45rem .55rem !important;
  }
}

