









/* ================================
   CATÁLOGO DE PRODUTOS
   ================================ */

/* Container geral do catálogo */
.catalog-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

/* Grid dos produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Card de produto */
.product-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.15);
    padding: 15px;
    text-align: center;
    transition: 0.2s ease-in-out;
    border: 1px solid #f0f0f0;
}

/* Hover do produto */
.product-card:hover {
    transform: translateY(-4px);
}

/* Nome do produto */
.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 10px 0;
}

/* Preço */
.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #008f39;
    margin-bottom: 12px;
}

/* Botão adicionar */
.btn-add {
    background: #008f39;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: 0.2s;
}

.btn-add:hover {
    background: #006d2c;
    transform: scale(1.05);
}

/* Botão finalizar compra */
.btn-finalizar {
    background: #25d366;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    margin-top: 20px;
    display: block;
    width: 100%;
    transition: 0.2s;
}

.btn-finalizar:hover {
    background: #1ebe57;
}

/* Barra de pesquisa fixa */
.search-bar-container {
    width: 100%;
    background: #ffffff;
    padding: 12px 20px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
}

.search-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d9d9d9;
    font-size: 16px;
}

.catalog-container {
    padding-top: 90px; /* espaço para a barra de pesquisa fixa */
}



/* ============================= */
/* CATEGORIAS */
/* ============================= */

.categories-wrapper {
  margin: 20px 0;
}

/* DESKTOP */
.category-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.category-bar button {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.category-bar button:hover,
.category-bar button.active {
  background: #2563eb;
  color: #fff;
}

/* MOBILE */
.category-select {
  display: none;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

/* RESPONSIVO */
/* DESKTOP - Layout horizontal */
@media (min-width: 769px) {
  .filters-row {
    margin: 30px 0;
    padding: 0 20px;
  }

  .filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 20px;
  }

  .search-container {
    max-width: 350px;
    flex: 1 1 auto;
  }

  .filter-select {
    width: auto;
    min-width: 160px;
    padding: 14px 24px;
    padding-right: 45px;
    border-radius: 999px;
    font-size: 14px;
    background-position: center, right 18px center;
    background-size: 100% 100%, 12px 12px;
  }

  .category-toggle {
    width: auto;
    padding: 14px 20px;
    border-radius: 999px;
    font-size: 14px;
    gap: 10px;
  }

  .search-bar {
    padding: 15px 20px 15px 48px;
    font-size: 15px;
    border-radius: 999px;
  }

  .search-icon {
    left: 18px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .category-bar {
    display: none;
  }
  .category-select {
    display: block;
  }
}

/* DROPDOWN DE CATEGORIAS */
.categories-dropdown {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  z-index: 1;
}

/* MOBILE: o menu abre como bottom-sheet (ver .dropdown-sheet abaixo) */

@media (min-width: 769px) {
  .categories-dropdown {
    display: inline-block;
    width: auto;
  }
}


.category-toggle {
  padding: 11px 10px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  width: 100%;
  min-height: 44px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.category-toggle i {
  font-size: 13px;
  flex-shrink: 0;
}

.category-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,.35);
}

/* MOBILE: evitar "corte" visual por transform/sombra em áreas sticky */
@media (max-width: 768px) {
  .category-toggle:hover,
  .filter-select:hover {
    transform: none;
    box-shadow: none;
  }
}


.category-menu {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  min-width: 260px;
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  padding: 0;
  z-index: 9999;
  border: 1px solid rgba(37,99,235,.12);
  transform-origin: top left;
  animation: dropdownPop .14s ease-out;
  max-height: min(70vh, 500px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Cabeçalho do menu */
.category-menu-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.category-menu-header i {
  font-size: 16px;
}

/* Container scrollável */
.category-menu-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  flex: 1;
  min-height: 0;
}

/* Separador */
.category-menu-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.15), transparent);
  margin: 6px 12px;
}

