
/* ===============================
   CONTAINER GERAL
================================= */
.produtos-container {
  padding: 100px 10px;
  max-width: 1550px;
  margin: 0 auto;
  width: 100%;
}

.categoria-produtos {
  width: 100%;
  max-width: 1550px;
  height: 300px;
  background-color: #fff;
  z-index: 998;
  position: fixed;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 50px;
}

/* ===============================
   BOTÕES DE CATEGORIA
================================= */
.categoria-produtos .filtro-btn {
  font-weight: 700;
  border-radius: 40px;
  padding: 8px 18px;
  border: 2px solid;
  transition: all 0.3s ease;
}

.categoria-produtos .filtro-btn[data-categoria="Gravadores"],
.categoria-produtos .filtro-btn[data-categoria="Câmeras"],
.categoria-produtos .filtro-btn[data-categoria="Acessorios"],
.categoria-produtos .filtro-btn[data-categoria="Motores"],
.categoria-produtos .filtro-btn[data-categoria="Informática"],
.categoria-produtos .filtro-btn[data-categoria="Roteadores"] {
  background-color: #170F99;
  border-color: #170F99;
  color: #fff;
}

.categoria-produtos .filtro-btn[data-categoria="todos"] {
  background-color: #ffffff;
  border-color: #170F99;
  color: #170F99;
  padding: 8px 30px;
}

.categoria-produtos .filtro-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* ===============================
   ESTILOS PARA ATIVO + ZOOM
================================= */
.filtro-btn.ativo,
.subfiltro-btn.ativo {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05);
}

.filtro-btn.ativo {
  background-color: #ff7a00 !important;
  border-color: #ff7a00 !important;
  color: #ffffff !important;
}

.categoria-produtos .filtro-btn[data-categoria="todos"].ativo {
  background-color: #ff7a00 !important;
  border-color: #ff7a00 !important;
  color: #ffffff !important;
}

.subfiltro-btn.ativo {
  background-color: #ff7a00 !important;
  border-color: #ff7a00 !important;
  color: #ffffff !important;
}

.filtro-btn.ativo:hover,
.subfiltro-btn.ativo:hover {
  background-color: #ff7a00 !important;
  border-color: #ff7a00 !important;
  color: #fff !important;
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(255, 122, 0, 0.8);
}

/* ===============================
   ZOOM DAS IMAGENS DE PRODUTO
================================= */
.produto-img-cameras {
  overflow: hidden;
  cursor: zoom-in;
}

.produto-img-cameras .produto-img {
  transition: transform 0.4s ease;
}

.produto-img-cameras:hover .produto-img {
  transform: scale(1.15); /* zoom ao passar o mouse */
}



/* ===============================
   WRAPPER SIDEBAR + PRODUTOS
================================= */
.produtos-wrapper {
  padding-top: 130px;
  display: flex;
  gap: 20px;
  flex-wrap: nowrap; /* sidebar lateral fixa */
  align-items: flex-start;
}

/* -------------------------------
   SIDEBAR
--------------------------------- */
#sidebar {
  width: 220px;
  flex-shrink: 0; /* não encolhe */
  position: sticky;
  top: 260px;
  z-index: 998;
}

/* ===============================
   BOTÕES DE SUBFILTRO - SIDEBAR
================================= */
#subfiltros button {
  background-color: #170f99;
  color: #ffffff;
  border: 2px solid #170f99;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 40px;
  cursor: pointer;
  text-align: center;
  margin-bottom: 8px;
  display: block;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#subfiltros button:hover {
  background-color: #ffffff;
  color: #170f99;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(23, 15, 153, 0.3);
}

#subfiltros button[data-subcategoria="todos"] {
  background-color: #ff7a00;
  border-color: #ff7a00;
}

/* ===============================
   GRID PRODUTOS - Desktop (grande)
================================= */
.produtos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start; /* alinhamento padrão */
  flex: 1; /* ocupa o restante do espaço ao lado da sidebar */
}

/* Cada coluna de produto */
.produto-col {
  flex: 0 1 calc(33.333% - 20px); /* 3 cards por linha */
  display: flex;
  justify-content: center; /* centraliza o card dentro da coluna */
  box-sizing: border-box;
  margin-bottom: 20px;
}

/* Se houver menos de 3 cards, centraliza o grupo */
.produtos-row:has(.produto-col:nth-child(1):nth-last-child(1)),
.produtos-row:has(.produto-col:nth-child(1):nth-last-child(2)) {
  justify-content: center;
}

