/* Join split search bars, clean mobile drawer, tidy category sidebar */

/* —— Mobile + drawer search: one bar, not two boxes —— */
@media only screen and (max-width: 770px) {
  html:root body #header #header-search.skip-active form,
  html:root body #header #header-search.skip-active .input-box,
  html:root body .lux-drawer-search form,
  html:root body .lux-drawer-search .input-box {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  html:root body #header #header-search.skip-active form,
  html:root body .lux-drawer-search form {
    border: 1px solid #e5e5e5 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  html:root body #header #header-search.skip-active .input-box,
  html:root body .lux-drawer-search .input-box {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html:root body #header #header-search.skip-active input#search,
  html:root body #header #header-search.skip-active input[type="search"],
  html:root body #header #header-search.skip-active input[name="q"],
  html:root body .lux-drawer-search input[type="search"],
  html:root body .lux-drawer-search input[name="q"],
  html:root body .lux-drawer-search input.input-text {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 44px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 16px !important; /* prevent iOS focus zoom */
    line-height: 44px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  html:root body #header #header-search.skip-active button.search-button,
  html:root body .lux-drawer-search button.search-button {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #111 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  html:root body #header #header-search.skip-active button.search-button span,
  html:root body .lux-drawer-search button.search-button span {
    display: none !important;
  }

  html:root body #header #header-search.skip-active button.search-button::after,
  html:root body .lux-drawer-search button.search-button::after {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 0 !important;
    color: transparent !important;
    background: no-repeat center / 18px 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") !important;
  }

  /* —— Left drawer: tight, white, no leftover gold or empty gap —— */
  html:root body #lux-drawer {
    background: #fff !important;
    border-right: 1px solid #e5e5e5 !important;
    color: #111 !important;
  }

  html:root body .lux-drawer-search {
    padding: 12px 16px !important;
    border-bottom: 1px solid #e5e5e5 !important;
  }

  html:root body .lux-drawer-nav {
    padding: 0 !important;
    margin: 0 !important;
  }

  html:root body #lux-drawer .skip-content:not(.skip-active),
  html:root body #lux-drawer .skip-content:empty,
  html:root body .lux-drawer-nav > :empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
  }

  html:root body #lux-drawer ol.nav-primary > li.level0,
  html:root body .lux-acc-row {
    margin: 0 !important;
    min-height: 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
  }

  html:root body #lux-drawer ol.nav-primary > li.level0 > a.level0,
  html:root body .lux-acc-link {
    color: #111 !important;
    background: transparent !important;
    min-height: 48px !important;
    padding: 0 16px !important;
  }

  html:root body .lux-acc-toggle span,
  html:root body .lux-acc-toggle[aria-expanded="true"] span {
    border-top-color: #111 !important;
  }

  html:root body .lux-acc-sub {
    background: #fafafa !important;
  }

  html:root body .lux-acc-sub a,
  html:root body #lux-drawer ol.nav-primary > li.level0 > ul.level0 a {
    color: #555 !important;
  }

  html:root body #lux-drawer ol.nav-primary > li.level0 > ul.level0 > li.view-all > a,
  html:root body .lux-acc-link:hover,
  html:root body .lux-drawer-account a:hover,
  html:root body .lux-drawer-foot a:hover {
    color: #111 !important;
  }

  /* Mobile category filter bar */
  html:root body p.block-subtitle.block-subtitle--filter {
    display: block !important;
    background: #fff !important;
    color: #111 !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
    box-shadow: none !important;
    margin: 0 0 12px !important;
    padding: 12px 0 !important;
    font-size: 11px !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
  }
}

/* —— Category left sidebar (desktop + mobile) —— */
html:root body .col-left .block,
html:root body .block-layered-nav,
html:root body .block-category-nav,
html:root body .block-layered-nav .block-content,
html:root body #narrow-by-list {
  background: #fff !important;
  border-color: #e5e5e5 !important;
  color: #111 !important;
  box-shadow: none !important;
}

html:root body .col-left .block {
  border: 1px solid #e5e5e5 !important;
  padding: 0 !important;
}

html:root body .col-left .block .block-title,
html:root body .block-layered-nav .block-title,
html:root body .block-category-nav .block-title,
html:root body .block-layered-nav .block-title strong,
html:root body .block-layered-nav .block-title span,
html:root body .block-layered-nav dt,
html:root body #narrow-by-list dt {
  background: #fff !important;
  color: #111 !important;
  border-bottom: 1px solid #e5e5e5 !important;
  border-color: #e5e5e5 !important;
}

html:root body .col-left .block .block-content a,
html:root body .block-layered-nav dd a,
html:root body .block-layered-nav dd ol li a,
html:root body .block-category-nav li a,
html:root body #narrow-by-list a {
  color: #555 !important;
}

html:root body .col-left .block .block-content a:hover,
html:root body .block-layered-nav dd a:hover,
html:root body .block-layered-nav dd ol li a:hover,
html:root body #narrow-by-list a:hover {
  color: #111 !important;
}

html:root body .block-layered-nav dd .count,
html:root body .block-layered-nav .count,
html:root body #narrow-by-list .count {
  color: #888 !important;
}

/* Keep desktop header search as the compact underline field */
@media only screen and (min-width: 771px) {
  html:root body #header .skip-links .skip-link.skip-nav,
  html:root body #header .skip-links .skip-link.skip-search {
    display: none !important;
  }

  html:root body #header #header-search,
  html:root body #header #header-search.skip-content,
  html:root body #header #header-search.skip-active,
  html:root body #header #header-search.skip-content.skip-active {
    display: block !important;
    position: absolute !important;
    left: 30px !important;
    top: 28px !important;
    width: 260px !important;
    max-width: 260px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}
