/*
 Theme Name: PopularFX Child
 Theme URI: https://example.com/
 Description: Child theme to fix WCFM vendor store page template loading with PopularFX.
 Author: ChatGPT
 Version: 1.0
 Template: popularfx
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: popularfx-child
*/

/* Add your custom styles below */


/*
 * BookaPetland – UI Tweaks
 * Colar num tema-filho (style.css) ou carregar como CSS adicional.
 * Versão: 2025-08-16
 *
 * Alterações principais:
 * - Fix hamburger na frontpage (mobile): header acima de tudo, overflow visível, Weglot abaixo do header
 * - Removido PHP do fim (mover para functions.php se necessário)
 */

/* ================= HEADER / MENU (FIX FRONT PAGE MOBILE) ================= */

/* Garantir que o header não corta o menu mobile e fica por cima na homepage */
.home header,
.home #masthead,
.home .site-header,
.home .pagelayer-header{
  position: relative !important;
  z-index: 10000 !important;
  overflow: visible !important;
}

/* Weglot não deve tapar o header ou bloquear cliques no hambúrguer */
.weglot-container,
.weglot-flags,
.wg-default{
  position: fixed;                 /* apenas para o floating */
  z-index: 900 !important;         /* < header (10000) */
}

/* Mostrar o toggle do menu em mobile na homepage (classes comuns do Pagelayer) */
@media (max-width: 1024px){
  .home .pagelayer-primary-menu [class*="toggle"],
  .home .pagelayer-menu [class*="toggle"],
  .home [class*="primary-menu"] [class*="toggle"]{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* Esconder o toggle em desktop na homepage (o menu normal continua visível) */
@media (min-width: 1025px){
  .home .pagelayer-primary-menu [class*="toggle"],
  .home .pagelayer-menu [class*="toggle"],
  .home [class*="primary-menu"] [class*="toggle"]{
    display: none !important;
  }
}

/* Caso existam linhas/sections iniciais com overflow que possam cortar o menu, mantemos o header visível acima de tudo */
header, .site-header, #masthead { overflow: visible !important; }

/* ================= MAPA ================= */

/* MAPA: reduzir altura e melhorar responsividade */
.map-wrap, .listing-map, .directory-map, .geodir-map, .bp-map, .bp-hero-map {
  height: 360px !important;       /* desktop */
  max-height: 360px;
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 1024px) {
  .map-wrap, .listing-map, .directory-map, .geodir-map, .bp-map, .bp-hero-map {
    height: 280px !important;
    max-height: 280px;
  }
}
@media (max-width: 640px) {
  .map-wrap, .listing-map, .directory-map, .geodir-map, .bp-map, .bp-hero-map {
    height: 200px !important;
    max-height: 200px;
  }
}

.map-wrap, .listing-map, .bp-map { margin: 8px auto !important; }

/* ================= LISTINGS ================= */

/* grelha responsiva e cartões mais compactos */
.listings-grid, .directorist-listings, .geodir-loop-container, .bp-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}
@media (max-width: 1024px) {
  .listings-grid, .directorist-listings, .geodir-loop-container, .bp-listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .listings-grid, .directorist-listings, .geodir-loop-container, .bp-listings-grid {
    grid-template-columns: 1fr;
  }
}

/* Cartões */
.listing-card, .directorist-listing, .geodir-loop-item, .bp-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.listing-card:hover, .directorist-listing:hover, .geodir-loop-item:hover, .bp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.09);
}

/* Media com rácio 3:2 */
.listing-card__media,
.directorist-listing .listing-thumb,
.geodir-loop-item .gd-post-image,
.bp-card .bp-card__media {
  position: relative;
  aspect-ratio: 3 / 2;
  height: auto;
}
.listing-card__media img,
.directorist-listing .listing-thumb img,
.geodir-loop-item .gd-post-image img,
.bp-card .bp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Corpo do cartão */
.listing-card__body,
.directorist-listing .listing-content,
.geodir-loop-item .gd-loop-item__content,
.bp-card .bp-card__body {
  padding: 12px 14px 14px;
}
.listing-card__title,
.directorist-listing .listing-title a,
.geodir-loop-item .gd-listing-title a,
.bp-card .bp-card__title {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-card__meta,
.directorist-listing .directorist-card-meta,
.geodir-loop-item .gd-loop-item__meta,
.bp-card .bp-card__meta {
  font-size: .86rem;
  opacity: .85;
}

/* Barra de pesquisa/filtros compacta */
.search-bar, .directorist-archive-adv-search, .geodir-search, .bp-search {
  max-width: 1100px;
  margin: 10px auto 18px;
}

/* Sticky search opcional (com fundo) – comente se não quiser */
.bp-search.sticky, .geodir-search.sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  padding-top: 8px;
  padding-bottom: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

/* Imagens lazy (caso falte nos templates) */
img.bp-lazy { loading: lazy; }

.menu-item-filter { padding-left: 12px; }
.menu-item-filter form { display: flex; align-items: center; gap: 8px; }
@media (max-width: 992px){
  .menu-item-filter { width: 100%; }
  .menu-item-filter form { flex-wrap: wrap; }
}

/* Ocultar um mapa dentro do header; mostrar nos listings do WCFM */
.site-header #bk-map { display:none !important; }
#wcfmmp-stores-wrap #bk-map,
.wcfmmp-stores-wrap #bk-map { margin-top:12px; }

/* ================= HOME HERO ================= */

.home .pagelayer-section:first-of-type,
.home .pagelayer-row:first-of-type {
  height: 40vh !important;       /* ou um valor fixo, ex.: 320px */
  min-height: 320px !important;
  overflow: hidden;               /* OK: header tem overflow visível acima */
}

.home .pagelayer-row:first-of-type .pagelayer-col-holder {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

/* Manter a parte importante da imagem visível */
.home .pagelayer-row:first-of-type .pagelayer-background {
  background-size: cover !important;
  background-position: 50% 30% !important; /* foco um pouco acima */
}

/* Smaller on tablet/mobile */
@media (max-width: 992px) {
  .home .pagelayer-section:first-of-type,
  .home .pagelayer-row:first-of-type {
    height: 32vh !important;
    min-height: 260px !important;
  }
  .home .pagelayer-row:first-of-type .pagelayer-col-holder {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

/* ==== Google Maps pins — HARD RESET dentro de #bk-map ==== */
#bk-map { position: relative !important; z-index: 5 !important; }
#bk-map .gm-style img,
#bk-map .gm-style svg,
#bk-map .gm-style canvas {
  max-width: none !important;
  height: auto !important;
  transform: none !important;
  filter: none !important;
  image-rendering: auto !important;
  opacity: 1 !important;
}
#bk-map .gm-style .gm-marker-pane { z-index: 200 !important; }
#bk-map .gm-style .gm-overlay-pane,
#bk-map .gm-style .gm-overlay-image { z-index: 100 !important; }
.pac-container { z-index: 100010 !important; }







