body {
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  background: #f4f8fb;
  color: #222;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 12px rgba(76,175,80,0.08);
  padding: 1rem 2rem;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  min-width: 0;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #388e3c;
  user-select: none;
}
.logo span {
  color: #ff9800;
}

.nav-links, #navbar-user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
  overflow-x: auto;
  max-width: 100vw;
}

#navbar-user-section span, #navbar-user-section button {
  white-space: nowrap;
}

.nav-links button {
  background: #fff;
  color: #388e3c;
  border: 2px solid #388e3c;
  padding: 0.5rem 1.2rem;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
  outline: none;
}

.nav-links button:hover {
  background: #388e3c;
  color: #fff;
}

#search {
  width: 320px;
  padding: 0.6rem 1rem;
  border-radius: 24px;
  border: 1.5px solid #e0e0e0;
  outline: none;
  font-size: 1rem;
  margin: 0 1.5rem;
  background: #f9f9f9;
  transition: border 0.2s;
}
#search:focus {
  border: 1.5px solid #388e3c;
}

.cart-fab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.5rem 1.1rem;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,152,0,0.12);
  cursor: pointer;
  transition: background 0.2s;
}
.cart-fab:hover {
  background: #ffb74d;
}

main {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

h1 {
  text-align: left;
  color: #388e3c;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: flex-start;
}

.product-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px rgba(56,142,60,0.10);
  width: 270px;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 2px solid transparent;
}
.product-card:hover {
  box-shadow: 0 8px 32px rgba(56,142,60,0.18);
  transform: translateY(-4px) scale(1.03);
  border: 2px solid #ff9800;
}

.product-card img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 8px rgba(56,142,60,0.08);
}

.discount {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: #388e3c;
  color: #fff;
  padding: 0.25rem 0.8rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(56,142,60,0.10);
}

.product-card .cart-icon-btn {
  background: none;
  border: none;
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 1.7rem;
  cursor: pointer;
  transition: transform 0.2s;
  color: #ff9800;
}
.product-card .cart-icon-btn.added {
  animation: cart-bounce 0.4s;
  color: #388e3c;
}

@keyframes cart-bounce {
  0% { transform: scale(1);}
  30% { transform: scale(1.3);}
  60% { transform: scale(0.9);}
  100% { transform: scale(1);}
}

.product-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  text-align: center;
  color: #222;
}

.product-desc {
  color: #888;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #388e3c;
  margin-bottom: 0.5rem;
}

.product-old-price {
  text-decoration: line-through;
  color: #aaa;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.product-qty {
  margin-bottom: 0.7rem;
}

.add-btn {
  background: linear-gradient(90deg, #388e3c 60%, #ff9800 100%);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.5rem;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(56,142,60,0.10);
}
.add-btn:hover {
  background: linear-gradient(90deg, #ff9800 60%, #388e3c 100%);
  box-shadow: 0 4px 16px rgba(255,152,0,0.12);
}

/* --- REMOVED custom .modal and .modal-content rules to avoid Bootstrap conflict --- */
/*
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(56,142,60,0.10);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 22px;
  min-width: 340px;
  max-width: 95vw;
  position: relative;
  box-shadow: 0 8px 32px rgba(56,142,60,0.18);
}
*/

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.2rem;
  font-size: 2rem;
  cursor: pointer;
  color: #ff9800;
}

#cart-list {
  list-style: none;
  padding: 0;
}

#cart-list li {
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

#cart-total {
  font-weight: bold;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: #388e3c;
}

#recipe-suggestions {
  margin-top: 1.2rem;
  background: #fff3e0;
  padding: 1rem;
  border-radius: 14px;
  color: #333;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(255,152,0,0.08);
}

.mini-cart {
  display: none;
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(56,142,60,0.18);
  padding: 1.2rem 1.2rem 1rem 1.2rem;
  z-index: 2000;
  min-width: 240px;
  max-width: 95vw;
  font-size: 1.05rem;
}

.mini-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 0.7rem;
  color: #388e3c;
}

.view-cart-btn {
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
}
.view-cart-btn:hover {
  background: #388e3c;
}