/* Itens do menu */
.category-menu-item {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
  transition: all .2s ease;
  margin: 2px 0;
  font-size: 14px;
}

.category-menu-item:hover {
  background: rgba(37,99,235,.08);
  transform: translateX(2px);
}

.category-menu-item.active {
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(37,99,235,.08));
  color: #0b2f88;
  font-weight: 600;
  border-left: 3px solid #2563eb;
}

/* Botão "Todos" com destaque */
.category-menu-all {
  background: rgba(37,99,235,.05) !important;
  font-weight: 600 !important;
}

.category-menu-all:hover {
  background: rgba(37,99,235,.12) !important;
}

.category-menu-all.active {
  background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(37,99,235,.1)) !important;
  border-left: 3px solid #2563eb;
}

/* Conteúdo do item */
.category-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.category-item-content i {
  font-size: 16px;
  color: #2563eb;
  width: 20px;
  text-align: center;
}

.category-menu-item.active .category-item-content i {
  color: #1d4ed8;
}

/* Check mark */
.category-check {
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  animation: checkPop .2s ease;
}

@keyframes checkPop {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.category-menu::-webkit-scrollbar,
.category-menu-scroll::-webkit-scrollbar{
  width: 8px;
}
.category-menu::-webkit-scrollbar-track,
.category-menu-scroll::-webkit-scrollbar-track{
  background: rgba(37,99,235,.05);
  border-radius: 10px;
  margin: 8px 0;
}
.category-menu::-webkit-scrollbar-thumb,
.category-menu-scroll::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  border-radius: 10px;
}
.category-menu::-webkit-scrollbar-thumb:hover,
.category-menu-scroll::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
}

.category-toggle:focus-visible,
.filter-select:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(37,99,235,.18);
}

@keyframes dropdownPop{
  from { opacity: 0; transform: translateY(-6px) scale(.98) translateZ(0); }
  to { opacity: 1; transform: translateY(0) scale(1) translateZ(0); }
}
.hidden {
  display: none;
}

/* ============================= */
/* DROPDOWN - MOBILE BOTTOM SHEET */
/* ============================= */
.dropdown-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 200000;
  pointer-events: auto;
}

body.dropdown-sheet-open{
  overflow: hidden;
}

@media (max-width: 1024px), (pointer: coarse) {
  .category-menu.dropdown-sheet{
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 10px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    z-index: 200001 !important;
    border-radius: 18px;
    max-height: 75vh;
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    animation: sheetUp .18s ease-out;
    pointer-events: auto;
  }

  /* Garantir que os botões dentro do sheet recebam toque normalmente */
  .category-menu.dropdown-sheet .category-menu-item{
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  @keyframes sheetUp{
    from { transform: translateY(12px) translateZ(0); opacity: 0; }
    to { transform: translateY(0) translateZ(0); opacity: 1; }
  }
  
  .category-menu.dropdown-sheet {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force GPU compositing */
  }
}





/* ============================= */
/* FILTROS / PESQUISA MODERNA */
/* ============================= */

/* Centraliza toda a área de busca - MOBILE FIRST */
.filters-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 15px 0;
  padding: 0 5px;
  box-sizing: border-box;
  overflow: visible;
}

/* Container bonito dos filtros - MOBILE FIRST */
.filters-container {
  max-width: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 8px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  box-sizing: border-box;
  overflow: visible;
}

