/* HWD Live Search 1.0.4 — true mobile overlay fix */
.hwd-live-search-backdrop {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483645 !important;
  background: #fff !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.hwd-live-search-dropdown {
  position: fixed !important;
  z-index: 2147483647 !important;
  max-height: var(--hwd-live-search-max-height, 420px);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  color: #222;
  text-align: left;
  transform: none !important;
  -webkit-transform: none !important;
  isolation: isolate;
}

.hwd-live-search-list {
  max-height: calc(var(--hwd-live-search-max-height, 420px) - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.hwd-live-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}

.hwd-live-search-item:hover,
.hwd-live-search-item:focus {
  color: #222;
  text-decoration: none;
  background: #f8f8f8;
}

.hwd-live-search-img {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f4f4;
}

.hwd-live-search-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hwd-live-search-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hwd-live-search-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
}

.hwd-live-search-code {
  font-size: 12px;
  line-height: 1.2;
  color: #777;
}

.hwd-live-search-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.hwd-live-search-price-old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.hwd-live-search-price-new {
  font-size: 15px;
  color: #222;
  font-weight: 700;
}

.hwd-live-search-all,
.hwd-live-search-state {
  display: block;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.3;
}

.hwd-live-search-all {
  color: #00a88f;
  font-weight: 700;
  text-decoration: none;
  background: #f7fffd;
}

.hwd-live-search-all:hover,
.hwd-live-search-all:focus {
  color: #008a76;
  text-decoration: none;
}

.hwd-live-search-state {
  color: #777;
  background: #fff;
}

@media (max-width: 767.98px) {
  html.hwd-live-search-open,
  html.hwd-live-search-open body {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  html.hwd-live-search-open .hwd-live-search-backdrop {
    display: block !important;
    top: var(--hwd-live-search-top, 67px) !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: auto !important;
  }

  /* Keep the header/search field above the white overlay so typed text remains visible. */
  html.hwd-live-search-open header,
  html.hwd-live-search-open .header,
  html.hwd-live-search-open #header,
  html.hwd-live-search-open .mobile-header,
  html.hwd-live-search-open .oct-mobile-header,
  html.hwd-live-search-open .rm-mobile-header {
    position: relative;
    z-index: 2147483646 !important;
  }

  /* Hide the product-page sticky buy/options panel while search is open. */
  html.hwd-live-search-open .rm-product-mobile-fixed,
  html.hwd-live-search-open .oct-product-mobile-fixed,
  html.hwd-live-search-open .oct-product-fixed,
  html.hwd-live-search-open .oct-bottom-cart,
  html.hwd-live-search-open .fixed-bottom,
  html.hwd-live-search-open .sticky-bottom,
  html.hwd-live-search-open .mobile-fixed,
  html.hwd-live-search-open .mobile-sticky,
  html.hwd-live-search-open #rm_fixed_contact_button,
  html.hwd-live-search-open #rm_fixed_contact_substrate,
  html.hwd-live-search-open .oct-fixed-bar,
  html.hwd-live-search-open #oct-policy {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .hwd-live-search-dropdown {
    position: fixed !important;
    z-index: 2147483647 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: var(--hwd-live-search-top, 67px) !important;
    width: 100vw !important;
    max-width: none !important;
    height: calc(var(--hwd-live-search-vh, 100vh) - var(--hwd-live-search-top, 67px)) !important;
    max-height: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .22) !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .hwd-live-search-list {
    max-height: calc(var(--hwd-live-search-vh, 100vh) - var(--hwd-live-search-top, 67px) - 48px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
  }

  .hwd-live-search-item {
    padding: 11px 12px;
    gap: 10px;
    min-height: 78px;
  }

  .hwd-live-search-img {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
  }

  .hwd-live-search-title {
    font-size: 15px;
    line-height: 1.22;
  }

  .hwd-live-search-code {
    font-size: 13px;
  }

  .hwd-live-search-price-new {
    font-size: 16px;
  }
}
