/* Home catalog search: desktop under nav links, mobile under header */

.rd-navbar--is-clone .home-search-slot--desktop,
.rd-navbar--is-clone .home-catalog-search {
  display: none !important;
}

.home-nav-with-search {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  min-width: 0;
}

.rd-navbar-fullwidth .rd-navbar-nav-wrap > .home-nav-with-search,
.rd-navbar-static .rd-navbar-nav-wrap > .home-nav-with-search {
  margin-top: 0 !important;
}

.home-nav-with-search > .rd-navbar-nav {
  margin: 0;
}

.home-nav-with-search .home-catalog-search {
  width: 100%;
  margin-top: 2px;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.home-nav-with-search .catalog-search-bar {
  margin-bottom: 0;
  width: 100%;
}

.home-nav-with-search .catalog-search-bar--simple .catalog-search-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
}

.home-nav-with-search .catalog-search-bar--simple .input-container {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  width: 100%;
  margin-right: 0;
}

/* Mobile: search under fixed header bar (not inside off-canvas nav) */
.home-search-slot--mobile {
  display: none;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  background: #fff;
  position: relative;
  z-index: 20;
}

.home-search-slot--mobile .home-catalog-search {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.home-search-slot--mobile .catalog-search-bar {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  .page-header--home-search .rd-navbar-wrap {
    min-height: 56px;
    height: 56px;
  }

  .home-search-slot--mobile {
    display: block !important;
  }

  .home-search-slot--desktop {
    display: none !important;
  }

  /* page already reserved via .rd-navbar-wrap height — drop extra .page offset */
  html.rd-navbar-fixed-linked.has-home-search .page {
    padding-top: 0;
  }
}

@media (min-width: 992px) {
  .home-search-slot--mobile {
    display: none !important;
    padding: 0;
    height: 0;
    overflow: hidden;
  }

  .home-search-slot--desktop {
    display: block;
    width: 100%;
  }
}

.catalog-search-bar {
  width: 100%;
  margin-bottom: 24px;
  position: relative;
  z-index: 30;
}

.catalog-search-bar .search-wrapper {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
}

.catalog-search-bar .catalog-search-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
}

.catalog-search-bar .input-container {
  position: relative;
  margin-right: 0;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 240px;
  flex: 1 1 240px;
  min-width: 0;
}

.catalog-search-bar .catalog-search {
  width: 100%;
  margin-right: 0;
  height: 40px;
  min-height: 40px;
  background: #fff;
  border: 1px solid #d7dce5;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 8px 36px 8px 40px;
  font-size: 14px;
  line-height: 22px;
  color: #151515;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-search-bar .catalog-search::-webkit-input-placeholder {
  color: #aeb6c5;
}

.catalog-search-bar .catalog-search::-moz-placeholder {
  color: #aeb6c5;
}

.catalog-search-bar .catalog-search:-ms-input-placeholder {
  color: #aeb6c5;
}

.catalog-search-bar .catalog-search::placeholder {
  color: #aeb6c5;
}

.catalog-search-bar button.input-img-control {
  position: absolute !important;
  top: 50%;
  left: 10px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
  font-size: 0;
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-search-bar button.input-img-control img {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.catalog-search-bar button.input-img-control:hover,
.catalog-search-bar button.input-img-control:focus {
  -webkit-filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
  outline: none;
}

.catalog-search-bar .clear-search {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 7;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: bold;
  color: #aeb6c5;
  pointer-events: all;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-search-bar #search-result-wrapper {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  -webkit-box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.16);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.16);
  padding: 58px 10px 10px;
  pointer-events: none;
  border-radius: 8px;
  z-index: 6;
  background: transparent;
}

.catalog-search-bar #search-result-wrapper[style*="display: none"] {
  display: none !important;
}

.catalog-search-bar #search-results {
  pointer-events: all;
  background: #fff;
  border-radius: 0 0 8px 8px;
  margin: 0 -10px -10px -10px;
  padding: 10px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.catalog-search-bar #search-results > a {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #ebebeb;
  color: #151515;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.catalog-search-bar #search-results > a:last-child {
  border-bottom: none;
}

.catalog-search-bar #search-results > a:hover {
  background: #e5efff;
}

.catalog-search-bar #search-results > a:hover .product-title {
  color: #2583c9;
}

.catalog-search-bar #search-results > a > .product {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  min-width: 0;
}

.catalog-search-bar #search-results > a > .table-cell {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-left: 8px;
}

.catalog-search-bar #search-results .flex-center-row {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  overflow: hidden;
}

.catalog-search-bar #search-results .table-image {
  display: block;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  margin: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 1px solid #d7dce5;
}

.catalog-search-bar #search-results .product-info {
  min-width: 0;
  overflow: hidden;
}

.catalog-search-bar #search-results .product-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-search-bar #search-results hr {
  display: none;
}

.catalog-search-bar #search-results > p {
  margin: 0;
  padding: 12px;
}

@media (max-width: 991px) {
  .catalog-search-bar .catalog-search {
    height: 38px;
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 40px;
    padding-right: 36px;
    font-size: 14px;
    line-height: 22px;
  }

  .catalog-search-bar button.input-img-control {
    left: 8px;
  }

  .catalog-search-bar .clear-search {
    right: 10px;
  }

  .catalog-search-bar #search-result-wrapper {
    padding-top: 52px;
  }
}
