/* ============================================================================
   HD AT Sistemas Inteligentes — melhorias do card de produto
   ----------------------------------------------------------------------------
   Arquivo ADITIVO: não altera nenhum CSS original do Joomla/EasyStore.
   Carregado por último, apenas refina o card da listagem de produtos e
   adiciona o botão "Tenho interesse" (WhatsApp).

   REGRA RESPEITADA: o tamanho da imagem do card NÃO foi alterado — apenas
   o acabamento em volta (moldura, sombra, espaçamento, tipografia do título).
   ============================================================================ */

/* ---------------------------------------------------------------- o card ---*/
.easystore-product-content .sppb-collection-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.easystore-product-content .sppb-collection-item:hover {
  border-color: #d5d5d5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
  transform: translateY(-3px);
}

/* a imagem mantém exatamente o tamanho original — só arredondamos o topo */
.easystore-product-content .sppb-collection-item .easystore-product-image {
  border-radius: 0;
  margin-bottom: 0;
}

/* ------------------------------------------------------------- o título ---*/
.easystore-product-content .sppb-collection-item .easystore-product-title {
  margin: 0;
  padding: 16px 16px 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
  min-height: 3.1em;              /* alinha os títulos entre cards vizinhos */
}

.easystore-product-content .sppb-collection-item .easystore-product-title a {
  color: #252525;
  transition: color .2s ease;
}

.easystore-product-content .sppb-collection-item:hover .easystore-product-title a {
  color: #0fa89d;
}

/* ------------------------------------------- botão "Tenho interesse" ------*/
.hdat-interesse-wrap {
  margin-top: auto;               /* empurra o botão para a base do card */
  padding: 12px 16px 16px;
}

.hdat-interesse {
  position: relative;
  z-index: 3;                     /* acima do .stretched-link do card */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  background: #25d366;            /* verde oficial do WhatsApp */
  color: #fff !important;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 211, 102, .28);
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.hdat-interesse:hover,
.hdat-interesse:focus {
  background: #1eb855;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .40);
  transform: translateY(-1px);
}

.hdat-interesse:active { transform: translateY(0); }

.hdat-interesse:focus-visible {
  outline: 3px solid #044cd0;
  outline-offset: 2px;
}

.hdat-interesse svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

/* --------------------------------------------------------- busca/filtro --*/
.hdat-busca-vazia {
  text-align: center;
  padding: 48px 16px;
  color: #6b6f76;
  font-size: 1rem;
}

/* ------------------------------------------------------------ responsivo --*/
/* A grade de produtos é gerada pelo SP Page Builder com CSS inline próprio
   (por addon, id único por página): grid-template-columns:repeat(4,1fr) em
   qualquer largura, com uma única exceção — 1 coluna abaixo de 575.98px.
   Ou seja, no intervalo 576px–1199.98px (tablets em retrato/paisagem e
   notebooks pequenos) os 4 cartões ficam espremidos lado a lado sem colapsar.
   Como o inline do SPPB não usa !important, basta especificidade de classe
   com !important aqui para vencer — sem alterar nada em telas >=1200px,
   onde o inline do SPPB já entrega 4 colunas normalmente. */
@media (max-width: 1199.98px) and (min-width: 992px) {
  .easystore-product-content .sppb-collection-addon {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 991.98px) and (min-width: 576px) {
  .easystore-product-content .sppb-collection-addon {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 575.98px) {
  .easystore-product-content .sppb-collection-item .easystore-product-title {
    min-height: 0;
    padding: 14px 14px 0;
  }
  .hdat-interesse-wrap { padding: 10px 14px 14px; }
  .hdat-interesse { font-size: .88rem; padding: 10px 12px; }
}

/* alvo de toque confortável (~44px) no botão "Tenho interesse" em telas de
   toque — em desktop a altura resultante do padding original (11px topo/
   base) já fica próxima disso e não muda; o ajuste é perceptível só em
   telas <=991.98px, onde o dedo é o ponteiro de fato. */
@media (max-width: 991.98px) {
  .hdat-interesse { min-height: 44px; padding-top: 13px; padding-bottom: 13px; }
}
