/* product-cards.css — AMRIC (mobile-first) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  text-align: center;
  margin: 16px 0 28px;
  color: #2E7D32;
  font-size: 1.6rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.product-card {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.product-image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.out-of-stock {
  background-color: #ff6b6b;
  color: white;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #2E7D32;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: #6D4C41;
  margin-bottom: 12px;
}

.btn {
  padding: 9px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-secondary {
  background-color: #2E7D32;
  color: white;
  margin-top: auto;
}

.btn-secondary:hover {
  background-color: #1B5E20;
}

/* Pagination styles */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
  gap: 5px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #2E7D32;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.page-link:hover {
  background-color: #E8F5E9;
}

.page-link.active {
  background-color: #2E7D32;
  color: white;
  font-weight: bold;
}

/*--------------------------------------------------------------
# Responsive scale-up — tablets and desktop
--------------------------------------------------------------*/
@media (min-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .product-image {
    height: 150px;
  }
}

@media (min-width: 576px) {
  h1 {
    font-size: 1.8rem;
    margin: 18px 0 32px;
  }

  .product-title {
    font-size: 15px;
  }

  .product-price {
    font-size: 17px;
  }

  .btn-secondary {
    padding: 9px 13px;
  }

  .page-link {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
    margin: 20px 0 40px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
  }

  .product-image {
    height: 180px;
  }

  .pagination {
    margin: 30px 0;
  }
}

@media (min-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
  }

  .product-image {
    height: 200px;
  }
}