/* Fix for search component in compare page */
.compare-section {
  position: relative;
}

/* Search container z-index fixes */
.search-fix-section .header-main-right {
  position: relative;
  z-index: 9999 !important;
}

.search-fix-section .search-wrapper {
  position: relative;
  z-index: 9999 !important;
}

.search-fix-section .search-dropdown {
  position: absolute !important;
  z-index: 9999 !important;
}

/* Ensure search results are visible */
.compare-search-dropdown {
  z-index: 9999 !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  width: 100% !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  background: #fff !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.compare-page-search {
  position: relative !important;
  z-index: 9999 !important;
}

/* Mobile search fixes */
.compare-mobile-search {
  z-index: 10000 !important;
}

/* Fix for table wrapper */
.compare-table-wrapper {
  position: relative;
  z-index: 1;
}

/* Additional fixes */
body.search-open .search-fix-section {
  z-index: auto !important;
}

/* Overlay for search results */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 9000;
}

/* Ensure search form is above other elements */
.search-form {
  position: relative;
  z-index: 9999;
}

/* Fix for search dropdown positioning */
.search-dropdown {
  position: absolute;
  z-index: 9999;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Fix for input focus issues */
.search-input:focus {
  position: relative;
  z-index: 9999;
}

/* Ensure mobile search is above everything */
.mobile-search-overlay {
  z-index: 99999 !important;
}

/* Fix for compare table to stay below search */
.compare-section .compare-table {
  z-index: 1;
  position: relative;
} 