#mini-cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#mini-cart-list li {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

input[type="text"], input[type="password"] {
  width: 90%;
  padding: 0.7rem 1rem;
  margin: 0.5rem 0;
  border-radius: 18px;
  border: 1.5px solid #e0e0e0;
  font-size: 1rem;
  background: #f9f9f9;
  outline: none;
  transition: border 0.2s;
}
input[type="text"]:focus, input[type="password"]:focus {
  border: 1.5px solid #388e3c;
}

button {
  font-family: inherit;
}

.clear-cart-btn {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 0.4rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.clear-cart-btn:hover {
  background: #b71c1c;
}

.delete-item-btn {
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.2rem 0.7rem;
  font-size: 0.95rem;
  margin-left: 0.7rem;
  cursor: pointer;
  transition: background 0.2s;
}
.delete-item-btn:hover {
  background: #e65100;
}

.message {
  color: #e53935;
  font-weight: 600;
  margin-bottom: 1.2rem;
  min-height: 1.5em;
  text-align: center;
  font-size: 1.1rem;
}

.product-stock {
  color: #388e3c;
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.no-products {
  width: 100%;
  text-align: center;
  color: #888;
  font-size: 1.2rem;
  margin: 2rem 0;
  font-weight: 600;
}

.category-bar {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  background: #fff;
  padding: 0.7rem 2rem;
  border-bottom: 1.5px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(56,142,60,0.04);
  position: sticky;
  top: 64px;
  z-index: 99;
}

.category-btn {
  background: #f4f8fb;
  color: #388e3c;
  border: 2px solid #388e3c;
  border-radius: 18px;
  padding: 0.4rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
  white-space: nowrap;
}
.category-btn.selected,
.category-btn:hover {
  background: #388e3c;
  color: #fff;
}

.recently-viewed {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 1rem 2rem 0.5rem 2rem;
  margin-bottom: 1rem;
}
.recently-viewed-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(56,142,60,0.10);
  width: 120px;
  min-width: 120px;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.recently-viewed-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.3rem;
}
body.dark-mode {
  background: #23272f;
  color: #eee;
}
body.dark-mode .navbar,
body.dark-mode .category-bar,
body.dark-mode .recently-viewed-card,
body.dark-mode .product-card {
  background: #2d323c !important;
  color: #eee !important;
}
body.dark-mode .product-card,
body.dark-mode .recently-viewed-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
body.dark-mode .btn,
body.dark-mode .btn:focus {
  background: #23272f;
  color: #fff;
  border-color: #444;
}
body.dark-mode .btn-primary,
body.dark-mode .btn-success,
body.dark-mode .btn-info,
body.dark-mode .btn-warning,
body.dark-mode .btn-danger {
  color: #fff;
}
body.dark-mode .category-btn.selected,
body.dark-mode .category-btn:hover {
  background: #388e3c !important;
  color: #fff !important;
}
body.dark-mode .modal-content {
  background: #2d323c !important;
  color: #eee !important;
}
body.dark-mode .modal-backdrop.show {
  background: rgba(30,30,30,0.7) !important;
}
body.high-contrast .modal-content {
  background: #000 !important;
  color: #fff !important;
}
body.high-contrast .modal-backdrop.show {
  background: #000 !important;
}
.price-badge {
  font-size: 0.9em;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.15em 0.7em;
  margin-left: 0.5em;
}
.price-down {
  background: #e8f5e9;
  color: #388e3c;
}
.price-up {
  background: #fff3e0;
  color: #e65100;
}
.slot-radio {
  margin-right: 0.7em;
}

@media (max-width: 900px) {
  .product-list {
    flex-direction: column;
    align-items: center;
  }
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }
  #search {
    width: 95vw;
    margin: 1rem 0;
  }
  main {
    padding: 0 0.5rem;
  }
}