/* Controles com ícone + select (layout moderno e bem visível) */
.filter-control{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  background:
    radial-gradient(1200px 1200px at 10% 0%, rgba(37,99,235,.10), transparent 50%),
    radial-gradient(900px 900px at 100% 10%, rgba(29,78,216,.10), transparent 55%),
    #ffffff;
  border: 1px solid rgba(37,99,235,.16);
  box-shadow:
    0 10px 24px rgba(2,6,23,.08),
    0 1px 0 rgba(255,255,255,.7) inset;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.filter-control-clickable{
  cursor: pointer;
  user-select: none;
}

.filter-control-text{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-control-title{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .25px;
  color: rgba(15,23,42,.60);
}

.filter-control-value{
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-control-chevron{
  color: rgba(29,78,216,.85);
  font-size: 14px;
  flex-shrink: 0;
}

.filter-select-hidden{
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  left: -9999px !important;
}

/* Modal seletor bonito (Categorias/Marcas) */
.filter-picker-modal{
  max-width: 520px;
  width: calc(100% - 24px);
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(0,0,0,.30);
}

.filter-picker-header{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-picker-header h3{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.filter-picker-list{
  max-height: min(70vh, 520px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.filter-picker-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  cursor: pointer;
  transition: .15s ease;
}

.filter-picker-item:hover{
  border-color: rgba(37,99,235,.22);
  background: rgba(37,99,235,.05);
}

.filter-picker-item .badge{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37,99,235,.22);
  flex-shrink: 0;
}

.filter-picker-item .label{
  flex: 1;
  min-width: 0;
  font-weight: 900;
  color: #0f172a;
  text-align: left;
}

.filter-picker-item .check{
  color: #2563eb;
  font-size: 14px;
  flex-shrink: 0;
}

.filter-picker-item.active{
  border-color: rgba(37,99,235,.35);
  background: rgba(37,99,235,.08);
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}

@media (max-width: 768px){
  .filter-picker-modal{
    width: calc(100% - 16px);
    padding: 16px;
    border-radius: 18px;
  }
}
.filter-control > i{
  color: #ffffff;
  font-size: 15px;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 18px rgba(37,99,235,.25);
}

/* Variante “outline” para categoria/marca */
.filter-select.filter-select-outline{
  background: transparent !important;
  color: #0f172a !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  padding-right: 34px !important;
  min-height: 24px !important;
  width: 100% !important;
  font-weight: 800;
  letter-spacing: .2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%231d4ed8' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 14px 14px !important;
}

.filter-select.filter-select-outline:focus{
  outline: none;
}

/* Toque/hover bonito e “profissional” */
.filter-control:focus-within{
  border-color: rgba(37,99,235,.40);
  box-shadow:
    0 14px 34px rgba(2,6,23,.10),
    0 0 0 4px rgba(37,99,235,.14);
}

@media (hover:hover){
  .filter-control:hover{
    transform: translateY(-1px);
    border-color: rgba(37,99,235,.26);
    box-shadow:
      0 16px 40px rgba(2,6,23,.10),
      0 1px 0 rgba(255,255,255,.75) inset;
  }
}

/* Deixar o “Ordenar por” ainda mais destacado */
#filterSort{
  box-shadow: 0 6px 18px rgba(37,99,235,.22);
}

@media (min-width: 769px) {
  .filters-container{
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
    align-items: center;
  }

  .filter-control{
    padding: 12px 14px;
  }
}

/* ============================= */
/* SEARCH BAR MODERNA */
/* ============================= */

.search-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.search-bar {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  background: #f9fafb;
  transition: all .25s ease;
  box-sizing: border-box;
}

.search-bar:focus {
  outline: none;
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #2563eb;
  font-size: 14px;
}












.filter-select {
  padding: 11px 16px;
  padding-right: 40px;
  border-radius: 12px;
  border: none !important;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background-color: #2563eb !important;
  background-image: linear-gradient(135deg, #2563eb, #1d4ed8),
                    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 14px center;
  background-size: 100% 100%, 10px 10px;
  color: #fff !important;
  transition: all .25s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}

/* Garantir que o select fique azul mesmo em navegadores que não suportam gradiente */
select.filter-select {
  background-color: #2563eb !important;
  background-image: linear-gradient(135deg, #2563eb, #1d4ed8),
                    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
}

.filter-select:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,.35);
}

.filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}

.filter-select option {
  background: #fff;
  color: #222;
  padding: 10px;
}