* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#root {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 20px auto;
  text-align: center;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.product-card:hover { transform: translateY(-5px) }
.product-card img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 10px; }
.product-card h3 { font-size: 1rem; color: #333; }
.product-card button {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}
.product-card button:hover { background: #0056b3 }

.main {
  text-align: center;
  background: white;
  flex: 1;
  padding: 40px 20px;
}
.sub_main { margin-bottom: 25px; }
.main input {
  height: 45px;
  width: 250px;
  padding: 0 15px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
}
.main input:focus { border-color: #007bff }

.icon-btn {
  background: #007bff;
  color: #fff;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-left: 5px;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.icon-btn:hover { background: #0056b3 }

.weather-info { margin-top: 30px; }
.weather-info h1 { font-size: 2rem; margin-bottom: 10px; }
.weather-info h2 { font-size: 1.2rem; color: #555; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #007bff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.error-message {
  color: #dc3545;
  background: #f8d7da;
  padding: 10px 20px;
  border-radius: 5px;
  display: inline-block;
}

footer {
  padding: 10px;
  background-color: #333;
  color: white;
  text-align: center;
  width: 100%;
}
