:root{
  --bg:#f6f8fc;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:rgba(15,23,42,.10);
  --shadow:0 18px 50px rgba(2,6,23,.10);
  --shadow2:0 10px 25px rgba(2,6,23,.08);
  --brand:#2563eb;
  --brand2:#1d4ed8;
  --gold:#fbbf24;
  --radius:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 400px at 30% -20%, rgba(37,99,235,.18), transparent 60%),
    radial-gradient(1200px 400px at 80% -30%, rgba(251,191,36,.16), transparent 55%),
    var(--bg);
  color:var(--text);
}

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 34px;
}

/* ===== BUSCA ===== */
.searchWrap{ margin-top: 14px; position: relative; z-index: 1; }

.searchCard{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  box-shadow: var(--shadow2);
  padding: 12px;
}

.searchRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.inp{
  flex:1;
  min-width: 180px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  outline:none;
  background:#fff;
  font-size: 14px;
}

.inp:focus{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

/* dropdown com setinha */
.inp.sel{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(15,23,42,.8) 50%),
    linear-gradient(135deg, rgba(15,23,42,.8) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 55%,
    calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.btnSearch{
  padding: 12px 14px;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#fff;
  font-weight: 1000;
  cursor:pointer;
  box-shadow: 0 14px 30px rgba(37,99,235,.18);
}
.btnSearch:hover{ filter: brightness(1.02); }

.btnGeo{
  background:#f4b400;
  color:#1f2937;
  border:1px solid #e0a800;
  border-radius:999px;
  padding:10px 18px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s ease, transform .15s ease, box-shadow .15s ease;
}
.btnGeo:hover{
  background:#e5a700;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  transform:translateY(-1px);
}

.geoStatus{
  margin-top:10px;
  font-size: 13px;
  color: var(--muted);
  display:none;
}

/* lupa (mobile) */
.btnSearchIcon{
  width: 100% !important;
  height: auto !important;
  padding: 12px 14px !important;
  border-radius: 16px !important;

  display: none !important; /* escondido por padrão (desktop) */
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;

  background: #ffffff !important;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.btnSearchIcon svg{
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.btnSearchIcon .searchHint{
  color: #64748b;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}

/* ===== LISTA ===== */
.listArea{ margin-top: 16px; }

/* desktop: 3 colunas */
.gridCards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.card{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  overflow:hidden;
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
  display:flex;
  flex-direction:column;
  height: 100%;
}

.cardTop{
  position: relative;
  overflow: hidden;
  height: 170px;
  background: linear-gradient(135deg, #0b1f4a, #0f172a);
}

.cardTop img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.cardTopFallbackName{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 12px 16px;
  color:#fff;
  font-weight:900;
  font-size:18px;
  letter-spacing:.8px;
  text-transform:uppercase;
  z-index:2;
  text-shadow: 0 14px 28px rgba(0,0,0,.35);
}

.bannerCity{
  position:absolute;
  right:8px;
  bottom:5px;
  padding:7px 11px;
  border-radius:12px;
  font-size:13px;
  font-weight:800;
  color:#fff;
  background: rgba(2, 8, 23, 0.75);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  max-width: 85%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badgeDestaque{
  position:absolute;
  top: 12px;
  left: 12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.10);
  font-weight: 1000;
  font-size: 12px;
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
}
.badgeDot{
  width:10px;height:10px;border-radius:999px;background: var(--gold);
  box-shadow: 0 0 0 4px rgba(251,191,36,.22);
}

.cardBody{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  flex: 1;
}

.cardTitle{
  margin:0;
  font-size: 16px;
  letter-spacing:-.2px;
  font-weight: 1000;
  line-height: 1.2;
}
.cardTitle a:hover{ color: var(--brand2); }

.cardMeta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metaPill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.80);
}

.cardDesc{
  margin:0;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.cardActions{
  margin-top: auto;
  display:flex;
  justify-content:center;
  padding-top: 12px;
}

/* BTN VER (unificado) */
.btnVer{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 5px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 1000;
  border: 1px solid rgba(37,99,235,.25);
  background: linear-gradient(135deg, rgba(37,99,235,1), rgba(29,78,216,1));
  color: #fff;
  box-shadow: 0 14px 30px rgba(37,99,235,.18);
  transition: transform .15s ease, filter .15s ease;
}
.btnVer:hover{ transform: translateY(-1px); filter: brightness(1.02); }

.btnVer i{
  font-size: 16px;
  opacity: .95;
}
.btnVer span{
  font-weight: 600;
  letter-spacing: .2px;
}

.emptyBox{
  margin-top: 14px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  padding: 16px;
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}

/* ===== PAGINAÇÃO ===== */
.paginacaoWrap{
  max-width:1100px;
  margin:18px auto 0;
  padding:0 14px;
}
.paginacao{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
}
.pg{
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  color:#0f172a;
  font-weight:900;
}
.pg.ativo{
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
}
.pg.seta{
  font-weight:900;
  padding: 10px 14px;
}

/* ===== BOTÃO TOPO ===== */
#btnTopo{
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 45px rgba(2,6,23,.18);
  cursor: pointer;
  display:none;
  align-items:center;
  justify-content:center;
  transition: transform .15s ease;
}
#btnTopo:hover{ transform: translateY(-2px); }

#btnTopo i{
  font-size: 20px;
  color: #0f172a;
}

/* ===== RODAPÉ ===== */
.rodapePortal{
  margin-top: 40px;
  padding: 18px 12px;
  text-align: center;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}
.rodapePortal strong{ color: #38bdf8; }
.rodapeLink{ color:#38bdf8; font-weight:900; }
.rodapeLink:hover{ text-decoration: underline; }

/* ===== MODAL ===== */
body.modalOn{ overflow:hidden; height:100%; }

.modalOverlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 12px;
  background: rgba(2,6,23,.55);
  z-index: 99999;
}
.modalOverlay.open{ display:flex; }

.modalCard{
  width: 100%;
  max-width: 520px;
  margin-top: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 22px 55px rgba(2,6,23,.18);
  overflow: hidden;
  max-height: calc(100vh - 20px);
  display:flex;
  flex-direction:column;
}

.modalHead{
  padding: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid rgba(15,23,42,.10);
}
.modalClose{
  border:0;
  background: rgba(15,23,42,.06);
  width:36px;
  height:36px;
  border-radius:12px;
  cursor:pointer;
}

.modalBody{
  padding: 12px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.lbl{
  display:block;
  font-size: 13px;
  color: rgba(15,23,42,.70);
  margin: 10px 0 6px;
}

.modalActions{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  margin-top:12px;
}

/* ===== RESPONSIVO ===== */

/* tablet: 2 colunas */
@media (max-width: 980px){
  .gridCards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* mobile: 1 coluna */
@media (max-width: 768px){
  .gridCards{ grid-template-columns: 1fr; }

  #f_q, #f_cidade, #f_categoria{ display:none !important; }
  .searchRow .btnGeo, .searchRow .btnSearch{ display:none !important; }

  .btnSearchIcon{ display:flex !important; }

  .modalActions{ grid-template-columns: 1fr; }

  .cardActions{
    padding-left: 8px;
    padding-right: 8px;
  }

  .btnVer{
    width: 100%;
    padding: 14px 0;
    border-radius: 18px;
    font-size: 15px;
    letter-spacing: .3px;
    box-shadow: 0 6px 14px rgba(2,6,23,.18);
  }
}

/* ===== AJUSTE CAMPOS DO MODAL ===== */
.modalBody .inp{
  width: 100%;
  height: 46px;
}
.modalBody select.inp{
  height: 46px;
}

/* popup de loading da busca */
.loadingBusca{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}
.loadingBusca.open{ display:flex; }

.loadingCard{
  width: min(200px, 90vw);
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 18px 60px rgba(2,6,23,.22);
  display:flex;
  gap: 12px;
  align-items:center;
}

.spinner{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(15,23,42,.18);
  border-top-color: rgba(37,99,235,1);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

.loadingTxt{
  font: 600 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #0f172a;
}

@keyframes spin{
  to{ transform: rotate(360deg); }
}

/* ===== TOPO DO CARD SEM IMAGEM ===== */
.cardTop.noImg{
  background: linear-gradient(110deg, rgba(37,99,235,.92), rgba(15,23,42,.96)) !important;
}
.cardTop.noImg::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to top, rgba(2,6,23,.55), rgba(2,6,23,.10) 55%, rgba(2,6,23,.02));
  pointer-events:none;
}

/* ===========================
   MODAL PERGUNTA LOCALIZAÇÃO
   =========================== */
.geoAskOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 99999;
}
.geoAskOverlay.open{ display:flex; }

.geoAskCard{
  width: min(520px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,.10);
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.geoAskOverlay.open .geoAskCard{
  transform: translateY(0);
  opacity: 1;
}

.geoAskHead{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(180deg, rgba(37,99,235,.10), rgba(37,99,235,.02));
}

.geoAskIcon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(37,99,235,.12);
  color: #1d4ed8;
  flex: 0 0 auto;
}

.geoAskTitle{
  font-weight: 800;
  color: #0f172a;
  letter-spacing: .2px;
  flex: 1 1 auto;
}

.geoAskClose{
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: rgba(15,23,42,.65);
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.geoAskClose:hover{ background: rgba(2,6,23,.06); }

.geoAskBody{
  padding: 14px 16px 16px;
}

.geoAskText{
  margin: 0 0 14px;
  color: #334155;
  font-size: 15px;
  line-height: 1.35;
}

.geoAskActions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.geoAskBtn{
  border: 0;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  flex: 1 1 170px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}

/* geoAskBtnPrimary unificado (cor + pulso) */
.geoAskBtnPrimary{
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37,99,235,.25);
  position: relative;
  animation: geoPulse 1.6s infinite;
}
.geoAskBtnPrimary:hover{ filter: brightness(.97); }

.geoAskBtnGhost{
  background: rgba(2,6,23,.06);
  color: #0f172a;
}
.geoAskBtnGhost:hover{ background: rgba(2,6,23,.10); }

.geoAskMini{
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
  display:none;
}

@media (max-width: 420px){
  .geoAskText{ font-size: 14px; }
  .geoAskBtn{ width: 100%; flex: 1 1 100%; }
}

.geoAskDont{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:12px;
  font-size:14px;
  color:#334155;
  user-select:none;
  text-align:center;
}

/* Desktop: alinhar à esquerda */
@media (min-width: 821px){
  .geoAskDont{
    justify-content:flex-start;
    text-align:left;
    padding-left:6px;
  }
}

.geoAskDont input{
  width:18px;
  height:18px;
  accent-color:#2563eb;
}

@keyframes geoPulse{
  0%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37,99,235,0.55);
  }
  70%{
    transform: scale(1.05);
    box-shadow: 0 0 0 14px rgba(37,99,235,0);
  }
  100%{
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37,99,235,0);
  }
}
