@import url('colors.css');

/* ===== Topbar ===== */
.topbar {
  background: #fff;
  padding: 14px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 0 12px 2px var(--color-shadow);
  gap: 20px;
  flex-shrink: 0;
}

.left-section { display: flex; align-items: center; gap: 15px; flex: 1; }

.drawer-toggle {
  cursor: pointer;
  font-size: 18px;
  color: #6c757d;
  padding: 15px;
  border-radius: 8px;
  transition: all 0.3s;
}

.drawer-toggle:hover { transform: scale(1.05); }

.search { position: relative; max-width: 400px; width: 100%; }

.search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 16px;
}

.search input {
  width: 100%;
  padding: 8px 80px 8px 36px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  background: var(--color-bg-light);
  height: 38px;
}

.search input:focus {
  background: #e6e9f1;
  outline: none;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #c44518 0%, #f49d1a 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
}

.store-btn:hover { transform: translateY(-2px); }

/* ===== MOBILE DRAWER SUPPORT ===== */
/* Mobile overlay for drawer */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  /*background: #fff;*/
  box-shadow: 2px 0 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease-in-out;
  z-index: 2000;
  /* Add any other existing drawer styles here */
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1900;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Mobile Search Bar ===== */
.mobile-search-bar {
  display: none; /* hidden by default */
  align-items: center;
  padding: 10px 15px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  gap: 10px;
  z-index: 1200;
}

/* Show when active */
.mobile-search-bar.active {
  display: flex;
  justify-content: space-between;
}

/* Back icon plain */
.mobile-search-bar i#backToTopbar {
  font-size: 20px;
  cursor: pointer;
  background: none;
  border: none;
  color: #333;
}

/* Search input container with icon inside */
.mobile-search-bar .search-wrapper {
  position: relative;
  flex: 1; /* expand to fill remaining width */
}

.mobile-search-bar .search-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 36px; /* left padding for icon */
  border-radius: 8px;
  font-size: 14px;
  background: #f9f9f9;
  height: 40px;
}

.mobile-search-bar .search-wrapper .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  font-size: 16px;
}

@media (min-width: 769px) {
  .mobile-search-bar {
    display: none !important; /* force hide on desktop */
  }

  
}


/* Mobile drawer behavior */
@media (max-width: 768px) {
  .drawer {
    transform: translateX(-100%); /* Hidden by default */
    z-index: 2000;
  }
  
  .drawer.mobile-open {
    transform: translateX(0); /* Slide in */
  }
}

#langDropdown,
#avatarDropdown {
    display: none;
}

#langDropdown.open,
#avatarDropdown.open {
    display: block;
}

#avatarDropdown,
#langDropdown {
  position: absolute;
  z-index: 3000;
}
#langDropdown,
#avatarDropdown {
  display: none;
  position: absolute;
  z-index: 3000;
}

