/* ===============================
   SEÇÕES DE CATÁLOGOS
=============================== */

.catalog-section {
  margin-bottom: 60px;
}

/* ===============================
   CARROSSEL HORIZONTAL (NETFLIX STYLE)
=============================== */

.catalog-carousel-wrapper {
    position: relative;
}

/* área de scroll */

.catalog-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
	
	/* Remove scrollbar visual (mantém scroll funcional) */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE antigo (só por segurança) */
}


/* scrollbar */

.catalog-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Edge, Safari */
}


/* ===============================
   CARD / ITEM
=============================== */

.catalog-item {
    flex: 0 0 240px;
    scroll-snap-align: start;
}

/* responsivo */

@media (max-width: 992px) {
    .catalog-item {
        flex: 0 0 200px;
    }
}

@media (max-width: 576px) {
    .catalog-item {
        flex: 0 0 160px;
    }
}

/* ===============================
   CARD VISUAL
=============================== */

.catalog-card {
  background: #f8fbfc;
  border: 2px solid #eee;
  border-radius: 6px;
  padding: 0px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
	
  /* ALINHAMENTO DOS LINKS PARA BAIXO */
  display: flex;
  flex-direction: column;
}


/* animação Netflix suave */

.catalog-card:hover {
	transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    z-index: 2;
}


.catalog-card img {
  width: 100%;
  height: 349px;
  object-fit: contain;   /* mostra a imagem inteira */
  border-radius: 4px;
  object-position: top center;
  display: block;
  margin: 0;
  padding: 0;
}

@media (max-width: 576px) {
    .catalog-card img {
        height: 140px;
    }
}

.catalog-title {
  font-size: 14px;
  font-weight: 600;
  margin: 5px;
  /*AJUSTE NO TAMANHO DO CARD INDIFERENTE DO TAMANHO DO CONTEÚDO*/
  display: -webkit-box;
  -webkit-line-clamp: 2;   /* máximo 2 linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-desc {
  font-size: 12px;
  color: #666;
  height: 40px;
  overflow: hidden;
  margin: 4px;
  /*AJUSTE NO TAMANHO DO CARD INDIFERENTE DO TAMANHO DO CONTEÚDO*/
  display: -webkit-box;
  -webkit-line-clamp: 2;  /* máximo 2 linhas */
  -webkit-box-orient: vertical;
}


.catalog-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;   /* EMPURRA PARA O FUNDO DO CARD */
  padding: 8px;       /* dá um respiro tipo rodapé */
  /*alinhamento dos links para baixo*/
}


.catalog-actions a {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  font-weight: bold;
  font-size:14px;
}

@media (max-width: 576px) {
  .catalog-actions {
    flex-direction: column;
  }
}

.catalog-hidden {
  display: none;
}

/* ===============================
   SETAS DO CARROSSEL
=============================== */

.catalog-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: none;

    background: rgba(0,0,0,0.6);
    color: #fff;

    font-size: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 10;

    box-shadow: 0 4px 10px rgba(0,0,0,.25);
    transition: all .2s ease;
}

/* posições */

.catalog-arrow.left {
    left: -18px;
}

.catalog-arrow.right {
    right: -18px;
}

/* hover */

.catalog-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(0, 138, 151, 0.75);
}

/* mobile */

@media (max-width: 768px) {

    .catalog-arrow {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .catalog-arrow.left {
        left: -10px;
    }

    .catalog-arrow.right {
        right: -10px;
    }
}

/* ===============================
   FADE LATERAL
=============================== */

.catalog-carousel-wrapper::before,
.catalog-carousel-wrapper::after {

    content: "";
    position: absolute;
    top: 0;

    width: 60px;
    height: 100%;

    pointer-events: none;
    z-index: 5;
}

/* esquerda */

.catalog-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(
        to right,
        #ffffff 0%,
        rgba(255,255,255,0) 100%
    );
}

/* direita */

.catalog-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(
        to left,
        #ffffff 0%,
        rgba(255,255,255,0) 100%
    );
}

/* ===============================
   HR PERSONALIZADO
=============================== */

.hr-catalogos {
  border: none;
  height: 1px;
  background-color: #CCCCCC;
  width: 100%;
  margin: 30px auto;
}

/* ===============================
   AJUSTE PAGE-HEADER E ÁREA DE BUSCA
=============================== */

/* Remove espaço extra entre header e busca */
.page-header-catalogos {
    padding-bottom: 15px !important; /* reduz espaço interno inferior */
    margin-bottom: 0 !important;     /* remove margem inferior */
}

/* Área de busca */
.catalogos-busca {
    margin-top: 0 !important;         /* remove espaço acima */
    padding-top: 15px;
    padding-bottom: 15px;
    background-color: #f5f5f5;
	margin-bottom: 40px; /* esoaço abaixo */
}

/* Form wrapper: força alinhamento */
.catalogos-busca-wrapper {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center !important;   /* verticalmente alinhado */
    gap: 10px;
}

/* Input de busca */
.catalogos-input {
    flex: 1 1 auto !important;
    height: 45px !important;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    margin-bottom: 0 !important; /* remove margem do bootstrap */
}

/* Botão buscar */
.catalogos-btn {
    height: 45px !important; /* mesma altura do input */
    padding: 0 25px;
    font-size: 12px !important;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0 !important; /* remove margem inferior */
}

.catalogos-btn {
    background-color: #008a97 !important;  /* sua cor personalizada */
    border-color: #008a97 !important;     /* mesma cor para a borda */
    color: #fff;               /* cor do texto */
	padding: 6px 14px;         /* menos padding deixa o botão menor */
    font-size: 12px !important;         /* fonte menor */
    line-height: 1.4;        /* alinhamento vertical melhor */
    border-radius: 4px;      /* cantos arredondados */
}

