/* ==========================================================================
   SEÇÃO ANÚNCIO CAVALOS (PAGE 1): ESPAÇAMENTO E PADRÃO CELULAR (1 COLUNA)
   ========================================================================== */

.busca-lista-css {
  margin-top: 10px !important; /* Espaço de 10px do conteúdo acima */
}

/* Força 1 coluna por padrão no celular direto no wrapper do conteúdo com infinite scroll */
.busca-lista-css .views-infinite-scroll-content-wrapper {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 15px !important;
  width: 100% !important;
  justify-items: center !important;
}

/* Remove os elementos invisíveis do clearfix que quebram o grid */
.busca-lista-css .views-infinite-scroll-content-wrapper::before, 
.busca-lista-css .views-infinite-scroll-content-wrapper::after,
.busca-lista-css .view-content::before,
.busca-lista-css .view-content::after {
  display: none !important;
  content: none !important;
}

/* CAIXA EM VOLTA (Estilo Facebook / Anúncios Gratuitos) */
.busca-lista-css .views-row {
  border: 1px solid #bbd1df !important; /* Borda azul clara */
  border-radius: 8px !important; /* Cantos arredondados */
  padding: 15px !important; /* Espaço interno */
  background-color: #ffffff !important; /* Fundo branco */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important; /* Sombra leve */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  margin: 0 auto !important;
}

/* Ajustes dos textos e títulos internos */
.busca-lista-css .views-field {
  margin-bottom: 6px;
  width: 100% !important;
}

.busca-lista-css .views-field-title a {
  font-weight: bold !important;
  text-decoration: none !important;
  color: #333333 !important;
}

/* Destaca o valor total em azul no rodapé do cartão */
.busca-lista-css .views-field-field-valor-total {
  font-weight: bold !important;
  color: #0B3C5D !important;
  margin-top: auto;
}

/* Oculta label antiga miúda caso apareça na busca para manter o visual limpo */
.busca-lista-css .views-label-field-valor-total {
  display: none !important;
}

/* Imagens totalmente responsivas e centralizadas */
.busca-lista-css .views-row img {
  display: block !important;
  margin: 0 auto 10px auto !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 4px !important;
}

/* ==========================================================================
   TRANSIÇÃO FLUIDA DE COLUNAS (6 → 4 → 3 → 2 → 1)
   ========================================================================== */

/* CELULARES GRANDES / SMARTPHONES HORIZONTAIS (Mínimo de 576px): 2 colunas */
@media screen and (min-width: 576px) {
  .busca-lista-css .views-infinite-scroll-content-wrapper {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* TABLETS (Mínimo de 768px): 3 colunas */
@media screen and (min-width: 768px) {
  .busca-lista-css .views-infinite-scroll-content-wrapper {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* LAPTOPS / MONITORES PEQUENOS (Mínimo de 1024px): 4 colunas */
@media screen and (min-width: 1024px) {
  .busca-lista-css .views-infinite-scroll-content-wrapper {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* COMPUTADORES E MONITORES GRANDES (Mínimo de 1400px): 6 colunas */
@media screen and (min-width: 1400px) {
  .busca-lista-css .views-infinite-scroll-content-wrapper {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}
