* {
  font-family: "Roboto", sans-serif;
}

/* =====================================================
   CONTAINER DA BUSCA
   ===================================================== */

.search-container {
  position: relative;
  width: 100%;
}

/* =====================================================
   DROPDOWN
   ===================================================== */

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  z-index: 9999;

  display: none;

  width: 100%;
  max-height: 520px;

  padding: 10px;

  overflow-x: hidden;
  overflow-y: auto;

  background-color: #ffffff;

  border: 1px solid #ece7e7;
  border-radius: 10px;

  box-shadow: 0 18px 42px rgba(50, 40, 40, 0.18);
}

.search-dropdown.active {
  display: block;
}

/* =====================================================
   MINICARD DO PRODUTO
   ===================================================== */

.search-product-card {
  display: grid;

  grid-template-columns: 82px minmax(0, 1fr);

  gap: 12px;

  width: 100%;

  margin-bottom: 10px;
  padding: 10px;

  background-color: #ffffff;

  border: 1px solid #eeeeee;
  border-radius: 8px;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.search-product-card:last-of-type {
  margin-bottom: 0;
}

.search-product-card:hover,
.search-product-card:focus {
  outline: none;

  border-color: #d06f32;

  box-shadow: 0 8px 20px rgba(100, 75, 60, 0.12);

  transform: translateY(-1px);
}

/* =====================================================
   IMAGEM DO MINICARD
   ===================================================== */

.search-product-image-wrapper {
  display: flex;

  width: 82px;
  height: 82px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background-color: #ffffff;

  border: 1px solid #eeeeee;
  border-radius: 7px;
}

.search-product-image {
  display: block;

  width: 100% !important;
  max-width: 72px !important;

  height: 100% !important;
  max-height: 72px !important;

  padding: 4px;

  object-fit: contain !important;
}

/* =====================================================
   CONTEÚDO DO MINICARD
   ===================================================== */

.search-product-content {
  display: flex;

  min-width: 0;

  flex-direction: column;
  align-items: flex-start;
}

.search-product-title {
  display: -webkit-box;

  width: 100%;

  margin: 0 0 7px;

  overflow: hidden;

  color: #675757;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-product-meta {
  display: flex;

  width: 100%;

  margin-bottom: 9px;

  flex-wrap: wrap;
  gap: 4px 10px;

  color: #8a8080;

  font-size: 11px;
  line-height: 1.35;
}

.search-product-manufacturer {
  color: #d06f32;
  font-weight: 700;
}

.search-product-code {
  color: #8a8080;
}

/* =====================================================
   BOTÃO VER PRODUTO
   ===================================================== */

.search-product-button {
  display: inline-flex;

  min-height: 30px;

  margin-top: auto;
  padding: 5px 12px;

  align-items: center;
  justify-content: center;

  color: #d06f32;

  font-size: 11px;
  font-weight: 700;
  text-decoration: none;

  background-color: #ffffff;

  border: 1px solid #d06f32;
  border-radius: 5px;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.search-product-button:hover,
.search-product-button:focus {
  color: #ffffff;

  background-color: #d06f32;

  outline: none;
}

.search-product-button.disabled {
  opacity: 0.5;

  pointer-events: none;
}

/* =====================================================
   RODAPÉ DO DROPDOWN
   ===================================================== */

.search-dropdown-footer {
  position: sticky;
  bottom: -10px;

  margin: 10px -10px -10px;
  padding: 10px;

  background-color: #ffffff;

  border-top: 1px solid #eeeeee;
}

.search-see-all {
  width: 100%;

  padding: 10px 14px;

  color: #d06f32;

  font-size: 13px;
  font-weight: 700;

  background-color: #ffffff;

  border: 1px solid #d06f32;
  border-radius: 6px;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.search-see-all:hover {
  color: #ffffff;

  background-color: #d06f32;
}

/* =====================================================
   LOADING, VAZIO E ERRO
   ===================================================== */

.search-loading {
  display: flex;

  min-height: 75px;

  align-items: center;
  justify-content: center;
  gap: 10px;

  color: #777777;

  font-size: 13px;
}

.search-empty,
.search-error {
  padding: 24px 16px;

  color: #777777;

  font-size: 13px;
  text-align: center;
}

.search-error {
  color: #a94442;
}

/* =====================================================
   BARRA DE ROLAGEM
   ===================================================== */

.search-dropdown::-webkit-scrollbar {
  width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
  background-color: #f5f3f3;
}

.search-dropdown::-webkit-scrollbar-thumb {
  background-color: #cfc5c5;

  border-radius: 10px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
  background-color: #b9aaaa;
}

/* =====================================================
   RESPONSIVIDADE
   ===================================================== */

@media (max-width: 991.98px) {
  .search-dropdown {
    position: fixed;

    top: 90px;
    right: 12px;
    left: 12px;

    width: auto;
    max-height: calc(100vh - 110px);
  }
}

@media (max-width: 575.98px) {
  .search-product-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .search-product-image-wrapper {
    width: 68px;
    height: 68px;
  }

  .search-product-image {
    max-width: 60px !important;
    max-height: 60px !important;
  }

  .search-product-title {
    font-size: 12px;
  }

  .search-product-button {
    min-height: 28px;

    padding: 4px 10px;

    font-size: 10px;
  }
}
