/* Header search + category bar — landing design (minimal scope) */

.header-home .onSearchClick-content {
  display: block;
}

@media (max-width: 991px) {
  .header-home .onSearchClick-content:not(.onSearchClick-fixed) {
    display: none;
  }
}

.header-search-shell {
  width: 100%;
}

.header-search-shell--fixed {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  max-width: 100%;
  z-index: 999;
  background: var(--color-bg-surface);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.header-home .header-search-shell--fixed {
  border-bottom: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.header-search-shell--fixed .header-body {
  padding: 12px 0 10px;
}

.header-search-shell--categories-open .header-body {
  padding-bottom: 0;
}

.header-home .header-body {
  padding: 8px 0 16px;
}

.header-home .header-search-shell--categories-open .header-body {
  padding-bottom: 0;
}

.header-home .logo-bx-outer.searchLogo {
  display: none;
}

.header-search-shell--fixed .header-search-inner-bx {
  max-width: none;
  margin: 0;
}

.header-search-cancel-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  min-height: 48px;
  border: 2px solid var(--color-border-default);
  border-radius: 999px;
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.header-search-cancel-pill:hover,
.header-search-cancel-pill:focus-visible {
  color: var(--color-text-link);
  border-color: var(--color-info);
  outline: none;
}

.header-search-row {
  width: 100%;
}

.header-search-row--fixed {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  justify-content: flex-start !important;
}

.header-search-row--fixed .logo-bx-outer {
  flex: 0 0 auto;
  max-width: none;
  width: auto;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.header-search-row--fixed .header-search-controls {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.header-search-row--fixed .header-search-bx {
  max-width: none;
  margin: 0;
  width: 100%;
}

.header-search-row--fixed .header-search-inner-bx {
  margin-top: 0;
}

.header-search-row--fixed .header-search-split {
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.header-search-row--fixed .logo-bx-search {
  min-height: 48px;
}

.header-search-row--fixed .logo-bx-search img {
  display: block;
  max-height: 44px;
  width: auto;
  max-width: 130px;
  height: auto;
  object-fit: contain;
}

.header-search-row--fixed .header-search-categories-pill,
.header-search-row--fixed .header-search-field-pill,
.header-search-row--fixed .header-search-cancel-pill {
  min-height: 46px;
}

.header-search-controls {
  min-width: 0;
  flex: 1 1 auto;
}

.header-search-split {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin-top: 0;
}

.header-home .header-search-shell:not(.header-search-shell--fixed) .header-search-split {
  max-width: 720px;
  margin: 0 auto;
}

.header-home .header-search-shell--fixed .header-search-split {
  max-width: none;
  margin: 0;
}

.header-search-categories-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  min-height: 48px;
  border: 2px solid var(--color-border-default);
  border-radius: 999px;
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.header-search-categories-pill i {
  font-size: 12px;
  color: var(--color-text-secondary);
  transition: transform 0.2s ease;
}

.header-search-categories-pill.is-open {
  color: var(--color-text-link);
  border-color: var(--color-info);
}

.header-search-categories-pill.is-open i {
  transform: rotate(180deg);
}

.header-search-field-pill {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  border: 2px solid var(--color-border-default);
  border-radius: 999px;
  background: var(--color-bg-surface);
  overflow: hidden;
}

.header-search-split .search-and-location {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.header-search-split .search-and-location .MuiAutocomplete-root,
.header-search-split .search-and-location .MuiFormControl-root {
  width: 100%;
}

.header-search-split .search-and-location .MuiAutocomplete-inputRoot {
  border: 0 !important;
  border-radius: 0 !important;
  min-height: 44px;
  padding-right: 8px !important;
  background: transparent !important;
}

.header-search-split .search-and-location .MuiInputLabel-root {
  display: none;
}

.header-search-split .search-and-location .MuiInputBase-input {
  font-size: 14px;
  color: var(--color-text-primary);
}

.header-search-split .search-and-location .MuiInputBase-input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.header-search-split .search-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 4px 6px 4px 0;
}

.header-search-split .search-btn-link {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--color-info) !important;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.header-search-split .search-btn-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-search-split .search-btn-link img {
  filter: brightness(0) invert(1);
}

.header-home .header-body .desktopno_search {
  max-width: 100%;
  flex: 1 1 auto;
}

.header-search-row--fixed .header-search-field-pill {
  flex: 1 1 auto;
}

.header-search-shell--fixed .header-search-row .header-search-bx {
  max-width: none !important;
  margin: 0 !important;
}

.header-search-shell--fixed .header-search-row .header-search-inner-bx {
  margin-top: 0 !important;
}

.header-home .header-body .row:not(.header-search-row--fixed) {
  justify-content: center;
}

.header-home .header-body .row.header-search-row--fixed {
  justify-content: flex-start;
}

.header-search-redesign {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border: 2px solid var(--color-info);
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-bg-surface);
}

.header-search-categories {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.header-search-categories i {
  font-size: 12px;
  color: var(--color-text-secondary);
  transition: transform 0.2s ease;
}

.header-search-categories.is-open {
  color: var(--color-text-link);
}

.header-search-categories.is-open i {
  transform: rotate(180deg);
}

.header-search-redesign .search-and-location {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.header-search-redesign .search-and-location .MuiAutocomplete-root,
.header-search-redesign .search-and-location .MuiFormControl-root {
  width: 100%;
}

.header-search-redesign .search-and-location .MuiAutocomplete-inputRoot {
  border: 0 !important;
  border-radius: 0 !important;
  min-height: 44px;
  padding-right: 8px !important;
  background: transparent !important;
}

.header-search-redesign .search-and-location .MuiInputLabel-root {
  display: none;
}

.header-search-redesign .search-and-location .MuiInputBase-input {
  font-size: 14px;
  color: var(--color-text-primary);
}

.header-search-redesign .search-and-location .MuiInputBase-input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.header-search-redesign .search-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 4px;
}

.header-search-redesign .search-btn-link {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--color-info) !important;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.header-search-redesign .search-btn-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-search-redesign .search-btn-link img {
  filter: brightness(0) invert(1);
}

.header-auth-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 2px solid var(--color-info);
  border-radius: 999px;
  color: var(--color-text-link) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  background: var(--color-bg-surface);
  white-space: nowrap;
  line-height: 1.2;
}

.header-auth-pill--split {
  padding: 0 16px;
  min-height: 40px;
  gap: 0;
}

.header-auth-pill__part {
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  color: var(--color-text-link) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  background: transparent;
}

.header-auth-pill__part:hover {
  color: var(--color-info-hover) !important;
  text-decoration: none !important;
}

.header-auth-pill__sep {
  color: var(--color-text-link);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  margin: 0 6px;
  opacity: 0.85;
  user-select: none;
}

.header-auth-pill--split:hover {
  background: var(--color-info-soft);
}

.header-auth-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  min-height: 40px;
  border: 2px solid var(--color-info);
  border-radius: 999px;
  background: var(--color-bg-surface);
  white-space: nowrap;
}

.header-auth-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  color: var(--color-text-link) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  background: transparent;
}

.header-auth-link:hover {
  color: var(--color-info-hover) !important;
  text-decoration: none !important;
}

.header-auth-divider {
  color: var(--color-text-link);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  margin: 0 6px;
  opacity: 0.85;
  user-select: none;
}

.header-auth-group:hover {
  background: var(--color-info-soft);
}

.header-auth-pill:hover {
  background: var(--color-info-soft);
  color: var(--color-info-hover) !important;
  text-decoration: none !important;
}

.sell_btn--header {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 16px !important;
  font-weight: 600 !important;
}

.sell_btn--header i {
  font-size: 12px;
}

.header-category-bar {
  background: var(--color-info);
  color: var(--color-text-on-accent);
  width: 100%;
}

.header-category-bar.is-open {
  max-height: none;
  opacity: 1;
  visibility: visible;
}

.header-search-shell--categories-open .header-category-bar {
  margin-top: 0;
}

.header-category-bar__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.header-category-bar__list::-webkit-scrollbar {
  display: none;
}

.header-category-bar__list li {
  flex: 0 0 auto;
}

.header-category-bar__list a {
  display: block;
  padding: 12px 18px;
  color: var(--color-text-on-accent) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
}

.header-category-bar__list a:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none !important;
}

@media (min-width: 992px) {
  .header-category-bar__list {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .header-search-shell--fixed .header-category-bar__list {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

@media (max-width: 1199px) {
  .header-search-split {
    gap: 10px;
    max-width: 100%;
  }

  .header-search-categories-pill {
    padding: 0 14px;
    min-height: 44px;
    font-size: 14px;
  }

  .header-search-field-pill {
    min-height: 44px;
  }

  .header-search-split .search-and-location .MuiAutocomplete-inputRoot {
    min-height: 40px;
  }

  .header-search-split .search-btn-link {
    width: 36px;
    height: 36px;
    line-height: 36px;
  }

  .header-search-row--fixed .logo-bx-search img {
    max-height: 40px;
    max-width: 110px;
  }
}

@media (max-width: 991px) {
  /* Reserve document flow space for the fixed top bar */
  header {
    padding-top: 52px;
  }

  .top-header,
  .header-home .top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    background: var(--color-bg-surface);
    box-shadow: 0 1px 0 var(--color-border-default);
  }

  /* Open search panel sits fully below the fixed top bar */
  .header-search-shell--fixed.header-search-shell--toggled {
    position: fixed;
    top: 52px !important;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    overflow: visible;
    background: var(--color-bg-surface);
    box-shadow: var(--color-shadow-sm);
  }

  .onSearchClick-content.onSearchClick-fixed {
    overflow: visible;
  }

  .header-home .header-search-shell--fixed.header-search-shell--toggled {
    background: var(--color-bg-inverse-soft);
  }

  .header-home .onSearchClick-content.onSearchClick-fixed.header-scrolled .dropdown-menu,
  .header-home .header-search-shell--fixed.header-search-shell--scrolled .dropdown-menu {
    background: var(--color-bg-inverse-soft) !important;
  }

  .onSearchClick-content.onSearchClick-fixed .header-search-shell--toggled .header-body {
    padding: 22px 0 12px;
    overflow: visible;
  }

  .onSearchClick-content.onSearchClick-fixed .header-search-shell--toggled .header-search-placeholder {
    display: block;
  }

  .header-search-shell--fixed .header-body {
    padding: 10px 0 8px;
  }

  /* Mobile search open — Categories, search field, and Cancel on one row */
  .header-search-shell--toggled .header-search-row--fixed {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    gap: 8px;
  }

  .header-search-shell--toggled .header-search-row--fixed .logo-bx-outer {
    display: none !important;
  }

  .header-search-shell--toggled .header-search-controls {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .header-search-shell--toggled .header-search-bx,
  .header-search-shell--toggled .header-search-inner-bx {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .header-search-shell--toggled .header-search-split {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .header-search-shell--toggled .header-search-categories-pill {
    flex: 0 0 auto;
    width: auto;
    max-width: 34%;
    min-width: 0;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border-width: 1.5px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-search-shell--toggled .header-search-field-pill {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
    width: auto;
    min-height: 44px;
    border: 1.5px solid var(--color-info);
    border-radius: 999px;
    background: var(--color-bg-surface);
    overflow: visible;
    padding: 0 4px 0 12px;
  }

  .header-search-shell--toggled .header-search-split .search-and-location {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    overflow: visible;
  }

  .header-search-shell--toggled .header-search-split .search-and-location .MuiAutocomplete-root,
  .header-search-shell--toggled .header-search-split .search-and-location .MuiFormControl-root {
    width: 100%;
    min-width: 0;
    height: auto;
  }

  .header-search-shell--toggled .header-search-split .search-and-location .MuiAutocomplete-inputRoot {
    min-height: 40px;
    height: auto;
    align-items: center;
    padding: 0 4px 0 0 !important;
    flex-wrap: nowrap;
  }

  .header-search-shell--toggled .header-search-split .search-and-location .MuiInputBase-input {
    padding: 10px 0 !important;
    height: auto !important;
    min-height: 20px;
    line-height: 1.35;
    font-size: 14px;
  }

  .header-search-shell--toggled .search-and-location .MuiAutocomplete-inputRoot[class*="MuiInput-root"] .MuiAutocomplete-input:first-child {
    padding: 10px 0 !important;
    font-size: 14px;
  }

  .header-search-shell--toggled .search-and-location .header-input.MuiAutocomplete-root {
    height: auto;
    min-height: 0;
  }

  .header-search-shell--toggled .search-and-location .MuiAutocomplete-endAdornment {
    top: 50%;
    transform: translateY(-50%);
    right: 0;
  }

  .header-search-shell--toggled .header-search-split .search-btn {
    flex: 0 0 auto;
    padding: 0;
    align-self: center;
  }

  .header-search-shell--toggled .header-search-split .search-btn-link {
    width: 36px;
    height: 36px;
    line-height: 36px;
  }

  .header-search-shell--toggled .header-search-cancel-pill {
    flex: 0 0 auto;
    align-self: center;
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
    border-width: 1.5px;
    white-space: nowrap;
  }

  .header-search-row--fixed {
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-search-row--fixed .logo-bx-outer {
    flex: 0 0 auto;
  }

  .header-search-row--fixed .header-search-controls {
    flex: 1 1 calc(100% - 120px);
    min-width: 0;
  }

  .header-search-row--fixed .header-search-split {
    gap: 8px;
  }

  .header-home .header-search-shell:not(.header-search-shell--fixed) .header-search-split {
    max-width: 100%;
    padding: 0 4px;
  }

  /* Toggled overrides (must follow generic fixed-row rules) */
  .header-search-shell--toggled .header-search-row--fixed .logo-bx-outer {
    display: none !important;
  }

  .header-search-shell--toggled .header-search-controls {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Toggled open panel — keep input + button inside one pill; solid backdrop */
  .header-search-shell--toggled .header-search-split .search-and-location {
    grid-area: unset;
    position: static;
    width: auto;
    border: 0;
    border-radius: 0;
    min-height: 44px;
    padding: 0;
    overflow: visible;
  }

  .header-search-shell--toggled .header-search-split .search-btn {
    grid-area: unset;
    position: static;
    width: auto;
    border: 0;
    border-radius: 0;
    min-height: 0;
    padding: 0;
  }

  .header-search-shell--toggled .header-search-field-pill {
    display: flex !important;
    align-items: center;
    position: relative;
    z-index: 2;
    overflow: visible;
  }

  .header-search-shell--toggled .header-search-split .search-and-location .MuiAutocomplete-root,
  .header-search-shell--toggled .header-search-split .search-and-location .MuiFormControl-root {
    width: 100%;
    min-width: 0;
  }

  /* Popper is portaled to body when mobile search is open */
  .header-search-autocomplete-popper {
    z-index: 1002 !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .header-search-autocomplete-popper .MuiPaper-root {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    max-height: min(50vh, 320px);
    border-radius: 12px;
    box-shadow: var(--color-shadow-sm);
    overflow: hidden;
    margin-top: 0;
  }

  .header-search-autocomplete-popper .MuiAutocomplete-listbox {
    width: 100%;
    max-height: min(50vh, 320px);
    padding: 4px 0;
  }

  .header-search-autocomplete-popper .MuiAutocomplete-listbox .MuiAutocomplete-option {
    padding: 12px 16px;
    min-height: 44px;
    align-items: flex-start;
    width: 100%;
  }

  .header-search-autocomplete-popper .MuiAutocomplete-listbox .normal {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
  }

  .header-search-autocomplete-popper .MuiAutocomplete-listbox .normal .text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .header-search-autocomplete-popper .MuiAutocomplete-listbox .text-color-sky {
    font-size: 12px;
    line-height: 1.35;
    display: block;
  }

  .header-search-shell--toggled .MuiAutocomplete-popper {
    z-index: 1002 !important;
  }

  .header-search-shell--toggled .MuiAutocomplete-popper .MuiPaper-root {
    width: 100% !important;
    max-height: min(50vh, 320px);
    border-radius: 12px;
    box-shadow: var(--color-shadow-sm);
    overflow: hidden;
  }

  .header-search-shell--toggled .MuiAutocomplete-listbox {
    max-height: min(50vh, 320px);
    padding: 4px 0;
  }

  .header-search-shell--toggled .MuiAutocomplete-listbox .MuiAutocomplete-option {
    padding: 10px 14px;
    min-height: 44px;
    align-items: flex-start;
  }

  .header-search-shell--toggled .MuiAutocomplete-listbox .normal {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
  }

  .header-search-shell--toggled .MuiAutocomplete-listbox .normal .text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
  }

  .header-search-shell--toggled .MuiAutocomplete-listbox .text-color-sky {
    font-size: 12px;
    line-height: 1.35;
    display: block;
  }

  .header-search-shell--toggled.header-search-shell--categories-open .header-category-bar__list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 40vh;
  }

  .header-search-shell--toggled.header-search-shell--categories-open .header-category-bar__list a {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .header-search-shell--toggled.header-search-shell--categories-open .header-category-bar__list li:last-child a {
    border-bottom: 0;
  }
}

@media (max-width: 767px) {
  .header-search-row--fixed .col.logo-bx-outer.desktop-stuff:not(.searchLogo) {
    display: block;
    flex: 0 0 auto;
    max-width: none;
  }

  .header-search-shell--toggled .header-search-row--fixed .col.logo-bx-outer.desktop-stuff {
    display: none !important;
  }

  .header-search-row--fixed .header-search-controls {
    flex: 1 1 calc(100% - 120px);
    min-width: 0;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-split {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "categories categories"
      "search button";
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-categories-pill {
    grid-area: categories;
    width: 100%;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    font-size: 14px;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-field-pill {
    display: contents;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-split .search-and-location {
    grid-area: search;
    width: auto;
    min-width: 0;
    border: 2px solid var(--color-border-default);
    border-radius: 999px;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding-left: 4px;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-split .search-and-location .MuiAutocomplete-inputRoot {
    min-height: 38px;
    padding-left: 10px !important;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-split .search-and-location .MuiInputBase-input {
    font-size: 14px;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-split .search-btn {
    grid-area: button;
    align-self: center;
    padding: 0;
  }

  .header-search-shell--fixed:not(.header-search-shell--toggled) .header-search-split .search-btn-link {
    width: 38px;
    height: 38px;
    line-height: 38px;
  }

  .header-search-row--fixed {
    gap: 8px;
  }

  .header-search-row--fixed .logo-bx-search {
    min-height: 36px;
  }

  .header-search-row--fixed .logo-bx-search img {
    max-height: 34px;
    max-width: 96px;
  }

  .header-category-bar__list a {
    padding: 10px 14px;
    font-size: 14px;
  }

  .header-category-bar.is-open {
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-category-bar__list {
    flex-wrap: wrap;
    overflow-x: hidden;
  }

  .header-search-redesign {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "categories categories"
      "search button";
    border-radius: 16px;
    flex-wrap: unset;
  }

  .header-search-categories {
    grid-area: categories;
    width: 100%;
    justify-content: center;
    border-right: 0;
    border-bottom: 1px solid var(--color-border-default);
    padding: 10px 16px;
  }

  .header-search-redesign .search-and-location {
    grid-area: search;
    width: auto;
    min-width: 0;
  }

  .header-search-redesign .search-btn {
    grid-area: button;
    align-self: center;
    padding: 4px 8px 4px 0;
  }

  .header-auth-pill {
    padding: 6px 12px;
    font-size: 14px;
  }

  .header-auth-link {
    padding: 6px 10px;
    font-size: 14px;
  }
}

@media (max-width: 575px) {
  .header-search-shell--fixed .header-body {
    padding: 8px 0 6px;
  }

  .header-search-shell--toggled .header-search-categories-pill {
    min-height: 42px;
    font-size: 13px;
    padding: 0 14px;
  }

  .header-search-shell--toggled .header-search-field-pill {
    min-height: 42px;
    padding: 0 4px 0 10px;
  }

  .header-search-shell--toggled .header-search-cancel-pill {
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .header-search-shell--toggled .header-search-split .search-and-location .MuiInputBase-input,
  .header-search-shell--toggled .header-search-split .search-and-location .MuiInputBase-input::placeholder {
    font-size: 13px;
  }

  .header-search-shell--toggled .header-search-split .search-btn-link {
    width: 34px;
    height: 34px;
    line-height: 34px;
  }

  .header-search-row--fixed {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header-search-row--fixed .logo-bx-outer {
    align-self: flex-start;
  }

  .header-search-row--fixed .header-search-controls {
    flex: 1 1 auto;
    width: 100%;
  }

  .header-search-categories-pill {
    min-height: 40px;
    font-size: 12px;
    padding: 0 12px;
  }

  .header-search-split .search-and-location {
    min-height: 40px;
  }

  .header-search-split .search-and-location .MuiInputBase-input {
    font-size: 12px;
  }

  .header-search-split .search-and-location .MuiInputBase-input::placeholder {
    font-size: 12px;
  }

  .header-search-split .search-btn-link {
    width: 34px;
    height: 34px;
    line-height: 34px;
  }
}

@media (min-width: 992px) {
  .header-home .top-header {
    padding: 8px 0;
    position: relative;
    z-index: 999;
  }
}

/* Header top bar — all pages (profile, listings, etc.) */
.top-header .header-top-bar__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.top-header .header-top-bar__logo {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.top-header .header-top-bar__actions {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.top-header .header-top-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.top-header .header-top-actions__list {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-header .header-top-actions__item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0 !important;
}

.top-header .header-top-actions__item--dropdown {
  position: relative;
  display: inline-block;
}

.top-header .header-top-actions__link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.top-header .header-top-actions__link svg {
  display: block;
  color: var(--color-text-primary);
}

/* Home header top bar — named classes only (never .top-right-anchor / nested ul) */
.header-home .header-top-bar__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.header-home .header-top-bar__logo {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.header-home .header-top-bar__actions {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.header-home .header-top-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.header-home .header-top-actions__list {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-home .header-top-actions__item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0 !important;
}

.header-home .header-top-actions__item--dropdown {
  position: relative;
  display: inline-block;
}

.header-home .header-top-actions__link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.header-home .header-top-actions__link svg {
  display: block;
  color: var(--color-text-primary);
}

.header-home .header-body {
  padding: 4px 0 12px;
}

.header-home .header-profile-li {
  margin-left: 0;
}

@media (min-width: 992px) {
  .header-home .header-top-actions__item--search-toggle {
    display: none;
  }

  .header-home .header-top-actions__list {
    gap: 12px;
  }
}

[data-theme="dark"] .header-home .header-top-actions__link svg {
  color: var(--color-text-on-accent);
}

@media (min-width: 992px) and (max-width: 1199px) {
  .header-home .header-auth-pill__part,
  .header-home .header-auth-link {
    font-size: 14px;
  }

  .header-home .header-auth-pill--split {
    padding: 0 12px;
    min-height: 36px;
  }

  .header-home .header-auth-group {
    padding: 0 12px;
    min-height: 36px;
  }

  .header-home .sell_btn--header {
    padding: 6px 12px !important;
    font-size: 14px !important;
  }

  .header-home .theme-toggle-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* ---------------------------------------------------------------------------
   Mobile header responsiveness — "more" (kebab) collapse
   Scope is limited to `.top-header` so only the top action bar is affected.
   Desktop (>= 992px) is untouched: the kebab is hidden and every action shows
   inline exactly as before. On phones/tablets (<= 991px) the secondary actions
   (search, theme toggle, List to sell, messages) collapse into a single kebab
   dropdown so they never overlap the logo or the profile avatar. Logo, the
   kebab trigger and the avatar stay visible. Works in light + dark via tokens.
--------------------------------------------------------------------------- */

/* Kebab trigger is mobile-only: hidden on desktop. */
.top-header .header-more-li {
  display: none;
}

.top-header .header-more-drop {
  position: relative;
}

.top-header .header-more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1.5px solid var(--color-border-default);
  border-radius: 999px;
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  box-shadow: var(--color-shadow-xs);
}

.top-header .header-more-toggle:hover {
  border-color: var(--color-info);
  color: var(--color-icon-hover);
}

.top-header .header-more-toggle__dots {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.top-header .header-more-toggle__dots span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* Reuse the existing profile dropdown look (.dropdown-menu-2) but anchor it to
   the right edge so it never overflows the viewport, and support <button> rows
   (the profile menu only used <a>). */
.top-header .header-more-menu {
  right: 0;
  left: auto;
  top: 46px;
  width: 210px;
  z-index: 1050;
  padding: 6px 0;
  box-shadow: var(--color-shadow-sm);
}

.top-header .header-more-menu .header-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1;
  color: var(--color-text-primary);
  background: transparent;
  border: 0;
  border-bottom: var(--color-focus-ring) solid 1px;
  cursor: pointer;
}

.top-header .header-more-menu .header-more-item:last-child {
  border-bottom: 0;
}

.top-header .header-more-menu .header-more-item:hover {
  background-color: var(--color-bg-card-muted);
  color: var(--color-brand-primary);
}

.top-header .header-more-menu .header-more-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.top-header .header-more-menu .header-more-item__badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-brand-primary);
  color: var(--color-text-on-accent, #fff);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

@media (max-width: 991px) {
  /* Bottom Navigation - Always visible on mobile */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: var(--color-bg-surface);
    border-top: 1px solid var(--color-border-default);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    padding: 6px 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav__item,
  .mobile-bottom-nav__trigger {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 4px 2px;
    background: transparent;
    border: 0;
    color: var(--color-text-secondary);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
  }

  .mobile-bottom-nav__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-bottom-nav__label {
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
  }

  .mobile-bottom-nav__avatar img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border-default);
  }

  .mobile-bottom-nav__badge {
    position: absolute;
    top: -6px;
    left: 58%;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-brand-primary);
    color: var(--color-text-on-accent, #fff);
    font-size: 10px;
    line-height: 16px;
    font-weight: 600;
    text-align: center;
  }

  /* Top Header - Three-zone layout (all pages including /my-profile) */
  .top-header {
    text-align: initial;
  }

  .top-header .top-right-anchor {
    text-align: initial;
    width: 100%;
  }

  .top-header .top-right-anchor ul.header-top-actions__list {
    display: flex !important;
    align-items: center;
    width: 100%;
  }

  .top-header .container > .row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    gap: 8px;
  }

  .top-header .container > .row > .col-4 {
    flex: 0 0 auto;
    width: auto;
    order: 1;
  }

  .top-header .container > .row > .col-8 {
    flex: 1 1 auto;
    width: auto;
    order: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .top-header .header-top-actions__list {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end; /* Mobile search toggle stays center-right */
  }

  .top-header .header-top-actions__item--search-toggle {
    margin: 0 auto; /* Pull to center */
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .top-header .header-sell-li {
    margin-left: 0;
  }

  /* Hide all top header actions except the search toggle on mobile */
  .top-header .header-top-actions__list > li:not(.header-top-actions__item--search-toggle):not(.header-sell-li) {
    display: none !important;
  }

  /* Specific overkill to hide the moon icon if the rule above is somehow bypassed */
  .top-header .theme-toggle-li,
  .top-header .header-profile-li,
  .top-header .mobile_none,
  .top-header .header-more-li {
    display: none !important;
  }

  .top-header .header-top-actions__list {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 12px; /* Consistent spacing between Right-side actions */
  }

  .top-header .header-top-actions__item--search-toggle {
    display: flex !important;
    margin: 0;
    flex: 0 0 auto;
    justify-content: center;
  }

  .top-header .header-top-actions__item--search-toggle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border-default);
    background: var(--color-bg-surface);
  }

  .top-header .header-top-actions__item--search-toggle a img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0);
    opacity: 0.7;
    transition: all 0.2s ease;
  }

  /* Icon color fix: Invert search icon in dark mode so it's visible */
  [data-theme="dark"] .top-header .header-top-actions__item--search-toggle a img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
  }

  .top-header .header-sell-li {
    margin-left: 0;
    flex: 0 0 auto;
  }

  body {
    padding-bottom: 64px; /* Space for bottom nav */
  }

  /* Legacy bottom nav is replaced by .mobile-bottom-nav on mobile */
  .bottom-navigation {
    display: none !important;
  }

  .mobile-bottom-nav__has-sheet {
    position: static;
  }

  .mobile-bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 1050;
    pointer-events: auto;
  }

  .mobile-bottom-sheet .dropdown-menu,
  .mobile-bottom-sheet .dropdown-menu-2 {
    position: static !important;
    display: block !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--color-border-default);
    border-bottom: 0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
    max-height: min(70vh, 520px);
    overflow: hidden;
  }

  .mobile-bottom-sheet .event-list-box {
    max-height: calc(min(70vh, 520px) - 120px);
    overflow-y: auto;
  }
}

@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}
