/* ================= GLOBAL ================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.menu-open {
  overflow: hidden;
}

/* ================= NAVBAR ================= */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #1f5d3a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  font-size: 14px;
}
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
}

body {
  padding-top: 110px; 
}

.navbar {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
}

body {
  padding-top: 120px; /* عدلي حسب ارتفاع النافبار */
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
}

/* ================= LOGO ================= */

.site-logo img {
  width: 170px;
  max-width: 100%;
}

/* ================= LINKS (Desktop) ================= */

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.nav-links a {
  font-size: 16px;
  font-weight: 600;
  color: #1f5d3a;
  text-decoration: none;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #f2b705;
}

/* ================= ICONS ================= */

.nav-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -6px;
  left: -8px;
  background: #f2b705;
  color: #000;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
}

/* ================= MENU BUTTON ================= */

.menu-toggle {
  width: 28px;
  height: 22px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1200;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background: #1f3d1b;
  border-radius: 2px;
  transition: 0.3s ease;
}

/* Animation to X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

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

/* ================= MOBILE ================= */

@media (max-width: 900px) {

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;           /* مخفية افتراضياً */
    position: fixed;
    inset: 0;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 1100;
  }

  .nav-links.active {
    display: flex;           /* تظهر فقط عند الفتح */
  }

  .nav-links a {
    font-size: 22px;
  }
}
