/* Global Search Bar (below header) */
.rb-gs-bar{
  background: #f6f7f8;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 14px 0;
}

/* Use your existing container width if you already have .rb-container */
.rb-container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.rb-gs{
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.rb-gs-inputwrap{
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.rb-gs-ic{
  width: 18px;
  height: 18px;
  opacity: .7;
  flex: 0 0 auto;
}

.rb-gs input{
  width: 100%;
  border: 0;
  outline: none;
  font-size: 14px;
  background: transparent;
}

.rb-gs-btn{
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  background: #111;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

.rb-gs-btn:hover{ filter: brightness(.95); }

/* Dropdown */
.rb-gs-dd{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

.rb-gs-dd.is-open{ display: block; }

.rb-gs-item{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  text-decoration: none;
  color: #111;
  border-top: 1px solid rgba(0,0,0,.06);
}

.rb-gs-item:first-child{ border-top: 0; }

.rb-gs-item:hover{
  background: rgba(0,0,0,.04);
}

.rb-gs-item small{
  color: rgba(0,0,0,.60);
  font-size: 12px;
}

/* Mobile */
@media (max-width: 640px){
  .rb-gs{
    max-width: 100%;
    gap: 8px;
  }
  .rb-gs-btn{
    padding: 12px 14px;
  }
}
/* dropdown container */
.rb-gs-dd{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 10px);
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  box-shadow:0 12px 30px rgba(0,0,0,.12);
  overflow:hidden;
  z-index:99999;
}

/* make list scrollable when many results */
.rb-gs-dd{
  max-height: 320px;
  overflow-y: auto;
}

/* items */
.rb-gs-item{
  display:block;
  padding:12px 14px;
  text-decoration:none;
  color:#111;
  border-bottom:1px solid rgba(0,0,0,.06);
}

.rb-gs-item:last-child{ border-bottom:none; }

.rb-gs-item:hover{
  background: rgba(0,0,0,.03);
}

.rb-gs-title{
  font-size:14px;
  font-weight:700;
  line-height:1.2;
}

.rb-gs-meta{
  font-size:12px;
  color:#666;
  margin-top:4px;
}

/* special top item */
.rb-gs-item--all{
  background: rgba(0,0,0,.02);
}

/* wrapper must be relative for absolute dropdown */
.rb-gs{
  position: relative;
}

/* nice scrollbar */
.rb-gs-dd::-webkit-scrollbar{ width:10px; }
.rb-gs-dd::-webkit-scrollbar-track{ background:transparent; }
.rb-gs-dd::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius:999px;
  border:3px solid #fff;
}

.rb-gs-bar { padding: 14px 0; background: #f7f7f7; border-bottom: 1px solid #eee; }
.rb-gs { position: relative; max-width: 720px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.rb-gs-inputwrap{
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 10px 14px;
}
.rb-gs-ic{ width:18px; height:18px; opacity:.65; }
.rb-gs input{ width:100%; border:0; outline:0; font-size:14px; background:transparent; }

.rb-gs-btn{
  border:0;
  border-radius: 999px;
  padding: 10px 16px;
  background:#111;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.rb-gs-dd{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.10);
  display: none;
  overflow: hidden;
  z-index: 9999;
}
.rb-gs-dd.is-open{ display:block; }

.rb-gs-dd{
  max-height: 340px;       /* ✅ scrollable */
  overflow-y: auto;
}

.rb-gs-item{
  display:flex;
  gap:12px;
  padding:12px;
  text-decoration:none;
  color:#111;
  border-bottom:1px solid #f1f1f1;
}
.rb-gs-item:hover{ background:#fafafa; }

.rb-gs-thumb{
  width:56px; height:42px;
  border-radius:10px;
  overflow:hidden;
  background:#f2f2f2;
  flex: 0 0 auto;
}
.rb-gs-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.rb-gs-txt{ flex:1; min-width:0; }
.rb-gs-row1{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.rb-gs-title{ font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rb-gs-price{ font-weight:800; font-size:13px; color:#111; white-space:nowrap; }
.rb-gs-row2{ display:flex; gap:10px; margin-top:4px; font-size:12px; color:#666; }
.rb-gs-cat{ font-weight:700; color:#444; }
.rb-gs-item--all .rb-gs-all{ font-weight:800; padding: 4px 0; }
