/* ============================================================
   KEY4GAMES — header + search + mobile nav
   ============================================================ */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(11,13,21,.82);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.hbar{display:flex;align-items:center;gap:22px;padding:14px 0}
.logo{display:flex;align-items:center;gap:11px;flex-shrink:0}
.lmark{width:38px;height:38px;border-radius:10px;box-shadow:0 8px 20px -8px rgba(139,92,246,.7);flex-shrink:0}
.ltxt{display:flex;flex-direction:column;line-height:1}
.ltxt b{font-family:'Space Grotesk','Inter',sans-serif;font-weight:700;font-size:21px;letter-spacing:.06em}
.ltxt b i{font-style:normal;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.ltxt>span{font-size:8.5px;letter-spacing:.3em;text-transform:uppercase;color:var(--muted);margin-top:4px}

/* search */
.searchbar{position:relative;flex:1;display:flex;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:visible;min-width:0}
.searchbar:focus-within{border-color:rgba(139,92,246,.5)}
.cat-btn{display:flex;align-items:center;gap:8px;padding:11px 16px;font-size:13.5px;font-weight:500;color:var(--muted);border-right:1px solid var(--line);white-space:nowrap;transition:color .2s;border-radius:12px 0 0 12px}
.cat-btn:hover{color:var(--text)}
.cat-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.searchbar input{flex:1;background:none;border:none;color:var(--text);padding:11px 16px;font-size:14px;min-width:0;appearance:none;-webkit-appearance:none}
.searchbar input::placeholder{color:var(--dim)}
.searchbar input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.searchbar input:focus{outline:none}
.search-go{background:var(--grad);width:44px;align-self:stretch;display:grid;place-items:center;transition:filter .2s;border-radius:0 11px 11px 0}
.search-go:hover{filter:brightness(1.15)}
.search-go svg{width:17px;height:17px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round}

/* dropdown menus (categories / currency) */
.cat-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:60;min-width:210px;max-width:min(300px,calc(100vw - 32px));max-height:min(70vh,520px);overflow-y:auto;overscroll-behavior:contain;background:var(--panel2);border:1px solid var(--line2);border-radius:12px;padding:8px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:2px}
.cat-menu a{display:block;padding:9px 12px;border-radius:8px;color:var(--muted);font-size:13.5px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat-menu a:hover{background:rgba(255,255,255,.05);color:var(--text)}
/* second level: curated sub-items (Video Games → PC / Console). Rendered inline,
   not as a hover flyout — the panel is already a JS-toggled dropdown, and a
   flyout would be unreachable on touch. */
.cat-menu .cat-sub{display:flex;flex-direction:column;gap:2px;margin:0 0 4px 10px;padding-left:8px;border-left:1px solid var(--line2)}
.cat-menu .cat-sub a{font-size:13px;color:var(--dim)}
.cat-menu .cat-sub a:hover{color:var(--text)}
/* a parent that groups children reads as a heading */
.cat-menu .cat-group{padding:9px 12px 5px;color:var(--text);font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.cat-menu .cat-link-group{color:var(--text);font-weight:600}

.hactions{position:relative;display:flex;align-items:center;gap:10px;flex-shrink:0}
.chip-btn{display:flex;align-items:center;gap:7px;padding:9px 13px;border:1px solid var(--line);border-radius:10px;font-size:13px;font-weight:600;color:var(--muted);transition:.2s}
.chip-btn:hover{color:var(--text);border-color:var(--line2)}
.cur-menu{position:absolute;top:calc(100% + 8px);right:118px;z-index:60;list-style:none;min-width:120px;background:var(--panel2);border:1px solid var(--line2);border-radius:12px;padding:6px;box-shadow:var(--shadow)}
.cur-menu .cur-opt{display:block;width:100%;text-align:left;padding:8px 12px;border-radius:8px;color:var(--muted);font-weight:600;font-size:13px}
.cur-menu .cur-opt:hover,.cur-menu .cur-opt.is-active{background:rgba(139,92,246,.16);color:var(--text)}

.icon-btn{position:relative;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;color:var(--muted);transition:.2s}
.icon-btn:hover{color:var(--text);border-color:var(--line2)}
.icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-btn .bdg{position:absolute;top:-6px;right:-6px;min-width:17px;height:17px;padding:0 4px;border-radius:99px;background:var(--grad);color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center}
.signin{display:flex;align-items:center;gap:8px;padding:9px 16px;border-radius:10px;background:var(--grad);color:#fff;font-size:13.5px;font-weight:600;box-shadow:0 8px 24px -8px rgba(139,92,246,.5);transition:.2s;white-space:nowrap}
.signin:hover{filter:brightness(1.12)}
.signin svg{width:15px;height:15px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* mobile nav (added — prototype had none) */
.nav-toggle{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;place-items:center;color:var(--muted);flex-shrink:0}
.nav-toggle:hover{color:var(--text);border-color:var(--line2)}
.nav-toggle svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nav-toggle[aria-expanded="true"]{color:var(--text);border-color:var(--violet)}
.mobile-nav{border-top:1px solid var(--line);background:var(--bg2)}
.mnav-list{list-style:none;display:flex;flex-direction:column}
.mnav-list a{display:block;padding:13px 4px;color:var(--muted);font-weight:600;border-bottom:1px solid var(--line)}
.mnav-list li:last-child a{border-bottom:none}
.mnav-list a:hover{color:var(--text)}

/* ============ RESPONSIVE ============ */
@media (max-width:1020px){
  .chip-btn.hide-m{display:none}
}
@media (max-width:860px){
  .nav-toggle{display:grid}
}
@media (max-width:760px){
  .hbar{flex-wrap:wrap;row-gap:10px}
  .searchbar{order:5;flex-basis:100%}
}
@media (max-width:640px){
  .cat-btn span{display:none}
  .signin span{display:none}
  .signin{padding:9px 11px}
  .hbar{gap:10px}
}
