/* === Container Setup === */
.search-form-container {
  position: relative;
  display: flex;
  align-items: stretch;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.search-form-wrapper {
  flex-grow: 1;
}

/* === Search Field === */
.search-field {
  padding: 10px 16px;
  border: 2px solid #ddd;
  border-right: none;
  font-size: 14px;
  outline: none;
  border-radius: 30px 0 0 30px;
  width: 100%;
  font-family: 'Inter', sans-serif;
  height: 42px;
  box-sizing: border-box;
}

/* === Submit Button === */
.search-submit {
  background-color: #01254C;
  color: #fff;
  border: 2px solid #01254C;
  border-left: none;
  border-radius: 0 30px 30px 0;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  height: 42px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-submit:hover {
  background-color: #01407c;
}



/* === Responsive === */
@media only screen and (max-width: 768px) {
  .search-form-container {
    flex-direction: row;
    gap: 0px;
    width: 295px;;
    
  }
  
  .header-user-section form{
  width:80%;}
  
      .search-field {
        width: 100%;
    }

  .search-form-wrapper {
    width: 100%;
  }

  .search-submit {
    border-radius: 30px;
    width: 100%;
    height: 42px;
    border-left: 2px solid #01254C;
  }

  .search-field {
    border-radius: 30px;
    border: 2px solid #ddd;
    width:100%;
  }
  
  .search-submit{width:30%;}
}

    #distributorMenu .header-user-section {
        gap: 0px;
        margin: 0px;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .guest-actions {
    gap: 0px;
}

/* === Dropdown === */
.lso-dropdown {
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-radius: 6px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 99999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', sans-serif;
  backface-visibility: hidden;
}

/* === Group Label === */
.dropdown-group-label {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  background-color: #f8f9fb;
  border-bottom: 1px solid #eee;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Each Result Item === */
.lso-dropdown .dropdown-item {
  padding: 12px 16px;
  font-size: 15px;
  color: #01254C !important;
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease, color 0.2s ease;
  outline: none;
}

.lso-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.lso-dropdown .dropdown-item:hover,
.dropdown-item.active {
  background-color: #01254C !important;
  color: #ffffff !important;
  cursor: pointer;
  outline: none;
}

.dropdown-item:focus {
  outline: 2px solid #01254C;
  outline-offset: 2px;
}

/* === Link inside item === */
.lso-dropdown .dropdown-item a {
  color: inherit !important;
  text-decoration: none;
  display: block;
  width: 100%;
}

/* === Layout Inside Each Item === */
.dropdown-item-flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === Thumbnail === */
.item-thumb {
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Metadata (Title + SKU) === */
.item-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.item-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sku {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile fallback for long titles */
@media only screen and (max-width: 480px) {
  .item-title,
  .item-sku {
    white-space: normal;
  }
}

/* === Search Term Highlighting === */
.item-title mark,
.item-sku mark {
  background-color: #ffffcc;
  padding: 0;
  font-weight: bold;
  color: inherit;
}

/* === Loading Spinner === */
.loading-spinner {
  font-style: italic;
  color: #888;
  text-align: center;
  padding: 12px 16px;
}

/* === View All Results === */
.view-all-results {
  text-align: center;
  font-weight: 500;
  background-color: #f0f4f9;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  color: #01254C !important;
}

.view-all-results a {
  text-decoration: none;
  color: inherit !important;
}

.view-all-results:hover {
  background-color: #01254C !important;
  color: #ffffff !important;
}

/* === Suggestions (Search History) === */
.search-suggestions {
  padding: 10px 16px;
  background-color: #f9fafc;
  border-bottom: 1px solid #eee;
}

.suggestion-item {
  font-size: 14px;
  padding: 8px 0;
  color: #666;
  padding-left: 16px;
}

.suggestion-item:hover {
  background-color: #f0f4f9;
  color: #01254C;
  cursor: pointer;
}

/* === Optional: Body loading class === */
body.lso-search-loading {
  cursor: progress;
}