/* Definir a fonte Poppins */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-style: normal;
  font-display: swap;
}

/* Layout Principal */
.products-main-container {
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  align-items: flex-start;
}

/* Caixa do filtro */
.filter-box {
  width: 312px;
  border: 1.5px solid #d1d1d1;
  border-radius: 4px;
  background: #fff;
  padding: 16px;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  position: sticky;
  top: 180px;
}

/* Conteúdo à direita */
.products-content {
  flex: 1;
  min-width: 0;
}

/* Header do conteúdo */
.products-header {
  margin-bottom: 40px;
}

.header-top-title {
  margin-bottom: 24px;
}

.products-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-weight: bold;
  font-size: 32px;
  line-height: 100%;
  letter-spacing: -0.9px;
  color: #161616;
  margin: 0;
}

.header-filters {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* Search Input */
.search-container {
  width: 500px;
}

.search-input {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  border: 1px solid #D1D1D1;
  background: #FFFFFF;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #888888;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-input::placeholder {
  color: #888888;
}

.search-input:focus {
  border-color: #EB0000;
}

/* Dropdown de Ordenação */
.sort-dropdown {
  position: relative;
  width: 213px;
}

.dropdown-toggle {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  border: 1px solid #D1D1D1;
  background: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #888888;
}

.dropdown-toggle:focus {
  border: 4px solid rgba(235, 0, 0, 0.04);
  border: 1px solid #EB0000;
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.sort-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 213px;
  max-height: 280px;
  background: #FFFFFF;
  border: 1px solid #F6F6F6;
  border-radius: 8px;
  box-shadow: 0px 12px 12px 0px rgba(46, 68, 35, 0.1);
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.sort-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  width: 100%;
  height: 56px;
  padding: 16px;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #161616;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #F6F6F6;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #f8f8f8;
}

/* Grid de Cards */
.cards-grid-container {
  width: 919.2px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 46px 6px;
  width: 100%;
}

/* Estilos do Filtro */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.filter-title {
  font-size: 16px;
  font-weight: 600;
  color: #eb0000;
}

.btn-reset {
  width: 84px;
  height: 37px;
  border-radius: 8px;
  border: 1.5px solid #eb0000;
  background: transparent;
  color: #eb0000;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.filter-collapse {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
}

.filter-label {
  font-size: 16px;
  font-weight: 500;
  color: #161616;
}

.collapse-toggle {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapse-toggle svg {
  width: 15.84px;
  height: 7.1px;
  transition: transform 0.3s ease;
}

.collapse-toggle.closed svg {
  transform: rotate(180deg);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #5D5D5D;
}

.filter-options {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.filter-options:not(.open) {
  display: none;
}

.filter-option input {
  display: none;
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1.5px solid #d1d1d1;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.check-icon {
  width: 13.33px;
  height: 9.17px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-option input:checked+.custom-checkbox {
  background: #EB0000;
  border: 1.5px solid #EB0000;
}

.filter-option input:checked+.custom-checkbox .check-icon {
  opacity: 1;
}

/* Responsivo */
@media (max-width: 1200px) {
  .products-main-container {
    flex-direction: column;
  }

  .filter-box {
    width: 100%;
    position: static;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 20px;
  }

  .cards-grid-container {
    width: 100%;
  }

  .search-container {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .header-filters {
    flex-direction: column;
  }

  .sort-dropdown {
    width: 100%;
  }
}

/* Estilos dos Cards */
.cards-grid .card {
  width: 100%;
  height: 100%;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 46px 6px;
  width: 100%;
}

/* Paginação */
.pagination-container {
  width: 910px;
  height: 52px;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 167px;
  width: 100%;
  height: 100%;
  max-width: 910px;
}

/* Botões de navegação */
.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 134px;
  height: 52px;
  border-radius: 8px;
  border: 1.5px solid #D1D1D1;
  background: #FFFFFF;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #888888;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover {
  border-color: #EB0000;
  color: #EB0000;
}

.pagination-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.pagination-prev {
  padding: 14px 16px 14px 16px;
}

.pagination-next {
  padding: 14px 16px 14px 16px;
  flex-direction: row-reverse;
}

/* Números das páginas */
.pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 308px;
  height: 52px;
  margin: 0 auto;
}

.page-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1.5px solid #D1D1D1;
  background: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #161616;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number:hover {
  border-color: #EB0000;
  color: #EB0000;
}

.page-number.active {
  background: #EB0000;
  border: 1.5px solid #FFFFFF;
  color: #FFFFFF;
  font-weight: 600;
}

.page-ellipsis {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #888888;
  padding: 0 8px;
}

/* Responsivo */
@media (max-width: 1200px) {
  .pagination-container {
    width: 100%;
    margin-left: 0;
    padding: 0 20px;
  }
  
  .pagination {
    gap: 40px;
    justify-content: center;
  }
  
  .pagination-pages {
    width: auto;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .pagination {
    flex-direction: column;
    gap: 20px;
    height: auto;
  }
  
  .pagination-pages {
    order: -1;
  }
  
  .page-number {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .pagination-btn {
    width: 120px;
    height: 44px;
    font-size: 14px;
  }
}


/* ======= MOBILE (produtos-novos-style.css) ======= */
@media (max-width: 768px) {

  /* ===== CONFIGURAÇÃO GERAL ===== */
  html,
  body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  main {
    width: 100%;
  }

  #header,
  #footer {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .filter-box,
  .products-title {
    display: none !important;
  }

    .products-main-container {
        flex-direction: column;
        align-items: center;
        padding: 12px 0;
        gap: 12px !important;
        grid-template-columns: none !important;
    }

  .products-header {
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .header-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .header-filters > * {
    width: 50%;
    box-sizing: border-box;
  }

  .search-container,
  .sort-dropdown {
    width: 100%;
  }

  .cards-grid-container {
    width: 328px;
    margin: 12px auto;
    box-sizing: border-box;
  }

  .cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 218px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .search-input {
    height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .dropdown-toggle {
    height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .pagination-container {
    width: 328px;
    margin: 8px auto 24px auto;
    box-sizing: border-box;
    padding: 0;
  }

  .pagination {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    box-sizing: border-box;
  }

  .pagination-pages {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
  }
}
