/* Products */
#products {
  background: var(--bg-color);
  padding: 100px 5%;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.product-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--soft-shadow);
  transition: all 0.4s ease;
  position: relative;
  cursor: pointer;
  /* For tilt effect perspective */
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  transform: translateY(-8px);
}

.product-image-container {
  height: 350px;
  overflow: hidden;
  position: relative;
  background: #f0f0f0; /* Clean background for product images */
  flex-shrink: 0;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-image {
  transform: scale(1.08);
}

.product-details {
  padding: 20px;
  text-align: center;
  transform: translateZ(20px); /* 3D effect text */
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.product-price {
  font-size: 1.1rem;
  color: #555;
  font-weight: 500;
  margin-bottom: 15px;
}

.product-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f0f0f0;
  color: #333;
  font-size: 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }

  .product-image-container {
    height: 280px;
  }

  .product-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-image-container {
    height: 250px;
  }
}