/* Global Styles */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f7f9fb;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation */
header {
  background-color: #008f4c;
  padding: 15px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  font-size: 24px;
  font-weight: 600;
  color: white;
}

nav a {
  margin: 0 10px;
  color: white;
  font-weight: 500;
}

/* Search bar */
.search-bar {
  padding: 10px;
  border: none;
  border-radius: 6px;
  width: 200px;
  max-width: 100%;
  margin: 10px 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(120deg, #008f4c, #00c278);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 20px;
}

.btn-primary {
  padding: 12px 24px;
  font-size: 16px;
  background-color: white;
  color: #008f4c;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background-color: #f1f1f1;
}

/* Stores Section */
.stores {
  padding: 40px 0;
  background-color: #fff;
}

.stores h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  color: #333;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  text-align: center;
}

.store {
  background-color: #f0f0f0;
  padding: 20px 10px;
  border-radius: 8px;
  font-weight: 500;
  color: #008f4c;
}

/* Products Section */
.products {
  padding: 40px 0;
}

.products h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  color: #333;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 160px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card h3 {
  font-size: 18px;
  margin: 10px 0 5px;
}

.product-card p {
  font-size: 14px;
  margin: 0 0 10px;
  color: #555;
}

.product-card button {
  padding: 8px 12px;
  background-color: #008f4c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.product-card button:hover {
  background-color: #006c3a;
}

/* Footer */
footer {
  padding: 20px;
  background-color: #f7f7f7;
  text-align: center;
  font-size: 14px;
  color: #666;
}

/* Shopping List Section */
.shopping-list-section {
  background: #fff;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid #ddd;
}

.shopping-list-section h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

#shopping-list {
  list-style: none;
  padding-left: 0;
}

#shopping-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.remove-item {
  background: none;
  border: none;
  color: red;
  font-size: 12px;
  cursor: pointer;
}

.btn-clear {
  background: #ff4444;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 6px;
}

.btn-clear:hover {
  background: #cc0000;
}

/* Product Category Label */
.category {
  font-size: 12px;
  background: #e0f4ec;
  color: #008f4c;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.filter-bar select {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Category Buttons */
.category-buttons button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.category-buttons button.active {
  background-color: #008f4c;
  color: white;
  border-radius: 5px;
  font-weight: bold;
}

/* Responsive: show/hide buttons or dropdown */
.desktop-only {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 16px;
  }

  .search-bar {
    width: 100%;
  }

  .btn-primary {
    width: 100%;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
    margin-bottom: 16px;
  }
  .quantity-input {
  width: 50px;
  padding: 4px;
  margin-right: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.compare-btn {
  background-color: #ff9900;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  margin-left: 8px;
}

.compare-btn:hover {
  background-color: #e68a00;
}

.best-price {
  color: green;
  font-weight: bold;
}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.quantity-selector .qty-btn {
  padding: 4px 10px;
  font-size: 16px;
  background-color: #e0f4ec;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  color: #008f4c;
  transition: background-color 0.2s ease;
}

.quantity-selector .qty-btn:hover {
  background-color: #c8f0e2;
}

#total-estimate {
  margin-top: 12px;
  font-weight: bold;
  font-size: 1.1rem;
}
}