/* 🔁 Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f0fdf4;
  color: #2d2d2d;
  line-height: 1.6;
}

/* 🌟 Navbar */
.navbar {
  background: rgba(45, 106, 79, 0.95);
  backdrop-filter: blur(6px);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.logo {
  font-size: 1.7rem;
  font-weight: bold;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 5px;
  position: relative;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: #d8f3dc;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: #b7e4c7;
  width: 0%;
  transition: 0.3s ease-in-out;
}
.nav-links a:hover::after {
  width: 100%;
}

#profileLink img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #b7e4c7;
  transition: transform 0.3s;
}
#profileLink img:hover {
  transform: scale(1.1);
}

.hamburger {
  display: none;
  font-size: 1.6rem;
  color: #fff;
  cursor: pointer;
}

/* 🔁 Responsive Nav */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #2d6a4f;
    position: absolute;
    top: 65px;
    right: 0;
    width: 200px;
    padding: 1rem;
    border-radius: 0 0 0 10px;
    animation: slideIn 0.3s ease forwards;
  }
  .nav-links.active {
    display: flex;
  }
  .hamburger {
    display: block;
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 🔍 Search Bar */
.search-bar {
  background: #b7e4c7;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.search-bar input {
  padding: 0.6rem;
  width: 60%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.search-bar button {
  padding: 0.6rem 1rem;
  background: #1b4332;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.search-bar button:hover {
  background: #2d6a4f;
}

/* 🧲 Hero Section */
.hero {
  display: flex;
  flex-wrap: wrap;
  padding: 2rem;
  background: #d8f3dc;
  align-items: center;
  justify-content: center;
}
.hero-text {
  flex: 1;
  padding: 1rem;
  min-width: 280px;
}
.hero-text h1 {
  font-size: 2.5rem;
  color: #1b4332;
}
.hero-text p {
  margin: 1rem 0;
}
.btn {
  background: #40916c;
  color: white;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}
.btn:hover {
  background: #2d6a4f;
}
.hero-img {
  flex: 1;
  text-align: center;
  min-width: 280px;
}
.hero-img img {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
}

/* 🎯 Features */
.features {
  text-align: center;
  padding: 2rem 1rem;
}
.features h2 {
  margin-bottom: 1rem;
}
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.feature-card {
  background: white;
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  padding: 1rem;
  width: 250px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 🛒 Product Grid */
.products-section {
  padding: 2rem;
}
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.product-card {
  background: #fff;
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  width: 260px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}
.product-card:hover {
  transform: scale(1.02);
}
.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.product-card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}
.product-card p {
  font-size: 0.9rem;
  color: #555;
}

/* 📝 Forms */
.form-section {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.form-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #1b4332;
}
.form-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-section input,
.form-section textarea {
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.form-section button {
  background: #40916c;
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.form-section button:hover {
  background: #2d6a4f;
}
.status-msg {
  text-align: center;
  font-weight: bold;
  margin-top: 0.5rem;
}
.status-msg.success { color: green; }
.status-msg.error { color: red; }

/* 👤 Profile Page */
.profile-section {
  max-width: 520px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease-in-out;
}
.profile-section h2 {
  text-align: center;
  color: #1b4332;
  font-size: 2rem;
  margin-bottom: 1.2rem;
}
.profile-section p {
  margin: 0.8rem 0;
  font-size: 1.05rem;
  color: #333;
}
.profile-section p strong {
  color: #1b4332;
}
#logoutBtn {
  width: 100%;
  background: #2d6a4f;
  color: #fff;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.3s ease;
}
#logoutBtn:hover {
  background: #1b4332;
}

/* 👤 Profile Avatar */
.profile-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #40916c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 🔘 Profile Buttons */
.profile-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.profile-actions button {
  background: #2d6a4f;
  border: none;
  padding: 0.7rem 1.2rem;
  color: white;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s ease;
}
.profile-actions button:hover {
  background: #1b4332;
}


/* 📄 About Page */
.about-section {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.about-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #1b4332;
}
.about-section h3 {
  margin-top: 1.5rem;
  color: #2d6a4f;
}
.about-section p {
  margin: 0.5rem 0 1rem;
}
.about-section ul {
  padding-left: 1.2rem;
}
.about-section li {
  margin-bottom: 0.5rem;
}
.about-section a {
  color: #1b4332;
  text-decoration: underline;
}

/* 📢 Auth Toggle */
.auth-toggle {
  text-align: center;
  margin-top: 1rem;
}
.auth-toggle button {
  background: none;
  color: #1b4332;
  font-weight: bold;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}
#termsContainer {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#termsContainer a {
  color: #1b4332;
  text-decoration: underline;
}
small {
  color: #666;
  font-size: 0.85rem;
}

/* 📌 Accessibility */
input:focus,
textarea:focus,
button:focus {
  outline: 2px solid #74c69d;
  box-shadow: 0 0 0 3px #d8f3dc;
}

/* 🔒 Disabled buttons */
button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 🎬 Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ✅ Footer */
footer {
  background: #95d5b2;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}
