/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

/* Header and Container Styling */
.header-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

.count-info {
    display: inline-flex;
    align-items: center;
}

.custom-product-count {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 0 5px 0 0;
}

.ficha-count {
    font-size: 14px;
    color: #666;
    margin: 0 5px;
}

.custom-order-buttons {
  margin-top: 10px; /* Adiciona espaço entre a busca e os botões */
}

#product-search {
    padding: 8px;
    width: 100%;
    max-width: 710px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Buttons and Filters in Same Line */
.inline-filters {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.custom-category-filter,
.custom-brand-filter {
    margin: 0;
}

.order-button,
#category-filter,
#brand-filter {
    padding: 6px 10px;
    margin: 3px;
    font-size: 14px;
    border-radius: 3px;
    background-color: #0073aa; /* Cor de fundo igual ao botão "Ocultar Preços" */
    color: #fff; /* Cor do texto branco */
    border: none; /* Remove a borda */
    cursor: pointer; /* Adiciona o cursor de ponteiro */
}

.order-button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
}

#toggle-price-button.active {
  background-color: #005580; /* Mantém a cor de fundo ativa */
}

#category-filter,
#brand-filter {
    width: auto; /* Ajusta a largura automaticamente */
    max-width: 100%;
    height: 37px;
    font-size: 14px;
    text-transform: capitalize !important;
}

/* Product List and Items */
.custom-product-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: space-between;
}

.custom-product-item {
  position: relative; /* Adiciona posicionamento relativo para o botão */
  width: 24%;
  margin: 0.5%;
  border: 1px solid #ddd;
  padding: 7px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 5px;
  text-align: center;
  box-sizing: border-box;
  padding: 10px;
  display: flex; /* Adiciona flexbox para igualar a altura */
  flex-direction: column; /* Organiza os elementos verticalmente */
}

@media (max-width: 1024px) {
    .custom-product-item {
        width: 48%;
        margin: 1%;
    }
}

@media (max-width: 768px) {
    .custom-product-item {
        width: 100%;
        margin: 1% 0;
    }
}

.custom-product-inner {
    line-height: 0.5;
    padding-bottom: 10px;
}

.image-container {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: auto;
  background: #f9f9f9;
  flex-grow: 1; /* Permite que o contêiner da imagem cresça para ocupar o espaço */
}

.fixed-product-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

/* Product Details */
.custom-product-title {
    margin-left: 7px;
    text-align: left;
    font-size: 15px;
    font-weight: bold;
    height: 2em;
    line-height: 1em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    margin-top: 5px;
}

.product-inner .image-container {
    height: 180px;
}

.custom-product-title {
    color: #ae1ea4 !important;
    text-decoration: none !important;
    font-family: "Roboto", sans-serif;
}

.custom-product-price {
    text-align: right !important;
    padding-top: 5px;
}

.custom-product-price bdi {
    font-size: 18px !important;
    font-weight: 700;
    color: #ae1ea4;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.custom-product-category {
    text-transform: capitalize !important;
}

.custom-product-ref {
    margin-top: -4px !important;
}

.custom-product-brand,
.custom-product-category,
.custom-product-ref {
    text-align: left;
    padding-top: 8px;
    letter-spacing: -0.2px;
    padding-left: 7px;
}

/* Ficha Indicators */
.ficha-button {
    padding: 8px 12px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
}

.ficha-button.on {
    background-color: #28a745;
    cursor: pointer;
}

.ficha-button.off {
    background-color: #dc3545;
    cursor: not-allowed !important;
}

.ficha-indicators {
    margin-top: 16px;
    text-align: left;
    margin-left: 7px;
}

.ficha-indicators strong {
    margin-right: 17px;
}

.ficha-indicators a {
    text-decoration: none !important;
    padding: 3px 10px;
}

/* Variations Popup */
.variations-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 1000;
    max-width: 700px;
    width: 90%;
    max-height: 600px;
    overflow-x: auto;
}

.variations-popup table {
    width: 100%;
    border-collapse: collapse;
}

.variations-popup th, .variations-popup td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.variations-popup th {
    background-color: #f2f2f2;
}

.variations-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.variations-button {
  position: absolute; /* Posiciona o botão no topo */
  top: 238px;
  left: 18px;
  padding: 8px 8px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1; /* Garante que o botão fique acima da imagem */
}

/* Category Title */
.category-title {
  font-size: 30px;
  font-weight: bold;
  margin: 20px 0 10px;
  color: #fff; /* Texto branco */
  background-color: #ae1ea4; /* Faixa roxa */
  padding: 10px; /* Adiciona algum espaço interno */
  padding-left: 30px;
  text-align: left; /* Centraliza o texto */
}

/* Loading State */
#product-list-container {
    transition: opacity 0.3s ease;
}

#product-list-container.loading {
    opacity: 0.5;
}

.custom-logo-container {
  text-align: center;
}

.custom-logo {
  max-width: 200px; /* Ajuste o tamanho conforme necessário */
  max-height: 180px;
  height: auto;
}

.custom-header-container {
  display: flex;
  align-items: flex-start; /* Alinha ao topo */
  justify-content: flex-start;
  width: 100%;
  flex-wrap: wrap;
  padding-top: 15px;
  margin-bottom: 10px;
}

.custom-logo-column {
  flex: 0 0 auto; /* Não permite que a coluna do logo cresça */
  margin-right: 20px; /* Adiciona espaço entre o logo e o cabeçalho */
}

.header-content-column {
    display: flex;
    flex-direction: column; /* Organiza os elementos verticalmente */
    flex-grow: 1;
}

.header-row {
  display: flex;
  justify-content: left;
  align-items: left;
  margin-bottom: 10px;
  margin-left: 3px;
}

.custom-search-container {
  margin-left: 3px;
}
#product-search {
  color: #555; /* Cor do placeholder */
  height: 42px;
  font-size: 20px;
  font-weight: bold;
}

.custom-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.custom-product-inner a {
    text-decoration: none !important;
}