/* ========================================
   Products Section
   ======================================== */

.products {
  background-color: var(--bg-alt);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product Card */
.product-card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s, transform 0.3s;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-img {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.product-img .badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
}

.product-body {
  padding: 1rem;
}

.product-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-700);
  margin-bottom: 0.25rem;
}

.product-unit {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
}

.product-stock {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.product-body .btn {
  font-size: 0.8125rem;
  height: 2.25rem;
}

/* Stagger animation delays for product cards */
.products-grid .product-card:nth-child(1) { transition-delay: 0s; }
.products-grid .product-card:nth-child(2) { transition-delay: 0.1s; }
.products-grid .product-card:nth-child(3) { transition-delay: 0.2s; }
.products-grid .product-card:nth-child(4) { transition-delay: 0.3s; }

.products-grid .animate-up:nth-child(2) { transition-delay: 0.1s; }
.products-grid .animate-up:nth-child(3) { transition-delay: 0.2s; }
.products-grid .animate-up:nth-child(4) { transition-delay: 0.3s; }
