* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f7fff9;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #27ae60;
  color: #fff;
  padding: 15px 25px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 20px;
}

.logo img {
  width: 35px;
  height: 35px;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #dfffe3;
}

/* ICONS */
.icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.icons .cart-icon {
  background-color: white;
  color: black;
  padding: 4px 5px;
  border-radius: 5px;
}

.menu-icon {
  display: none;
  cursor: pointer;
  font-size: 24px;
}

/* HOME */
.home {
  background: url('images/hero.png') center/cover no-repeat;
  height: 550px;
}

.home .text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 30px 40px;
  border-radius: 10px;
  text-align: center;
  max-width: 600px;
  height: 250px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.home .text h1 {
  font-size: 32px;
  color: #2e8b57;
  margin-bottom: 10px;
}

.home .text .btn {
  background: #2e8b57;
  color: white;
  padding: 10px 20px;
  position: relative;
  top: 30px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.home .text .btn:hover {
  background: #256d46;
}

/* PRODUCTS */
.products {
  padding: 40px 20px;
  text-align: center;
}

.products h2 {
  color: #2e8b57;
  font-size: 26px;
}

/* SEARCH + FILTER BAR */
.filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  width: 220px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  outline: none;
  border-color: #2e8b57;
  box-shadow: 0 0 5px rgba(46, 139, 87, 0.4);
}

.product-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.product {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product img {
  width: 100%;
  border-radius: 10px;
}

.product button {
  margin-top: 10px;
  background: #2e8b57;
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
}

.product button:hover {
  background: #256d46;
}

/* ABOUT */
.about {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0px 30px;
}

.about .left {
  padding: 60px 0px;
}

.about .left img {
  width: 450px;
}

.about .right {
  margin-left: 30px;
  margin-top: 55px;
}

.about .right h1 {
  font-size: 2em;
  color: #27ae60;
}

.about .right p {
  padding-top: 15px;
  color: #666;
  line-height: 1.5;
}

.about .right button {
  background-color: #27ae60;
  color: white;
  padding: 10px 25px;
  border-radius: 10px;
  border: none;
  margin-top: 20px;
}

.about .right button:hover {
  background-color: #256d46;
  letter-spacing: 3px;
}

/* CONTACT */
.contact {
  background: #fff;
  padding: 60px 10%;
  text-align: center;
}

.contact h2 {
  color: #2e8b57;
  font-size: 26px;
  margin-bottom: 10px;
}

.contact p {
  color: #555;
  margin-bottom: 30px;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: flex-start;
}

.contact-info,
.contact-form {
  flex: 1 1 350px;
  background: #f9fff8;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
  color: #2e8b57;
  margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.contact-form button {
  background: #2e8b57;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: #256d46;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  background: #27ae60;
  color: white;
  margin-top: 40px;
}

/* CART SIDEBAR */
.cart-sidebar {
  position: fixed;
  top: 70px;
  right: -350px;
  width: 320px;
  height: calc(100% - 70px);
  background: #fff;
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  transition: right 0.3s ease;
  overflow-y: auto;
  z-index: 999;
}

.cart-sidebar.active {
  right: 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.cart-item div button {
  background: #2e8b57;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.cart-item div button:hover {
  background: #256d46;
}

/* CONFIRM ORDER BUTTON */
#confirmOrder {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  width: 100%;
  border-radius: 5px;
  margin-top: 10px;
  font-weight: bold;
  transition: background 0.3s;
}

#confirmOrder:hover {
  background: #0056b3;
}

#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #2e8b57;
  /* brand color */
  color: white;
  border: none;
  border-radius: 50%;
  padding: 12px 16px;
  cursor: pointer;
  display: none;
  /* marka hore lama muujinayo */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#backToTop:hover {
  background-color: #256b45;
}



/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .product-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .product img {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .product-list {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 20px;
    background: #27ae60;
    width: 200px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    z-index: 1000;
  }

  .nav-links a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-icon {
    display: block;
  }

  .contact-container {
    flex-direction: column;
  }

  .about {
    flex-direction: column;
    padding: 20px;
    align-items: center;
    /* dhex dhig */
    text-align: center;
    /* qoraalka dhex dhig */
  }

  .about .right {
    margin-left: 0;
    /* ka saar left margin */
    margin-top: 20px;
    /* kor u dhig yara */
  }

  .about .right h1 {
    font-size: 28px;
    /* yarso font-ka si uusan u buuxin width-ka */
  }

  .about .right button {
    margin: 20px auto 0 auto;
    /* button-ka dhex dhig */
    display: block;
  }

  .about .left img {
    width: 90%;
    /* sawirka yaree si uu u habboonaado */
    max-width: 400px;
    /* max width */
  }

  .home .text {
    width: 90%;
  }


  .contact-container {
    flex-direction: column;
    align-items: center;
    /* dhex dhig labadaba contact-info iyo contact-form */
  }

  .contact-info,
  .contact-form {
    width: 90%;
    /* ballac dhexe u samee */
    max-width: 400px;
    /* max-width si aysan u buuxin shaashadda */
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
  }

  .filter-bar input,
  .filter-bar select {
    width: 45%;
    min-width: 140px;
  }
}