/* ======= Container Principal ======= */
.container_anuncios {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  overflow: hidden;

}

/* ======= Container do Carrossel ======= */
#dynamic-ads-container {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
  will-change: transform;
  scroll-behavior: smooth;
  width: 100%;
  justify-content: flex-start;
  max-width: 1260px;
  overflow: hidden;
  margin: 0 auto;
}

/* ======= Card de Anúncio ======= */
.custom-ad {
  flex: 0 0 300px;
  background-color: var(--cor-fundo-white);
  border-radius: 8px;

  border: 1px solid var(--cor-secundaria); /* ✅ Aqui está a borda */

  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}




/* Área externa da imagem com margem */
.custom-ad-img-container {
  width: 100%;
  max-height: 230px;
  padding: 10px;
  /* margem interna que cria a "borda" colorida */
  background-color: #f0f0f0;
  /* cor de fallback */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;
}

.custom-ad-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  /* arredonda a imagem também */
}


/* Box fixo para conter o logo */
.custom-ad-img-box {
  max-width: 280px;
  max-height: 230px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* A imagem em si */
.custom-ad-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}


/* ======= Tag Exclusivo ======= */
.exclusive-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--cor-destaque-01);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 12px;
  font-weight: bold;
  z-index: 2;
}

/* ======= Informações do Anúncio ======= */
.custom-ad-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  border-top: 1px solid var(--cor-secundaria);;

}

/* ======= Nome do Anunciante ======= */
.custom-nome-fantasia {
  font-weight: bold;
  font-size: 16px;
  color: #222;
  margin: 10px 0 5px;
  line-height: 1.2;
}

/* ======= Descrição ======= */
.custom-title {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
  max-height: 5.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* ======= Linha Divisora ======= */
.custom-divider {
  width: 100%;
  height: 1px;
  background-color: #eee;
  margin: 8px 0;
}

/* ======= Categoria ======= */
.custom-category {
  padding: 10px;
  font-size: 14px;
  color: var(--cor-primaria);
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #eee;
}

/* ======= Botão ======= */
.custom-btn {
  background-color: var(--cor-destaque-01);
  color: #fff;
  padding: 12px 10px;
  text-align: center;
  font-weight: bold;
  border: none;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  font-size: 16px;
  text-transform: uppercase;
  transition: background-color 0.3s;
  margin-top: auto;
}

.custom-btn:hover {
  background-color: #24853b;
}

/* ======= Botões de Navegação ======= */
.ad-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: white;
  border: 5px solid var(--cor-primaria);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  color: #333;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-nav.left {
  left: 10px;
}

.ad-nav.right {
  right: 10px;
}

.ad-nav:hover {
  background-color: #f2f2f2;
}

/* ======= Título da Seção ======= */
.titulo-section h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.titulo-section-icon {
  width: 50px;
  height: auto;
}

.titulo-section-text1 {
  color: black;
  font-size: 24px;
}

.titulo-section-text2 {
  color: var(--cor-primaria);
  font-size: 24px;
}




/* ======= Responsivo ======= */
@media (max-width: 1300px) {
  .container_anuncios {
    max-width: 100%;
  }

  #dynamic-ads-container {
    justify-content: flex-start;
  }
}

/* @media (max-width: 768px) {
    .custom-ad {
      flex: 0 0 80%;
    }
  } */

@media (max-width: 480px) {
  .custom-ad {
    flex: 0 0 100%;
  }
}


@media (max-width: 768px) {
  #dynamic-ads-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    overflow: visible;
  }

  .custom-ad {
    flex: unset;
    width: 100%;
  }

  .ad-nav {
    display: none !important;
  }

  .container_anuncios {
    padding: 10px 15px;
  }

  /* Reduz fonte do nome do anunciante */
  .custom-nome-fantasia {
    font-weight: bold;
    font-size: 14px;
    /* antes era 16px */
    color: #222;
    margin: 10px 0 5px;
    line-height: 1.2;
  }

  /* Reduz fonte da categoria */
  .custom-category {
    padding: 10px;
    font-size: 11px;
    /* antes era 14px */
    color: var(--cor-primaria);
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid #eee;
  }

  /* Padroniza altura do container da imagem */
  .custom-ad-img-container {
    width: 100%;
    height: 150px;
    /* altura fixa para padronizar */
    padding: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 8px 0 0;

  }

}

@media (min-width: 769px) {
  #dynamic-ads-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 colunas fixas */
    gap: 20px;
    overflow: visible;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .custom-ad {
    flex: unset;
    /* remove o flex do layout antigo */
    width: 100%;
  }

  .ad-nav {
    display: none !important;
    /* esconde as setas */
  }
}