/* ============================================================
   PRODUTOS.CSS – Estilos exclusivos da página de produtos
============================================================ */

/* ============================================================
   LINK ATIVO NO NAVBAR
============================================================ */
.nav-link-item.active {
  color: var(--primary);
}

.nav-link-item.active::after {
  width: 100%;
}

/* ============================================================
   BANNER DA PÁGINA
============================================================ */
.page-banner {
  background: var(--dark);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.page-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-banner h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

/* Breadcrumb */
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-list li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-list a {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
  color: var(--white);
}

.breadcrumb-list i {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-list [aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* Círculos decorativos do banner */
.banner-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(56,75,255,0.2);
}

.banner-circle-1 {
  width: 340px;
  height: 340px;
  top: -120px;
  right: -60px;
}

.banner-circle-2 {
  width: 180px;
  height: 180px;
  bottom: -80px;
  right: 160px;
  border-color: rgba(75, 124, 243, 0.08);
}

/* ============================================================
   SEÇÃO PRINCIPAL
============================================================ */
.products-section {
  background: #f8f9ff;
  padding: 80px 0 100px;
}

/* Cabeçalho com título + busca */
.products-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}

.products-header .section-label {
  display: block;
  margin-bottom: 6px;
}

.products-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
  margin: 0;
  font-family: var(--font-body);
}

/* Campo de busca */
.products-search-wrapper {
  position: relative;
  flex-shrink: 0;
}

.products-search-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--body);
  font-size: 14px;
  pointer-events: none;
}

.products-search {
  width: 280px;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid rgba(56,75,255,0.2);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--heading);
  background: #fff;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.products-search::placeholder {
  color: var(--body);
}

.products-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56,75,255,0.08);
}

/* ============================================================
   FILTROS POR CATEGORIA
============================================================ */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1.5px solid rgba(56,75,255,0.2);
  border-radius: 30px;
  background: #fff;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cat-btn i {
  font-size: 13px;
}

.cat-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(56,75,255,0.05);
}

.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(56,75,255,0.3);
}

/* Contador de resultados */
.products-count {
  font-size: 14px;
  color: var(--body);
  margin-bottom: 28px;
}

.products-count strong {
  color: var(--primary);
}

/* ============================================================
   CARDS DE PRODUTO
============================================================ */
.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15,13,29,0.12);
}

/* Área de imagem */
.product-card-image {
  position: relative;
  overflow: hidden;
}

.product-img-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: rgba(56,75,255, 0.3);
  transition: transform 0.4s ease;
}

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

/* ── GALERIA DE FOTOS DO PRODUTO ── */
.product-gallery {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #f8f9fc;
}

.product-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.4s ease;
  transform: none;
}

.product-gallery-img.active {
  opacity: 1;
  transform: none;
}

/* Dots de navegação */
.product-gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: 1.5px solid rgba(255,255,255,.8);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* Setas de navegação (aparecem no hover) */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--dark);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease;
  pointer-events: none;
}

.gallery-arrow.prev { left: 8px; }
.gallery-arrow.next { right: 8px; }

.product-gallery:hover .gallery-arrow {
  opacity: 1;
  pointer-events: auto;
}

.gallery-arrow:hover {
  background: #fff;
}

/* Badge de categoria */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.product-badge.escolar    { background: #e8ecff; color: #384BFF; }
.product-badge.escritorio { background: #e8ecff; color: #384BFF; }
.product-badge.impressao  { background: #e8ecff; color: #384BFF; }
.product-badge.arquivo    { background: #e8ecff; color: #384BFF; }
.product-badge.embalagens { background: #e8ecff; color: #384BFF; }
.product-badge.copa       { background: #e8ecff; color: #384BFF; }

/* Corpo do card */
.product-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
  line-height: 1.35;
}

.product-desc {
  font-size: 13px;
  color: var(--body);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}

/* Preço no card */
.product-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0 12px;
  border-top: 1.5px solid rgba(56,75,255,0.1);
  margin-bottom: 4px;
}

.product-price-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.product-price-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Botão do card */
.btn-product {
  display: inline-block;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: all 0.25s ease;
}

.btn-product:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Animação de entrada dos cards — CSS puro, stagger por coluna (máx 4) */
.product-item {
  animation: productFadeIn 0.35s ease both;
  opacity: 1;
  transform: none;
}

@keyframes productFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-item:nth-child(4n+1) { animation-delay: 0.00s; }
.product-item:nth-child(4n+2) { animation-delay: 0.07s; }
.product-item:nth-child(4n+3) { animation-delay: 0.14s; }
.product-item:nth-child(4n+4) { animation-delay: 0.21s; }

.product-item.hidden {
  display: none;
  animation: none;
}

/* Estado vazio */
.products-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--body);
}

.products-empty i {
  font-size: 56px;
  color: rgba(56,75,255,0.2);
  margin-bottom: 16px;
  display: block;
}

.products-empty p {
  font-size: 16px;
  margin-bottom: 24px;
}

.btn-clear-search {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-clear-search:hover {
  background: #2a3ce0;
}

/* ============================================================
   CTA – FAIXA INFERIOR
============================================================ */
.products-cta {
  background: var(--dark);
  padding: 64px 0;
}

.products-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.products-cta-text h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.products-cta-text p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 480px;
  margin: 0;
}

.btn-cta-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.btn-cta-contact:hover {
  background: #2a3ce0;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,75,255,0.35);
}

/* ============================================================
   RESPONSIVIDADE
============================================================ */
@media (max-width: 991.98px) {
  .page-banner h1 {
    font-size: 36px;
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .products-search {
    width: 100%;
  }

  .products-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .products-cta-text p {
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .page-banner {
    padding: 52px 0;
  }

  .page-banner h1 {
    font-size: 28px;
  }

  .products-header h2 {
    font-size: 26px;
  }

  .category-filters {
    gap: 8px;
  }

  .cat-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Cards em 2 colunas no mobile pequeno */
  .products-grid .col-lg-3,
  .products-grid .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .product-gallery {
    height: 140px;
  }

  .product-card-body {
    padding: 12px;
  }
}
