/* === GRID DE PRODUTOS === */
.grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 100px 40px 60px; /* adiciona espaço superior para o header fixo */
  background: linear-gradient(180deg, #fafafa 0%, #f7f7f7 100%);
  min-height: 100vh; /* evita cortes em telas pequenas */
  box-sizing: border-box;
}

/* === CARD === */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1; /* impede que sombras se sobreponham ao header */
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* === IMAGEM DO PRODUTO === */
.product-img {
  position: relative;
  width: 100%;
  background: #f9f9f9;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.product-img img {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ccff00;
  color: #000;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 4px 8px;
  border-radius: 4px;
}

/* === INFORMAÇÕES === */
.product-info {
  padding: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.old-price {
  color: #aaa;
  text-decoration: line-through;
  font-size: 0.9rem;
  margin: 0;
}

.new-price {
  color: #111;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 4px 0;
}

.pix {
  color: #000;
  font-size: 0.9rem;
  font-weight: 500;
}

.installments {
  color: #333;
  font-size: 0.9rem;
  margin: 4px 0 10px;
}

/* === FRETE === */
.shipping {
  background: #ccff00;
  color: #000;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}

/* === BOTÃO === */
.add-to-cart {
  width: 100%;
  padding: 10px;
  background-color: #7b3ff2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-to-cart:hover {
  background-color: #5b2bbd;
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
  .grid-section {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 90px 20px 40px;
  }
}

@media (max-width: 480px) {
  .grid-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 90px 16px 40px;
  }

  .product-img img {
    max-width: 220px;
  }
}