#corporate-cart-modal .modal-content {
  max-width: 600px;
}
body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}
body.high-contrast .navbar,
body.high-contrast .category-bar,
body.high-contrast .recently-viewed-card,
body.high-contrast .product-card {
  background: #000 !important;
  color: #fff !important;
}
body.high-contrast .btn,
body.high-contrast .btn:focus {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}
body.high-contrast .badge,
body.high-contrast .alert {
  background: #fff !important;
  color: #000 !important;
}
.dietary-badge {
  background: #e3f2fd;
  color: #1976d2;
  font-size: 0.85em;
  border-radius: 8px;
  padding: 0.15em 0.7em;
  margin-right: 0.3em;
}
.allergen-badge {
  background: #ffebee;
  color: #c62828;
  font-size: 0.85em;
  border-radius: 8px;
  padding: 0.15em 0.7em;
  margin-right: 0.3em;
}
.cart-btn-added {
  background: #e6f9ec !important;
  border-color: #388e3c !important;
  color: #388e3c !important;
  font-weight: bold;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #23272f !important;
  color: #eee !important;
  border-color: #444 !important;
}
body.dark-mode .card,
body.dark-mode .modal-content {
  border-color: #444 !important;
}
body.dark-mode,
body.dark-mode * {
  color: #eee !important;
  border-color: #444 !important;
}
body.dark-mode .text-muted,
body.dark-mode .small,
body.dark-mode .badge {
  color: #bbb !important;
}
body.dark-mode {
  background: #23272f !important;
}

body.dark-mode main,
body.dark-mode .card,
body.dark-mode .product-card,
body.dark-mode .recently-viewed-card {
  background: #23272f !important;
  color: #eee !important;
  border-color: #444 !important;
}

body.dark-mode .card-body {
  background: #23272f !important;
}

body.dark-mode .category-bar {
  background: #23272f !important;
  color: #eee !important;
}

body.dark-mode .dietary-badge {
  background: #222 !important;
  color: #90caf9 !important;
}

body.dark-mode .allergen-badge {
  background: #2d2323 !important;
  color: #ff8a80 !important;
}

@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }
  #navbar-user-section {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    gap: 0.5rem;
  }
}

body.dark-mode .navbar, body.dark-mode .nav-links, body.dark-mode #navbar-user-section {
  background: #2d323c !important;
  color: #eee !important;
}
body.dark-mode #navbar-user-section span, body.dark-mode #navbar-user-section button {
  color: #eee !important;
  border-color: #444 !important;
}
body.dark-mode .btn-outline-primary, body.dark-mode .btn-outline-danger, body.dark-mode .btn-outline-secondary, body.dark-mode .btn-outline-success, body.dark-mode .btn-outline-dark {
  color: #eee !important;
  border-color: #444 !important;
  background: transparent !important;
}
body.dark-mode .btn-outline-primary:hover, body.dark-mode .btn-outline-danger:hover, body.dark-mode .btn-outline-secondary:hover, body.dark-mode .btn-outline-success:hover, body.dark-mode .btn-outline-dark:hover {
  background: #388e3c !important;
  color: #fff !important;
  border-color: #388e3c !important;
}
.header-tagline {
  font-size: 1rem;
  color: #6c757d;
  margin-top: -0.2rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.5px;
}
#features-btn {
  font-weight: 600;
  border-radius: 20px;
  padding: 0.4rem 1.2rem;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(56,142,60,0.06);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  border: 2px solid #17a2b8;
  color: #17a2b8;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
  margin-left: 0;
}
#features-btn:hover, #features-btn:focus {
  background: #17a2b8;
  color: #fff;
  box-shadow: 0 4px 16px rgba(23,162,184,0.12);
  border-color: #17a2b8;
}
#features-btn {
  background: #ffe066 !important;
  border: 2px solid red !important;
  color: #222 !important;
  display: block !important;
  z-index: 10000;
}
#navbar-user-section {
  overflow-x: visible !important;
  max-width: none !important;
}
.header-divider {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #388e3c 0%, #17a2b8 100%);
  opacity: 0.12;
  margin-bottom: 0.5rem;
}
@media (max-width: 900px) {
  .header-tagline {
    font-size: 0.95rem;
    margin-left: 0.1rem;
  }
  #features-btn {
    font-size: 0.98rem;
    padding: 0.3rem 0.8rem;
    margin: 0.5rem 0 0.5rem 0.5rem;
  }
  .navbar .container-fluid {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
}