/* ===============================
   CARD DO PRODUTO
================================= */
.produto-bloco {
  width: 100%;      /* ocupa todo espaço disponível da coluna até max-width */
  max-width: 500px; /* largura máxima do card */
  min-height: 250px;
 
  background-color: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(23, 15, 153, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.produto-bloco:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(23, 15, 153, 0.25);
}

/* ===============================
   DETALHES (HEIGHT SUAVE)
================================= */
.detalhes {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background: #ffffff;
  overflow: hidden;
  padding: 0 10px;
  box-sizing: border-box;
  transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              padding 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.produto-bloco.ativo .detalhes {
  height: 100%;
  padding: 10px;
  overflow-y: auto;
}

.detalhes p {
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

/* ===============================
   BOTÕES MAIS / MENOS DETALHES
================================= */
.mais-detalhes,
.menos-detalhes {
  position: relative;
  display: block;
  margin: 15px auto 0;
  padding: 12px 30px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background-color: #170F99;
  color: #ffffff;
  border: none;
  overflow: hidden;
  z-index: 1;
}

.mais-detalhes span,
.menos-detalhes span {
  position: relative;
  z-index: 2;
}

.mais-detalhes::before,
.menos-detalhes::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 40px;
  background: linear-gradient(
    90deg,
    #ffffff,
    #ff7a00,
    #ffffff,
    #ff7a00,
    #ffffff
  );
  background-size: 300% 300%;
  animation: borda-girando 3s linear infinite;
  z-index: 0;
}

.mais-detalhes::after,
.menos-detalhes::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 38px;
  background-color: #170F99;
  z-index: 1;
}

.mais-detalhes:hover,
.menos-detalhes:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(23, 15, 153, 0.45);
}

.produto-bloco.ativo .menos-detalhes {
  display: block;
}

.produto-bloco.ativo .mais-detalhes {
  display: none;
}

