/* =========================================================
   PET SHOP PALMIRA — PRODUTOS & CATÁLOGO
   Estilos específicos para a listagem, filtros, cards
   e modal de cadastro de produtos.
   ========================================================= */

/* Cabeçalho de Categoria / Catálogo */
.catalog-header {
  padding-top: 130px;
  padding-bottom: 30px;
  background: var(--bg);
}

/* Barra de Filtros e Busca */
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .catalog-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--rp);
  border: 1.5px solid var(--gp);
  background: #fff;
  color: var(--tx);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

.category-tab-btn:hover {
  border-color: var(--gm);
  color: var(--gm);
  background: var(--gf);
}

.category-tab-btn.active {
  background: var(--gm);
  border-color: var(--gm);
  color: #fff;
  box-shadow: 0 4px 12px rgba(43,138,69,.25);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 220px;
  flex: 1;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--rp);
  border: 1.5px solid var(--gp);
  background: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: var(--tx);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-box input:focus {
  border-color: var(--gm);
  box-shadow: 0 0 0 3px rgba(43,138,69,.15);
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--tl);
  pointer-events: none;
}

/* Grid de Produtos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

/* Card de Produto */
.product-card {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--gp);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gb);
  box-shadow: 0 10px 24px rgba(26,92,46,.12);
}

.product-card-img-wrap {
  width: 100%;
  height: 190px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
}

.product-card-img {
  max-width: 85%;
  max-height: 160px;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: contrast(102%) brightness(100%);
  transition: transform .3s ease;
}

/* Classe utilitária para remover fundo branco de qualquer imagem */
.no-white-bg,
.remove-white-bg {
  mix-blend-mode: multiply !important;
  filter: contrast(102%) brightness(100%);
}

.product-card:hover .product-card-img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gm);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--rp);
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.product-card-body {
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category-chip {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gd);
  background: var(--gp);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 8px;
}

.product-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--dk);
  line-height: 1.35;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 13px;
  color: var(--tl);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-product-wa {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: var(--rp);
  text-decoration: none;
  transition: all .2s ease;
}

.btn-product-wa:hover {
  background: #1ebc57;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37,211,102,.3);
  color: #fff;
}

.btn-card-del {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #999;
  width: 34px;
  height: 34px;
  border-radius: var(--rp);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-card-del:hover {
  color: #d32f2f;
  border-color: #d32f2f;
  background: #fff5f5;
}

/* Estado vazio */
.catalog-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: var(--rl);
  border: 1.5px dashed var(--gp);
  grid-column: 1 / -1;
}

.catalog-empty h3 {
  font-size: 18px;
  color: var(--dk);
  margin-bottom: 8px;
}

.catalog-empty p {
  color: var(--tl);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Responsividade de Produtos (Notebook, Tablet e Mobile) */
@media (max-width: 1200px) {
  .catalog-header .section-in {
    width: 90% !important;
    max-width: 90% !important;
    margin: 0 auto !important;
  }
  .products-grid {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 540px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .toolbar-actions {
    width: 100%;
  }
  .search-box {
    width: 100%;
    min-width: 100%;
  }
  .category-tabs {
    justify-content: flex-start;
  }
}

