        /* ---------- overlay base ---------- */
#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  z-index: 9990000000000009;
  display: none; /* show via JS */
  -webkit-overflow-scrolling: touch;
}

/* modal container */
.search-modal {
  width: min(1100px, 96%);
  max-width: 1100px;
  height: min(90vh, 820px);
  margin: 4vh auto;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 60px rgba(0,0,0,0.12);
  background: #fff;
}

/* top search bar */
.search-top {
  display:flex;
  align-items:center;
  gap:10px;
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
}
#overlay-close {
  border:0;
  background:#ef4e3a;
  color:#fff;
  width:36px;height:36px;border-radius:50%;
  cursor:pointer;
  font-size:16px;
  padding: 0
}
#overlay-search-form{ display:flex; flex:1; gap:8px; align-items:center; }
#overlay-search-input{
  flex:1; padding:12px 14px; font-size:16px; border-radius:8px; border:1px solid #ddd;
  outline:none;
}
#overlay-search-input:focus{ box-shadow: 0 4px 18px rgba(0,0,0,0.06); border-color:#cfcfcf; }
#overlay-search-submit{
  background:#1f3a77; color:#fff; border:0; padding:10px 14px; border-radius:8px; cursor:pointer;
}
#overlay-clear{ background:transparent; border:0; font-size:18px; cursor:pointer; color:#888; }

/* body area */
.search-body { display:flex; gap:0; flex:1; min-height:0; } /* min-height:0 -> enable child scroll */
#search-suggestions {
  flex: 1 1 60%;
  padding: 16px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  min-width: 300px;
  border-right:1px solid #f2f2f2;
}

/* suggestion item */
.sugg-item {
  display: flex; gap:12px; align-items:center; padding:10px; border-radius:8px;
  cursor: pointer; margin-bottom:8px; transition: background .12s;
  border:1px solid transparent;
}
.sugg-item:hover, .sugg-item.active {
  background: #f5f9ff; border-color:#e6f0ff;
}
.sugg-thumb{ width:64px; height:64px; object-fit:cover; border-radius:6px; flex:0 0 64px; background:#f6f6f6; }
.sugg-meta{ flex:1; min-width:0; }
.sugg-title{ font-weight:700; font-size:14px; color:#222; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.sugg-sub{ color:#666; font-size:13px; margin-top:6px; display:flex; gap:8px; align-items:center; }
.sugg-price{ color:#e74c3c; font-weight:700; }

/* right column (recent searches · categories · view all) */
#search-footer {
  width: 360px;
  max-width: 40%;
  padding: 16px;
  overflow:auto;
}
#recent-title{ font-weight:700; margin-bottom:8px; color:#333; }
#recent-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.recent-item{ padding:8px 10px; background:#f8f9fb; border-radius:8px; cursor:pointer; color:#333; font-size:14px; }
.recent-item small{ color:#888; display:block; font-size:12px; }

/* empty / loading */
.sugg-empty{ color:#666; padding:12px; }
.sugg-loading{ color:#666; padding:12px; }

/* responsive */
@media (max-width:900px){
  .search-modal{ width:98%; height:94vh; margin:3vh auto; }
  #search-suggestions{ flex:1 1 100%; border-right:none; }
  #search-footer{ display:block; width:100%; padding:12px; border-top:1px solid #f2f2f2; }
  .sugg-thumb{ width:56px; height:56px; }
}

/* print: nothing */
@media print{ #search-overlay{ display:none !important; } }
            .btn-primary{
                background: #1f3a77;
                box-shadow: none;
            }
            .btn-primary:hover , .btn-primary:focus , .btn-primary:active{
                background: #122d6a !important;
                box-shadow: none;
            }
            .not_span{
                background: #dd0000;
                color: white;
                padding: 0px 10px;
                font-size: 11px;
                border-radius: 20px;
                position: absolute;
                top: 0;
                right: -5px;
            }

        
