/* ====== NAVBAR BASE ====== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f4f0;
  padding: 8px 16px;
  border-bottom: 0px solid #eee;
  position: relative;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo { 
  height: 70px;
  width: auto;
}

/* ====== HAMBURGER ====== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1002;
}

.bar {
  width: 22px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.open .bar:nth-child(3) {
  transform: rotate(-49deg) translate(4px, -5px);
}

/* ====== SEARCH ====== */
.search-container {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.search-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 4px 10px;
  background: #f9f4f0;
  transition: all 0.3s ease;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 6px;
  font-size: 14px;
}

.search-icon {
  width: 20px;
  height: 20px;
}

/* ====== RIGHT SECTION ====== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: black;
  font-size: 14px;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cart-icon {
  width: 24px;
  height: 24px;
  margin-left: 10px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
}

/* ====== MOBILE RESPONSIVE ====== */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
    z-index: 1001;
  }

  .menu.active {
    display: flex;
    animation: dropdown 0.3s ease forwards;
  }

  .nav-link {
    font-size: 16px;
    text-align: center;
    padding: 10px;
  }

  .search-toggle {
    display: block;
  }

  .search-bar {
    display: none;
    position: absolute;
    top: 60px;
    left: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
    padding: 10px 14px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    border-radius: 30px;
    z-index: 1005;
  }

  .search-bar.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes dropdown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
