/* === Site header ===
   One row on desktop: brand · navigation · search · actions.
   At 900px and below: brand · search · menu (the drawer holds navigation and actions).
   Loaded after style.css, mobile.css and catalog.css, so it owns every header rule. */

/* Same header at every width (the look phones already had): it blends into the page at the top
   and turns into a frosted bar once you scroll. mobile.css used to turn it into an inset,
   rounded, clipped card between 768px and 960px; the !important rules below undo that. */
.site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-scrolled {
  background: rgba(6, 6, 15, .86) !important;
  border-bottom-color: rgba(124, 58, 237, .18) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: .6rem var(--page-gutter, 1.5rem) !important; /* same side gutter as the page content */
  flex-wrap: nowrap !important;
}

/* Fixed order: older mobile.css rules reorder these between 900px and 1180px. */
.site-header .logo { order: 0; }
.site-header .nav-tabs { order: 1; }
.site-header .search-form { order: 2; }
.site-header .header-actions { order: 3; }

/* Brand */
.site-header .logo { flex: none; margin: 0; padding: 0; line-height: 0; border-radius: 8px; }
.site-header .logo img { width: 156px; height: auto; filter: drop-shadow(0 0 10px rgba(124, 58, 237, .4)); }
.site-header .logo:hover { filter: none; }
.site-header .logo:hover img { filter: drop-shadow(0 0 14px rgba(167, 139, 250, .6)); }
.site-header .logo:focus-visible { outline: 2px solid var(--accent-lilac); outline-offset: 4px; }

