/* IslandOrder Stage 2 — Search results refinement. Scoped to marketplace homepage.
   Loaded after Stage 1 styles; no storefront, cart, gallery or admin selectors. */

/* The search controls form a tidy, responsive workspace, not a third-party card. */
.io-search-discovery-wrap{min-width:0;margin:0 0 16px}
.io-search-results-mode form.searchbar.io-home-search{margin:18px 0 10px;gap:10px;align-items:center}
.io-search-results-mode form.searchbar.io-home-search>input{height:52px;min-height:52px;font-size:15px;border-radius:14px}
.io-search-results-mode form.searchbar.io-home-search>button.btn{min-height:52px;height:52px;border-radius:13px;font-size:13px;padding:0 18px}
.io-search-results-mode form.searchbar.io-home-search>a.btn.secondary{min-height:52px;display:inline-flex;align-items:center;padding:0 17px;font-size:13px;border-radius:13px}
.io-search-results-mode .io-search-location-tools{align-items:center;justify-content:flex-start;gap:8px;max-width:100%;min-width:0}
.io-search-results-mode .io-search-location-tools>.btn{height:42px;min-height:42px;padding:0 14px;border-radius:11px;font-size:12px}
.io-search-results-mode .io-radius-label{gap:8px;font-size:12px;line-height:1.4}
.io-search-results-mode .io-radius-label select{height:42px;min-height:42px;min-width:115px;border-radius:11px;font-size:12px}
.io-search-discovery-wrap .io-location-status{margin:7px 0 17px;color:#647568;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.io-location-status strong{font-weight:750;color:#315e41}
/* Search pages prioritize relevant results over the tall marketing hero. */
.io-search-results-mode{margin-top:0}
.io-search-results-mode form.searchbar.io-home-search{margin-top:0}
.io-market-results-heading{scroll-margin-top:110px}
.io-market-results-heading.io-search-heading-active{margin:16px 0 14px;align-items:center;gap:12px}
.io-market-results-heading.io-search-heading-active h2{font-size:clamp(22px,2.5vw,29px);line-height:1.2;color:#163c28}
.io-market-results-heading.io-search-heading-active p{margin-top:6px;font-size:13px;color:#65756a;overflow-wrap:anywhere}
.io-market-results-heading.io-search-heading-active .listing-count{font-size:11px;line-height:1.4;padding:7px 12px;white-space:normal;text-align:center;flex:0 0 auto}
/* Category chips appear before search results so filtering is a visible next action. */
.io-search-results-mode~.io-market-results-heading+.io-category-strip{margin-top:3px}
.io-market-results-heading+.io-category-strip{margin:0 0 14px}
.io-market-results-heading+.io-category-strip .marketplace-categories{margin:0 0 12px}
.io-product-discovery{margin:17px 0 22px;padding:18px;border:1px solid #e1ebe4;border-radius:18px;background:#fff}
.io-product-discovery .section-head{margin:0 0 15px;align-items:center}
.io-product-discovery .section-head h2{font-size:20px;line-height:1.25;letter-spacing:-.02em}
.io-product-discovery .section-head p{font-size:12px;line-height:1.5;max-width:680px}
.io-product-discovery .io-discovery-product{box-shadow:none}
.io-product-discovery .io-discovery-product:focus-visible{outline:3px solid #187644;outline-offset:2px}
/* Desktop: keep search, Search, Clear, Near me, Map and radius on ONE row.
   Before this patch, location tools used grid-column:1/-1 and always wrapped.
   At narrower widths we intentionally use a second row to protect touch targets. */
@media(min-width:981px){
  .io-search-results-mode form.searchbar.io-home-search{
    display:grid;
    grid-template-columns:minmax(220px,1fr) max-content max-content max-content;
    align-items:center;
    column-gap:10px;
    row-gap:10px;
  }
  .io-search-results-mode form.searchbar.io-home-search>input{
    grid-column:auto;
    width:100%;min-width:0;max-width:none;height:52px;
  }
  .io-search-results-mode form.searchbar.io-home-search>button.btn{
    grid-column:auto;height:52px;min-width:150px;
  }
  .io-search-results-mode form.searchbar.io-home-search>a.btn.secondary{
    grid-column:auto;white-space:nowrap;
  }
  .io-search-results-mode .io-search-location-tools{
    grid-column:auto;
    display:flex;flex-wrap:nowrap;
    width:max-content;min-width:0;max-width:100%;
    justify-content:flex-end;
  }
  .io-search-results-mode .io-search-location-tools>.btn{white-space:nowrap}
  .io-search-results-mode .io-radius-label{white-space:nowrap}
  .io-search-discovery-wrap .io-location-status{margin-top:4px}
}
@media(min-width:761px) and (max-width:980px){
  .io-search-results-mode form.searchbar.io-home-search{grid-template-columns:minmax(0,1fr) auto auto}
  .io-search-results-mode form.searchbar.io-home-search>button.btn{min-width:138px}
  .io-search-results-mode .io-search-location-tools{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:760px){
  .io-search-results-mode form.searchbar.io-home-search{grid-template-columns:minmax(0,1fr) auto;gap:9px;margin:14px 0 10px}
  .io-search-results-mode form.searchbar.io-home-search>input{grid-column:1/-1;height:48px;min-height:48px;padding:0 13px;font-size:16px}
  .io-search-results-mode form.searchbar.io-home-search>button.btn{grid-column:auto;min-width:0;width:100%;min-height:45px;height:45px;font-size:12px}
  .io-search-results-mode form.searchbar.io-home-search>a.btn.secondary{min-height:45px;padding:0 14px;font-size:12px}
  .io-search-results-mode .io-search-location-tools{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
  .io-search-results-mode .io-search-location-tools>.btn{width:100%;height:44px;min-height:44px}
  .io-search-results-mode .io-radius-label{grid-column:1/-1;padding:0;display:flex;align-items:center}
  .io-search-results-mode .io-radius-label select{height:43px;min-height:43px;max-width:none;flex:1;min-width:0}
  .io-search-discovery-wrap .io-location-status{margin:7px 0 15px;font-size:11px}
  .io-market-results-heading.io-search-heading-active{align-items:flex-start;margin:15px 0 12px}
  .io-market-results-heading.io-search-heading-active h2{font-size:22px}
  .io-market-results-heading.io-search-heading-active .listing-count{padding:6px 9px;font-size:10px;max-width:150px}
  .io-product-discovery{padding:13px;margin:16px 0 20px;border-radius:15px}
  .io-product-discovery .section-head{gap:8px}
  .io-product-discovery .section-head h2{font-size:18px}
}
@media(max-width:370px){
  .io-market-results-heading.io-search-heading-active{gap:7px}
  .io-market-results-heading.io-search-heading-active .listing-count{max-width:108px}
}
@media(prefers-reduced-motion:reduce){
 .io-product-discovery .io-discovery-product{transition:none}
}

/* Reliable active filter contrast even when an older design token is unavailable. */
.io-category-strip .marketplace-categories .market-category.active{background:#123f2b;color:#fff;border-color:#123f2b}
