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

::selection {
  background-color: #0ab51e;
  color: #333;
}

button {
  cursor: pointer;
  width: 100%;
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff; /* background color */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ddd;
  border-top: 6px solid #0ab51e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: #f8f8f8;
  color: #333;
}

/* Header */
header {
  background: #0ab51e;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 1.5rem;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: #ffe600;
}

/* Hamburger */
.hamburger {
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
}

.hamburger div {
  display: none;
  height: 4px;
  background: #333;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hamburger.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active div:nth-child(2) {
  opacity: 0;
}

.hamburger.active div:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

#login-btn {
  background-color: #333;
  border-radius: 10px;
  border: none;
  color: #ddd;
  width: 6rem;
  height: 3rem;
}

.auth-container {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-container h2 {
  margin-bottom: 1.5rem;
  color: #0ab51e;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.auth-form input:focus {
  border-color: #0ab51e;
  box-shadow: 0 0 4px rgba(10, 181, 30, 0.4);
}

.auth-form button {
  background: #0ab51e;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.auth-form button:hover {
  background: #097d14;
}

.auth-form p {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-form a {
  color: #0ab51e;
  text-decoration: none;
  font-weight: bold;
}

.auth-form a:hover {
  text-decoration: underline;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: red;
}

.auth-container {
  position: relative; /* so close button positions inside box */
}

.login,
.sign-up {
  display: none;
}

.login.open {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.sign-up.open {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* Mobile Nav */
@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 60px;
    right: 0;
    background: #0ab51e;
    flex-direction: column;
    width: 200px;
    display: none;
    padding: 1rem;
  }

  nav.active {
    display: flex;
  }

  .hamburger div {
    color: #fff;
    display: flex;
  }
}

/* Hero */
.hero {
  background: url("./img/images.jpg") no-repeat center/cover;
  color: white;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero h2 {
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 1rem 2rem;
  border-radius: 10px;
}

/* About */
.about {
  padding: 2rem;
  background: white;
  height: 100%;
  text-align: center;
}

.about h2 {
  color: #0ab51e;
  margin-bottom: 1rem;
}

.about p {
  max-width: 700px;
  margin: auto;
  font-size: 1.1rem;
}

.about-img img {
  width: 50%;
  height: auto;
  filter: brightness(130%);
}

/* Products */
.products {
  padding: 2rem;
  text-align: center;
}

.products h2 {
  margin-bottom: 1.5rem;
  color: #0ab51e;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  transition: transform 0.3s;
}

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

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.card h3 {
  margin: 0.5rem 0;
}
/* Contact Form */
.contact-form {
  max-width: 500px;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.contact-form textarea {
  resize: none;
}

.contact-form button {
  background: white;
  color: #0ab51e;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  padding: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  background: #ffe600;
  color: black;
}

/* Contact Info */
.contact-info {
  margin-top: 2rem;
  font-size: 1rem;
}

/* Popup Styling */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-content {
  background: white;
  color: #333;
  padding: 2rem;
  border-radius: 10px;
  font-size: 1.1rem;
  text-align: center;
  max-width: 350px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.4s ease;
}

/* Success & Error Colors */
.popup.success .popup-content {
  border-left: 6px solid #0ab51e;
}

.popup.error .popup-content {
  border-left: 6px solid red;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Footer */
.footer {
  background: #222;
  color: #ddd;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .hero h2 {
    font-size: 1.3rem;
  }
}
