/* VBE shared header layout. One file for every visitor page, including index.php.
   Logo on the LEFT, search on the RIGHT, on phones and on larger screens.
   Loaded by includes/ui/header.php after the other site styles, so it wins the cascade. */

/* page stylesheets still carry old copies of the header rules: lock the container so the row always fills the width */
header .header-main{display:flex !important;flex-direction:column !important;align-items:stretch !important;justify-content:flex-start !important;width:100% !important;max-width:none !important;margin:0 !important}
header .header-row-top{
  width:100% !important;box-sizing:border-box;
  display:flex !important;align-items:center;justify-content:flex-start;gap:14px;
  grid-template-columns:none !important;
}
header .header-row-top .logo{flex:0 0 auto;margin-right:auto;grid-column:auto !important}

/* search on the right */
header .header-search{
  grid-column:auto !important;position:relative;flex:0 1 460px !important;width:100% !important;max-width:460px !important;min-width:0;
  height:auto !important;overflow:visible !important;justify-self:auto !important;margin:0 !important;
}
header .header-search .vbe-sf{margin:0;position:relative}
header .nav-search-glass{display:flex !important;height:44px}
header .nav-search-input{flex:1;min-width:0}
header .header-start-selling{flex:0 0 auto;grid-column:auto !important}

/* phone search button: right edge */
header .mobile-search-btn{display:none;flex:0 0 auto;margin-left:auto;grid-column:auto !important}

@media (max-width:860px){
  header .header-row-top{padding:8px 14px !important;gap:10px}
  header .header-search,
  header .header-start-selling{display:none !important}
  header .mobile-search-btn{display:flex !important}
  header .header-nav{display:none !important}
}
@media (max-width:600px){ header .header-row-top{padding:8px 12px !important} }
@media (min-width:861px) and (max-width:1020px){ header .header-search{flex-basis:340px !important;max-width:340px !important} }

/* ---------- suggestions (desktop dropdown and phone panel) ---------- */
.vbe-sr{
  position:absolute;top:calc(100% + 8px);right:0;width:min(560px,92vw);max-height:min(70vh,560px);overflow-y:auto;
  background:#fff;color:#111;border:1px solid #e6e6e8;border-radius:14px;box-shadow:0 18px 44px -14px rgba(0,0,0,.35);
  z-index:1000;padding:6px;text-align:left;font:400 14px/1.4 inherit;
}
.vbe-sr[hidden]{display:none}
.vbe-sr-h{padding:10px 12px 4px;font:700 11px/1 inherit;letter-spacing:.06em;text-transform:uppercase;color:#6b6b72}
.vbe-sr a.vbe-sr-i{display:block;padding:9px 12px;border-radius:10px;color:#111;text-decoration:none}
.vbe-sr a.vbe-sr-i:hover,.vbe-sr a.vbe-sr-i.is-on{background:#f3f3f5}
.vbe-sr-t{display:block;font-weight:600;color:#111;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vbe-sr-m{display:block;margin-top:2px;font-size:12.5px;color:#5c5c63;white-space:normal;overflow-wrap:anywhere}
.vbe-sr-p{font-weight:700;color:#C81E2C}
.vbe-sr-u{padding:8px 12px 6px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:12px;color:#5c5c63}
.vbe-sr-c{padding:3px 9px;border-radius:999px;background:#f3f3f5;color:#222;font-weight:600}
.vbe-sr-ai{padding:3px 8px;border-radius:6px;background:#111;color:#fff;font-weight:700;font-size:10.5px;letter-spacing:.04em}
.vbe-sr-n{padding:6px 12px;font-size:13px;color:#7a4a00}
.vbe-sr-e{padding:16px 12px;color:#5c5c63}
.vbe-sr a.vbe-sr-all{display:block;margin-top:4px;padding:11px 12px;border-top:1px solid #eee;text-align:center;font-weight:700;color:#C81E2C;text-decoration:none;border-radius:0 0 10px 10px}
.vbe-sr a.vbe-sr-all:hover{background:#fdf0f1}

/* ---------- phone search panel ---------- */
#vbeMobSearch[hidden]{display:none}
#vbeMobSearch{position:fixed;inset:0;z-index:99999;background:rgba(15,15,15,.55);padding:max(12px,env(safe-area-inset-top)) 12px 12px;overflow-y:auto}
#vbeMobSearch .vbe-ms-panel{width:100%;max-width:560px;margin:0 auto}
#vbeMobSearch .vbe-ms-box{display:flex;gap:8px;align-items:center;background:#fff;border-radius:14px;padding:10px;box-shadow:0 18px 40px -12px rgba(0,0,0,.45)}
#vbeMobSearch input{flex:1;min-width:0;border:1px solid #d9d9d9;border-radius:10px;padding:12px;font-size:16px;color:#111;background:#fff}
#vbeMobSearch button[type=submit]{border:0;border-radius:10px;padding:12px 16px;font-weight:700;background:#C81E2C;color:#fff;cursor:pointer}
#vbeMobSearch #vbeMobSearchClose{border:0;background:transparent;font-size:28px;line-height:1;color:#555;cursor:pointer;padding:0 6px}
#vbeMobSearch .vbe-sr-mob{position:static;width:100%;max-height:none;margin-top:8px;box-shadow:0 14px 30px -12px rgba(0,0,0,.4)}