@keyframes borda-girando {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ===============================
   IMAGEM / SLIDER
================================= */
.produto-img-cameras {
  width: 100%;
  max-width: 500px;
  min-width: 400px;
  background: linear-gradient(180deg, #f4f6ff, #ffffff);
  padding: 24px;
  text-align: center;
  position: relative;
}

.slider-main {
  overflow: hidden;
  position: relative;
  margin-left: 17px;
  margin-right: 17px;
}

.slider-main img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.slider-main:hover {
  cursor: zoom-in;
}

/* ===============================
   MINIATURAS
================================= */
.slider-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.slider-thumbs img {
  width: 80px;
  height: 65px;
  object-fit: contain;
  background-color: #f0f0f0;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: transform 0.3s ease, border 0.3s ease;
}

.slider-thumbs img:hover {
  transform: scale(1.05);
}

.slider-thumbs img.active {
  border-color: #170f99;
}

/* ===============================
   SETAS SLIDER
================================= */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(23, 15, 153, 0.8);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow-left { left: 10px; }
.slider-arrow-right { right: 10px; }

/* ===============================
   INFO PRODUTO
================================= */
.produto-info {
  padding: 22px;
  text-align: center;
}

.produto-info .produto-nome,
.produto-info .produto-modelo {
  color: #170F99;
  font-weight: 600;
  font-size: 16px;
}

.detalhes {
  background-color: #170f99;
}

.detalhes p {
  color: #fff;
  font-weight: 600;
}

.produto-modelo {
  font-size: 13px;
  font-weight: 700;
  color: #7b7fb3;
}







/* ==========================
   PAGINAÇÃO SUAVE
========================== */
.paginacao-produtos {
  font-size: 14px;
  color: #170F99;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap; /* para telas pequenas */
  gap: 10px;
  overflow: hidden; /* evita "quebra" de animação */
}

.numeros-paginas {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  transition: all 0.3s ease; /* anima a entrada/saída dos números */
}

.pagina-btn {
  background: none;
  border: 2px solid transparent;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.3s ease; /* suaviza hover e mudança de estado */
  color: #170F99;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.3s forwards;
}

.pagina-btn:hover {
  background-color: #ff7a00;
  color: #fff;
}

.pagina-btn.ativa {
  background-color: #ff7a00;
  color: #fff;
  border-color: #ff7a00;
}

/* Botão "Próximo" */
.pagina-btn.proximo {
  margin-left: 10px;
  font-weight: 700;
  background-color: #ff7a00;
  color: #fff;
  border-color: #ff7a00;
}

.pagina-btn.proximo:hover {
  background-color: #ffffff;
  color: #ff7a00;
  border-color: #ff7a00;
}

/* Botão "Anterior" */
.pagina-btn.anterior {
  margin-right: 10px;
  font-weight: 700;
  background-color: #ff7a00;
  color: #fff;
  border-color: #ff7a00;
}

.pagina-btn.anterior:hover {
  background-color: #ffffff;
  color: #ff7a00;
  border-color: #ff7a00;
}

/* Reticência (…) */
.reticencia {
  font-weight: 600;
  color: #170F99;
  padding: 6px 8px;
}

/* ==========================
   ANIMAÇÃO SUAVE
========================== */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}







/* Até 1300px → 3 cards */
@media (max-width: 1300px) {
  .produto-col {
    flex: 0 1 calc(33.333% - 20px);
  }
}

@media (max-width: 1280px) and (max-height: 800px) {
  .categoria-produtos {
    height: 240px;
  }

  .produtos-wrapper {
    padding-top: 30px;
  }

}


/* Até 1300px → 3 cards */
@media (max-width: 1270px) {
  .produto-col {
    flex: 0 1 calc(50% - 20px);
  }
}


@media (max-width: 1024px) {
  .produto-col {
    flex: 0 1 calc(90% - 20px);
  }
}

@media (max-width: 1024px) and (max-height: 600px) {
  .categoria-produtos {
    height: 240px;
  }
}



/* -------------------------------
   Tablets grandes / desktops médios (abaixo de 995px)
--------------------------------- */
@media (max-width: 995px) {

  /* ===============================
     BARRA DE CATEGORIAS FIXA
  ================================= */
  .categoria-produtos {
    height: 260px;
    padding-bottom: 40px;
  }

  /* ===============================
     WRAPPER PRODUTOS
  ================================= */
  .produtos-wrapper {
    padding-top: 10px;
    flex-direction: column; /* empilha os produtos */
    align-items: center;
    gap: 30px;
  }


  /* ===============================
     CARDS
  ================================= */
  .produto-col {
    flex: 0 1 70%; /* 1 card grande por linha */
    max-width: 70%;
    margin: 0 auto 20px;
  }

  .produto-bloco {
    max-width: 700px;
  }

  .produto-img-cameras {
    max-width: 700px;
    width: 100%;
    min-width: 300px;
  }

  .produto-bloco.ativo .detalhes {
    height: 99%;
  }


  .slider-main img {
    max-height: 300px;
  }



}


@media (max-width: 912px) {

  .categoria-produtos {
    height: 320px;
  }

}

/* -------------------------------
   Tablets pequenos / telas médias (abaixo de 850px)
--------------------------------- */
@media (max-width: 850px) {

  .produto-col {
    flex: 0 1 80%;
    max-width: 80%;
  }

  .produto-img-cameras {
    max-width: 600px;
    min-width: 300px;
    width: 100%;
  }

  .categoria-produtos {
    height: 300px;
  }

}


@media (max-width: 768px) {

  .categoria-produtos {
    height: 300px;
  }

}

/* -------------------------------
   Mobile grande / tablets pequenos (abaixo de 600px)
--------------------------------- */
@media (max-width: 600px) {

  .produtos-container {
    padding: 40px 10px;
  }

  .categoria-produtos {
    height: 230px;
  }

  .categoria-produtos .filtro-btn {
    padding: 6px 10px;
    font-size: 13px;
    white-space: normal;
  }

  .produtos-wrapper {
    gap: 40px;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 140px;
  }

  .produto-col {
    flex: 0 1 90%;
    max-width: 90%;
    margin: 0 auto 20px;
  }

  .produto-bloco {
    min-height: 400px;
  }

  .produto-bloco.ativo .detalhes {
    height: 99%;
    padding: 10px 20px;
    overflow-y: auto;
  }

  .produto-img-cameras {
    max-width: 500px;
    min-width: 280px;
    width: 100%;
  }

  .slider-main img {
    max-height: 340px;
  }

  .produto-info {
    padding: 8px 6px;
    font-size: 16px;
  }

  .slider-thumbs img {
    width: 70px;
    height: 55px;
  }

  .mais-detalhes,
  .menos-detalhes {
    padding: 12px 18px;
    font-size: 13px;
  }
}

@media (max-width: 500px) {

  .categoria-produtos {
    height: 250px;
  }

}

/* -------------------------------
   Mobile pequeno / smartphones (abaixo de 400px)
--------------------------------- */
@media (max-width: 400px) {

  .produtos-container {
    padding: 30px 5px;
  }

  .categoria-produtos .filtro-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .produto-info {
    padding: 6px 4px;
    font-size: 14px;
  }

  .produto-modelo {
    font-size: 10px;
  }

  .produto-bloco {
    min-height: 350px;
  }

  .produto-bloco.ativo .detalhes {
    height: 99%;
    padding: 8px 10px;
  }

  .produto-img-cameras {
    max-width: 400px;
    min-width: 250px;
    width: 100%;
  }

  .slider-thumbs img {
    width: 60px;
    height: 50px;
  }

  .mais-detalhes,
  .menos-detalhes {
    padding: 10px 14px;
    font-size: 12px;
  }
}



@media (max-width: 350px) {

  .produtos-wrapper {
    margin-top: 140px;
  }

  .categoria-produtos {
    height: 290px;
  }

}

