* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f5f6fa;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  color: #2c3e50;
}

#inputBox {
  padding: 10px;
  width: 250px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  margin-bottom: 10px;
}

#btn {
  padding: 10px 18px;
  margin-left: 10px;
  border: none;
  background: #3498db;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

#btn:hover {
  background: #2980b9;
}

.history {
  margin-left: 20px;
  text-decoration: none;
  color: #2c3e50;
  font-weight: bold;
}

.products,
.product-list,
#product-container {
  margin-top: 25px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  transition: 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  text-align: center;
}

.product-card h4 {
  color: #27ae60;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 13px;
  color: #555;
  text-align: center;
}


#pagination {
  margin-top: 30px;
  text-align: center;
  display: flex;
  justify-content: center;
  margin-top: 30px;  
  gap: 12px;
}

#pagination button {
  padding: 8px 14px;
  margin: 5px;
  border: none;
  background: #ecf0f1;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.3s;
}

.pagination button:hover {
  background: #dcdde1;
}

.active-page {
  background: #3498db !important;
  color: white;
}

#historyList {
  list-style: none;
  margin-top: 20px;
}

#historyList li {
  background: white;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

#inputBox {
  width: 300px;
  padding: 10px;
  margin: 20px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

@media (max-width: 600px) {
  #inputBox {
    width: 80%;
  }
}