.catalogos-btn:hover {
    background-color: #006f7b !important;  /* cor ao passar o mouse */
    border-color: #006f7b !important;
    color: #fff;
}

/* Active (clicado/pressionado): mantém a mesma cor do normal ou do hover, sem "afundar" */
.catalogos-btn:active,
.catalogos-btn:active:hover {
    background-color: #008a97 !important;   /* ou use #006f7b se quiser manter o hover durante o clique */
    border-color: #008a97 !important;
    color: #fff !important;
    box-shadow: none !important;            /* remove o inset shadow do Bootstrap */
    transform: none !important;             /* evita qualquer translate ou scale indesejado */
    outline: none !important;               /* remove outline padrão em alguns navegadores */
}

/* Responsivo: empilha campo + botão em telas pequenas */
@media (max-width: 576px) {
    .catalogos-busca-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .catalogos-input,
    .catalogos-btn {
        width: 100% !important;
    }

    .catalogos-btn {
        margin-top: 10px !important;
    }
}


.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* ← igual ao carrossel */
    gap: 20px;          /* ← igual ao gap do carrossel (era 24px, agora 20px para consistência) */
    padding: 0 10px;
}

/* Garante que os cards dentro do grid tenham o mesmo visual/estrutura */
.catalog-grid .catalog-item {
    width: 100%;           /* ocupa a célula do grid */
    max-width: 240px;      /* não deixa crescer além do padrão do carrossel */
    margin: 0 auto;        /* centraliza se a célula for maior */
}

/* Mesma altura e proporção da imagem que no carrossel */
.catalog-grid .catalog-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-grid .catalog-card img {
    height: 349px;              /* mesma altura fixa do carrossel */
    object-fit: contain;
    object-position: top center;
}

/* Em mobile, mantém consistente */
@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-grid .catalog-card img {
        height: 140px;          /* mesma altura mobile do carrossel */
    }
}


/* Container que alinha título e botão na mesma linha */
.catalog-section .d-flex {
    width: 100%;
}

/* Estilo do link "Limpar busca" – bem discreto */
.reset-busca-link {
    font-size: 13px;
    color: #777;
    text-decoration: none;
    font-weight: normal;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    background: transparent;
}

.reset-busca-link:hover,
.reset-busca-link:focus {
    color: #008a97;              /* cor principal do site */
    text-decoration: underline;
    background: rgba(0, 138, 151, 0.05); /* fundo muito sutil ao hover */
}

/* Em telas pequenas: mantém alinhado, mas se precisar empilhar, pode ajustar */
@media (max-width: 576px) {
    .reset-busca-link {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    /* Opcional: se ficar apertado, empilha abaixo do título */
    /* .d-flex { flex-direction: column; align-items: flex-start; } */
}



/* Container do header: força mesma linha, sem quebra */
.catalog-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important; /* ou between para máxima separação */
    flex-wrap: nowrap !important;              /* IMPEDIR quebra de linha */
    width: 100% !important;
    gap: 16px;                                 /* espaço mínimo entre título e link */
}

/* Título: não permite quebra interna e ocupa o espaço necessário */
.catalog-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;            /* impede quebra no título longo */
    flex-shrink: 1;                            /* permite encolher um pouco se necessário */
    overflow: hidden;                          /* segurança extra */
    text-overflow: ellipsis;                   /* corta com ... se ficar muito longo */
}

/* Link de limpar: não quebra, fica na direita */
.reset-busca-link {
    font-size: 13px;
    color: #777;
    text-decoration: none;
    font-weight: normal;
    white-space: nowrap !important;            /* impede quebra no texto do link */
    flex-shrink: 0;                            /* NÃO deixa encolher o link */
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.reset-busca-link:hover,
.reset-busca-link:focus {
    color: #008a97;
    text-decoration: underline;
    background: rgba(0, 138, 151, 0.05);
}

/* Em mobile: se realmente apertar muito, permite encolher o título, mas mantém na mesma linha */
@media (max-width: 768px) {
    .catalog-header {
        gap: 10px;
    }
    
    .catalog-header h2 {
        font-size: 1.5rem;  /* ajuste se o título ficar grande demais */
    }
    
    .reset-busca-link {
        font-size: 12px;
        padding: 3px 6px;
    }
}


/* ===============================
   BOTÕES DOS CATÁLOGOS
=============================== */

.catalog-actions a {
    background-color: #008a97;
    border: 1px solid #008a97;
    color: #fff !important;

    border-radius: 1px; !important;
    padding: 1px 2px  !important;

    transition: background-color 0.2s ease, border-color 0.2s ease;

    text-decoration: none;
}

/* Hover */

.catalog-actions a:hover {
    background-color: #006f7b;
    border-color: #006f7b;
    color: #fff !important;
}

/* Remove efeito outline/bootstrap ao clicar */

.catalog-actions a:focus,
.catalog-actions a:active {
    outline: none !important;
    box-shadow: none !important;
}


/* ===============================
   FILTROS DE SEGMENTOS (DISCRETOS)
=============================== */

.catalogos-filtros {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 12px;
}

.filtro-segmento {
    font-size: 10px !important; 
    color: #777;                 /* cinza suave */
    text-decoration: none;
    font-weight: normal;
    transition: color 0.2s ease;
    padding: 8px 2px !important; 
}

.filtro-segmento:hover {
    color: #008a97;              /* verde institucional no hover */
	font-weight: bold;
}