/* ===============================
   TIPOGRAFIA (menos serrilhado)
================================= */
html, body{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===============================
   HERO / FILTROS
================================= */
.listing-hero{
  padding: 30px 0 10px;
}

.listing-hero h1{
  font-size: 28px;
  margin-bottom: 18px;
}

.filters{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.filters input,
.filters select{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  min-width: 140px;
}

.filters input:focus,
.filters select:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,107,255,0.15);
  outline: none;
}

.listing-meta{
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* ===============================
   GRID
================================= */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

/* ===============================
   CARD
================================= */
.ad-card{
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  border: 1px solid var(--border);
}

.ad-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.ad-link{
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.ad-body{ min-width: 0; }

/* ===============================
   IMAGEM
================================= */
.ad-media{
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f2f2f2;
  position: relative;
}

.ad-img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===============================
   PLACEHOLDER SEM FOTO
================================= */
.ad-placeholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
  font-size: 13px;
}

.ad-placeholder::before{
  content: "📷";
  font-size: 26px;
  opacity: 0.5;
}

/* ===============================
   CONTEÚDO
================================= */
.ad-body{
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ad-title{
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* linha: categoria • gênero • orientação */
.ad-tagsline{
  margin-top: 4px;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  letter-spacing: .2px;
  overflow-wrap: anywhere;
}

.ad-meta{
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ad-foot{
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-2);
}

/* ===============================
   PAGINAÇÃO
================================= */
.pagination{
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.page-btn{
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}

.page-btn:hover{
  background: var(--surface-2);
}

.page-btn.is-active{
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===============================
   EMPTY STATE
================================= */
.empty{
  padding: 40px 0;
  text-align: center;
}

.empty-title{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-sub{
  font-size: 14px;
  color: var(--muted);
}

/* ===============================
   RESPONSIVO
================================= */
@media (max-width: 768px){
  .filters{
    flex-direction: column;
  }

  .grid{
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
