/* ================================================
   Autocomplete Inteligente - Terra dos Passaros
   ================================================ */

/* Wrapper */
.tpac-wrap {
  font-family: var(--tp-font);



}
.tpac-wrap::-webkit-scrollbar { width: 5px; }
.tpac-wrap::-webkit-scrollbar-thumb { background: #c8d8e8; border-radius: 10px; }

/* Secoes */
.tpac-section {
  border-bottom: 1px solid #edf2f7;
}
.tpac-section:last-child { border-bottom: none; }

.tpac-section-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #8da2b5;
  padding: 10px 14px 4px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tpac-section-title i {
  font-size: 11px;
  color: var(--tp-blue);
}

/* --- Categorias --- */
.tpac-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--tp-text);
  transition: background .12s;
  cursor: pointer;
  border-bottom: 1px solid #f5f8fb;
}
.tpac-cat-item:last-child { border-bottom: none; }
.tpac-cat-item:hover,
.tpac-cat-item.tpac-kb-active {
  background: var(--tp-blue-light);
}
.tpac-cat-arrow {
  font-size: 9px;
  color: var(--tp-blue);
  opacity: .6;
  flex: 0 0 14px;
}
.tpac-cat-nome {
  font-size: 13.5px;
  font-weight: 600;
  flex: 1;
}
.tpac-cat-qtd {
  font-size: 11px;
  color: #8da2b5;
  white-space: nowrap;
}

/* --- Produtos --- */
.tpac-prod-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--tp-text);
  border-bottom: 1px solid #f5f8fb;
  transition: background .12s;
  cursor: pointer;
}
.tpac-prod-item:last-child { border-bottom: none; }
.tpac-prod-item:hover,
.tpac-prod-item.tpac-kb-active {
  background: var(--tp-blue-light);
}

.tpac-prod-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #e2ecf5;
  object-fit: contain;
  background: #f8fbff;
  flex: 0 0 48px;
}

.tpac-prod-info {
  flex: 1;
  min-width: 0;
}
.tpac-prod-nome {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tpac-prod-marca {
  font-size: 11px;
  color: #8da2b5;
  margin-top: 1px;
}
.tpac-prod-preco-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.tpac-prod-preco {
  font-size: 13px;
  font-weight: 700;
  color: var(--tp-green);
}
.tpac-prod-preco-old {
  font-size: 11px;
  color: #aaa;
  text-decoration: line-through;
}
.tpac-prod-indisponivel {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}

/* Highlight */
.tpac-hl {
  background: #fff3bf;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* Ver todos */
.tpac-ver-todos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  background: #f4f8fc;
  border-top: 1px solid #e2ecf5;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tp-blue);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .4px;
  transition: background .12s;
  cursor: pointer;
}
.tpac-ver-todos:hover,
.tpac-ver-todos.tpac-kb-active {
  background: #e6f3fb;
  color: var(--tp-blue-dark, #004e7c);
}

/* Vazio */
.tpac-vazio {
  padding: 16px 14px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

/* Loading */
.tpac-loading {
  padding: 18px 14px;
  font-size: 13px;
  color: #8da2b5;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tpac-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e2ecf5;
  border-top-color: var(--tp-blue);
  border-radius: 50%;
  animation: tpacSpin .6s linear infinite;
}
@keyframes tpacSpin {
  to { transform: rotate(360deg); }
}

/* Keyboard active - visual feedback */
.tpac-kb-active {
  outline: 2px solid var(--tp-blue);
  outline-offset: -2px;
}