/* Navigation */
.site-header .nav-tabs {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: .15rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  justify-content: flex-start;
}
.site-header .nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--text-secondary);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.site-header .nav-tab:hover { color: var(--text-primary); background: rgba(124, 58, 237, .1); }
.site-header .nav-tab.active { color: #fff; background: rgba(124, 58, 237, .2); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .32); }
.site-header .nav-tab:focus-visible { outline: 2px solid var(--accent-lilac); outline-offset: 2px; }
.site-header .nav-tab svg { flex: none; color: var(--accent-lilac); }

/* Search */
.site-header .search-form {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  width: auto;
  min-width: 180px;
  max-width: 400px;
  height: 40px;
  margin-left: auto;
  padding: 0 .3rem 0 .85rem;
  overflow: visible;
  background: rgba(17, 17, 34, .9);
  border: 1px solid rgba(124, 58, 237, .22);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.site-header .search-form:hover { border-color: rgba(167, 139, 250, .4); }
.site-header .search-form:focus-within {
  background: #121226;
  border-color: var(--accent-lilac);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .25);
}
.site-header .search-form-icon { flex: none; color: var(--text-secondary); }
.site-header .search-form:focus-within .search-form-icon { color: var(--accent-lilac); }
.site-header .search-form input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 .6rem;
  opacity: 1;
  pointer-events: auto;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font: inherit;
  font-size: .88rem;
}
.site-header .search-form input::placeholder { color: #7a7a98; }
.site-header .search-form input::-webkit-search-cancel-button { display: none; }
.search-form-kbd {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .35rem;
  border: 1px solid rgba(167, 139, 250, .3);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--text-secondary);
  font: 700 .72rem/1 var(--font);
}
.site-header .search-form:focus-within .search-form-kbd,
.site-header .search-form.has-value .search-form-kbd { display: none; }
.site-header .search-form .search-submit {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.site-header .search-form.has-value .search-submit { display: inline-flex; }
.site-header .search-form .search-submit:hover { background: var(--accent-hover); }

/* Actions */
.site-header .header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.site-header .upload-btn,
.site-header .bell-btn,
.site-header .profile-btn,
.site-header .mobile-search-btn {
  height: 38px;
  margin: 0;
  flex: none;
}
.site-header .upload-btn { padding: 0 .85rem; gap: .4rem; font-size: .8rem; color: var(--text-primary); }
.site-header .bell-btn { width: 38px; margin: 0; color: var(--text-secondary); }
.site-header .profile-btn { width: 38px; }
.site-header .mobile-search-btn {
  display: none;
  width: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(124, 58, 237, .22);
  border-radius: 12px;
  background: rgba(17, 17, 34, .9);
  color: var(--text-primary);
  cursor: pointer;
}
.site-header .mobile-search-btn:hover { border-color: var(--accent-lilac); }
.site-header .nav-hamburger { margin: 0; }

/* Suggestions (header, drawer and hero searches share this dropdown) */
.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  min-width: 300px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: .4rem;
  background: #0f0f20;
  border: 1px solid rgba(167, 139, 250, .3);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .3);
  text-align: left;
}
.search-suggest[hidden] { display: none; }
.search-suggest-heading {
  margin: .45rem .55rem .3rem;
  color: var(--text-secondary);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.search-suggest-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
}
.search-suggest-item:hover,
.search-suggest-item.is-active { background: rgba(124, 58, 237, .18); color: #fff; }
.search-suggest-thumb {
  flex: none;
  width: 56px;
  height: 36px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(135deg, #1d1d3a, #12122a);
  color: var(--accent-lilac);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.search-suggest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-suggest-text { min-width: 0; display: grid; gap: .05rem; }
.search-suggest-title { overflow: hidden; font-size: .88rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.search-suggest-title mark { background: none; color: var(--accent-highlight); }
.search-suggest-meta { overflow: hidden; color: var(--text-secondary); font-size: .72rem; white-space: nowrap; text-overflow: ellipsis; }
.search-suggest-labels { display: flex; flex-wrap: wrap; gap: .35rem; padding: .2rem .55rem .45rem; }
.search-suggest-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .65rem;
  border: 1px solid rgba(167, 139, 250, .28);
  border-radius: 99px;
  color: var(--text-primary);
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
}
.search-suggest-label small { color: var(--text-secondary); font-size: .68rem; }
.search-suggest-label:hover,
.search-suggest-label.is-active { border-color: var(--accent-lilac); background: rgba(124, 58, 237, .18); color: #fff; }
.search-suggest-all {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .3rem;
  padding: .6rem .55rem;
  border-top: 1px solid rgba(124, 58, 237, .16);
  border-radius: 0 0 10px 10px;
  color: var(--accent-highlight);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}
.search-suggest-all:hover,
.search-suggest-all.is-active { background: rgba(124, 58, 237, .14); color: #fff; }
.search-suggest-empty { padding: .8rem .6rem; color: var(--text-secondary); font-size: .84rem; }
.catalog-hero-search { position: relative; }
.search-suggest.search-suggest-inline {
  position: static;
  min-width: 0;
  max-height: none;
  margin: .5rem 0 .25rem;
  box-shadow: none;
}

/* Compact desktop */
@media (min-width: 901px) and (max-width: 1180px) {
  .site-header .header-inner { gap: .65rem; }
  .site-header .logo img { width: 124px; }
  .site-header .nav-tab { padding: .45rem .55rem; font-size: .8rem; }
  .site-header .nav-tab-icon .nav-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-header .search-form { min-width: 150px; }
  .site-header .search-form-kbd { display: none; }
  .site-header .upload-btn { width: 38px; padding: 0; justify-content: center; }
  .site-header .upload-btn span { display: none; }
}

/* Drawer layout */
@media (max-width: 900px) {
  .site-header { top: 0; border-radius: 0; }
  .site-header .header-inner { min-height: 60px; padding: .55rem var(--page-gutter, 1rem) !important; gap: .5rem !important; }
  .site-header .logo img { width: clamp(118px, 36vw, 150px); }
  .site-header .nav-tabs,
  .site-header .search-form,
  .site-header .upload-btn { display: none !important; }
  .site-header .header-actions { margin-left: auto; }
  .site-header .mobile-search-btn { display: inline-flex; }
  .site-header .bell-btn,
  .site-header .profile-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  .site-header .bell-btn,
  .site-header .profile-btn { display: none; }
}

/* mobile.css zeroes .header-inner side padding up to 960px; keep the header on the page gutter there too. */
@media (max-width: 960px) {
  .site-header .header-inner { padding-left: var(--page-gutter) !important; padding-right: var(--page-gutter) !important; }
}
