/* Global search: loaded after site.css so the shared header can use one search UI. */
body.is-search-open { overflow: hidden; }

.header-search { position: fixed; z-index: 110; inset: var(--header-height) 0 0; padding: 0; color: #555; background: transparent; box-shadow: none; }
.header-search[hidden], .header-search [hidden] { display: none !important; }
.header-search__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgb(0 0 0 / 42%); border: 0; cursor: default; }
.header-search__surface { position: relative; z-index: 1; max-height: 100%; padding: 2.5rem 0 2.75rem; overflow-y: auto; background: #f2f2f2; border-top: 1px solid #333; }
.header-search__inner { position: relative; width: min(68rem, calc(100% - 4rem)); margin: 0 auto; }
.header-search__eyebrow { margin: 0 0 .35rem; color: #e3540b; font-size: .6875rem; font-weight: 500; letter-spacing: .18em; }
.header-search__inner h2 { margin: 0; color: #282828; font-size: 1.75rem; font-weight: 400; line-height: 1.35; }
.header-search__form { width: min(48rem, 100%); margin: 1.4rem 0 0; display: flex; }
.header-search__field { position: relative; min-width: 0; flex: 1; }
.header-search__field > svg { position: absolute; z-index: 1; top: 50%; left: 1.125rem; width: 1.125rem; height: 1.125rem; color: #888; pointer-events: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transform: translateY(-50%); }
.header-search input { width: 100%; height: 3.5rem; min-width: 0; padding: 0 3rem 0 3rem; color: #222; background: #fff; border: 1px solid #d6d6d6; border-radius: 0; outline: 0; font-size: .9375rem; }
.header-search input:focus { border-color: #e3540b; box-shadow: inset 0 0 0 1px #e3540b; }
.header-search input::-webkit-search-cancel-button { display: none; }
.header-search__submit { width: 7rem; padding: 0 1.25rem; color: #fff; background: #e3540b; border: 0; cursor: pointer; transition: background-color .2s ease; }
.header-search__submit:hover { background: #ca4707; }
.header-search__clear { position: absolute; top: 50%; right: .6rem; width: 2rem !important; height: 2rem; padding: 0; color: #777 !important; background: transparent !important; border: 0; cursor: pointer; font-size: 1.25rem; transform: translateY(-50%); }
.header-search__clear:hover { color: #e3540b !important; }
.header-search__close { position: absolute; top: 0; right: 0; width: 2.5rem !important; height: 2.5rem; padding: 0; display: grid; place-items: center; color: #777 !important; background: transparent !important; border: 1px solid #ccc !important; cursor: pointer; font-size: 1.5rem; font-weight: 300; line-height: 1; }
.header-search__close:hover { color: #e3540b !important; border-color: #e3540b !important; }
.header-search__hint { margin: .7rem 0 0; color: #999; font-size: .75rem; }
.header-search__results { width: 100%; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid #ddd; }
.header-search-suggestions__summary { margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; color: #555; }
.header-search-suggestions__summary span { color: #222; font-size: 1rem; }
.header-search-suggestions__summary b { color: #999; font-size: .75rem; font-weight: 400; }
.header-search-suggestions__groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.header-search-suggestions__groups section > div { padding-bottom: .6rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d5d5d5; }
.header-search-suggestions__groups h3 { margin: 0; color: #333; font-size: .875rem; font-weight: 500; }
.header-search-suggestions__groups section > div a { color: #999; font-size: .6875rem; }
.header-search-suggestions__groups ul { margin: .45rem 0 0; padding: 0; list-style: none; }
.header-search-suggestions__groups li a { min-height: 2.75rem; padding: .45rem 0; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid #e2e2e2; }
.header-search-suggestions__groups li span { overflow: hidden; color: #555; font-size: .8125rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.header-search-suggestions__groups li small { overflow: hidden; color: #aaa; font-size: .6875rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.header-search-suggestions__groups li a:hover span, .header-search-suggestions__groups section > div a:hover { color: #e3540b; }
.header-search-suggestions__all { margin-top: 1.4rem; display: inline-flex; align-items: center; gap: .6rem; color: #e3540b; font-size: .8125rem; }
.header-search-suggestions__all span { transition: transform .2s ease; }
.header-search-suggestions__all:hover span { transform: translateX(.25rem); }
.header-search-suggestions__empty { margin: 0; color: #999; }

.search-page { min-height: 70vh; padding-bottom: 6rem; background: #fff; }
.search-page__hero { padding: 5rem 0 4.5rem; background: #f2f2f2; border-bottom: 1px solid #e4e4e4; }
.search-page__inner { width: min(80rem, calc(100% - 4rem)); margin: 0 auto; }
.search-page__eyebrow { margin: 0 0 .5rem; color: #e3540b; font-size: .75rem; font-weight: 500; letter-spacing: .2em; }
.search-page__hero h1 { margin: 0; color: #222; font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 400; line-height: 1.25; }
.search-page__intro { margin: .85rem 0 0; color: #888; font-size: .875rem; }
.search-page__form { width: min(54rem, 100%); margin-top: 2.25rem; }
.cps-search-control { position: relative; display: flex; }
.cps-search-control__icon { position: absolute; z-index: 1; top: 50%; left: 1.25rem; width: 1.25rem; height: 1.25rem; color: #888; pointer-events: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transform: translateY(-50%); }
.cps-search-control__input { width: 100%; height: 4rem; min-width: 0; padding: 0 1.25rem 0 3.25rem; flex: 1; color: #222; background: #fff; border: 1px solid #d7d7d7; border-radius: 0; outline: 0; font-size: 1rem; }
.cps-search-control__input:focus { border-color: #e3540b; box-shadow: inset 0 0 0 1px #e3540b; }
.cps-search-control__submit { width: 8rem; color: #fff; background: #e3540b; border: 0; cursor: pointer; transition: background-color .2s ease; }
.cps-search-control__submit:hover { background: #ca4707; }
.search-page__results { padding-top: 3.25rem; }
.search-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.search-summary p { margin: 0; color: #222; font-size: 1.25rem; }
.search-summary span { color: #aaa; font-size: .8125rem; }
.search-tabs { margin-top: 1.75rem; display: flex; border-bottom: 1px solid #ddd; }
.search-tabs { scrollbar-width: none; }
.search-tabs::-webkit-scrollbar { display: none; }
.search-tabs__item { position: relative; min-width: 7.5rem; padding: .85rem 1.25rem; color: #777; text-align: center; transition: color .2s ease; }
.search-tabs__item span { margin-left: .35rem; color: #aaa; font-size: .6875rem; }
.search-tabs__item::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #e3540b; content: ""; opacity: 0; }
.search-tabs__item:hover, .search-tabs__item.is-active { color: #e3540b; }
.search-tabs__item.is-active::after { opacity: 1; }
.search-groups { display: grid; gap: 4rem; margin-top: 3.5rem; }
.search-group__heading { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.search-group__heading h2 { margin: 0; color: #292929; font-size: 1.5rem; font-weight: 400; }
.search-group__heading a { color: #e3540b; font-size: .75rem; }
.search-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.search-result-grid--single { margin-top: 3rem; }
.search-product-grid { width: fit-content; grid-template-columns: repeat(4, minmax(0, 15vw)); }
.search-product-grid--single { margin-top: 3rem; }
.search-result-card { min-width: 0; background: #fff; border: 1px solid #e4e4e4; }
.search-result-card__link { height: 100%; display: flex; flex-direction: column; }
.search-result-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: block; background: #f2f2f2; }
.search-result-card__media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s ease; }
.search-result-card--product .search-result-card__media img { object-fit: contain; }
.search-result-card__media--empty { display: grid; place-items: center; color: #c7c7c7; background: #f2f2f2; }
.search-result-card__media--empty b { font-size: 1rem; font-weight: 600; letter-spacing: .12em; }
.search-result-card__body { min-height: 13.5rem; padding: 1.25rem 1.4rem 1.35rem; display: flex; flex-direction: column; }
.search-result-card__meta { min-height: 1rem; display: flex; align-items: center; gap: .5rem; color: #aaa; font-size: .6875rem; line-height: 1.4; }
.search-result-card__meta b { color: #e3540b; font-weight: 400; }
.search-result-card__meta i { width: 1px; height: .65rem; background: #ddd; }
.search-result-card__meta time { margin-left: auto; }
.search-result-card__title { margin-top: .7rem; overflow: hidden; color: #2a2a2a; font-size: 1.05rem; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.search-result-card__subtitle { margin-top: .25rem; overflow: hidden; color: #888; font-size: .8125rem; text-overflow: ellipsis; white-space: nowrap; }
.search-result-card__summary { margin-top: .65rem; overflow: hidden; color: #999; font-size: .75rem; line-height: 1.7; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.search-result-card__more { margin-top: auto; padding-top: .8rem; color: #999; font-size: .75rem; }
.search-result-card__more i { margin-left: .35rem; font-style: normal; transition: transform .2s ease; }
.search-result-card:hover { border-color: #ccc; }
.search-result-card:hover .search-result-card__media img { transform: scale(1.035); }
.search-result-card:hover .search-result-card__title, .search-result-card:hover .search-result-card__more { color: #e3540b; }
.search-result-card:hover .search-result-card__more i { display: inline-block; transform: translateX(.25rem); }
.search-empty { padding: 7rem 1rem; color: #999; text-align: center; }
.search-empty--initial { padding-top: 4rem; }
.search-empty h2 { margin: 0; color: #555; font-size: 1.35rem; font-weight: 400; }
.search-empty p { margin: .6rem 0 0; font-size: .8125rem; }
.search-pagination { margin-top: 3.5rem; display: flex; align-items: center; justify-content: center; gap: .5rem; }
.search-pagination a, .search-pagination span { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; color: #777; border: 1px solid #ddd; }
.search-pagination a:hover, .search-pagination span { color: #fff; background: #e3540b; border-color: #e3540b; }

@media (max-width: 991px) {
  .header-search-suggestions__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-tabs { overflow-x: auto; }
  .search-tabs__item { min-width: 6.5rem; flex: 0 0 auto; }
}

@media (max-width: 1024px) {
  .search-product-grid { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .header-search__surface { padding: 1.5rem 0 2rem; }
  .header-search__inner { width: calc(100% - 2rem); }
  .header-search__inner h2 { font-size: 1.35rem; }
  .header-search__form { margin-top: 1rem; }
  .header-search input { height: 3rem; padding-left: 2.65rem; font-size: .8125rem; }
  .header-search__field > svg { left: .9rem; width: 1rem; height: 1rem; }
  .header-search__submit { width: 4.5rem; }
  .header-search__hint { padding-right: 2.5rem; line-height: 1.5; }
  .header-search__results { margin-top: 1.15rem; padding-top: 1rem; }
  .header-search-suggestions__groups { grid-template-columns: 1fr; gap: 1rem; }
  .header-search-suggestions__groups section:nth-child(n+3) { display: none; }
  .search-page { padding-bottom: 4rem; }
  .search-page__hero { padding: 3.5rem 0 3rem; }
  .search-page__inner { width: calc(100% - 2rem); }
  .search-page__hero h1 { font-size: 2.25rem; }
  .search-page__intro { line-height: 1.7; }
  .search-page__form { margin-top: 1.5rem; }
  .cps-search-control__input { height: 3.5rem; padding-left: 2.8rem; font-size: .875rem; }
  .cps-search-control__icon { left: 1rem; width: 1.05rem; height: 1.05rem; }
  .cps-search-control__submit { width: 5rem; }
  .search-page__results { padding-top: 2.25rem; }
  .search-summary p { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
  .search-tabs { margin-top: 1.25rem; }
  .search-tabs__item { min-width: auto; padding: .75rem 1rem; }
  .search-groups { margin-top: 2.5rem; gap: 3rem; }
  .search-group__heading { margin-bottom: 1rem; }
  .search-group__heading h2 { font-size: 1.25rem; }
  .search-result-grid { grid-template-columns: 1fr; gap: 1rem; }
  .search-result-card__link { flex-direction: row; }
  .search-result-card__media { width: 38%; flex: 0 0 auto; aspect-ratio: 4 / 3; }
  .search-result-card__body { min-width: 0; min-height: 9.25rem; padding: 1rem; flex: 1; }
  .search-result-card__summary { display: none; }
  .search-result-card__title { margin-top: .45rem; font-size: .9375rem; }
  .search-result-card__more { padding-top: .4rem; }
  .search-empty { padding-block: 5rem; }
}

@media (max-width: 420px) {
  .header-search-suggestions__summary { margin-bottom: .75rem; }
  .search-result-card__media { width: 35%; }
  .search-result-card__body { min-height: 8rem; padding: .75rem; }
  .search-result-card__subtitle { display: none; }
  .search-result-card__meta time { display: none; }
}
