/* Main container */
#searchDropdownHeader {
    position: absolute;
    /* width: 100%; */
    width: 550px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    margin-top: 8px;
    overflow-y: auto;
    display: none !important;
    /* Ensuring dropdown is hidden by default with important */
    border: 1px solid #eaeaea;
    /* max-height: 350px; */
    visibility: hidden;
    /* Additional hiding method */
}

#searchDropdownHeader.active {
    display: block !important;
    /* animation: fadeIn 0.2s ease-in-out; */
    visibility: visible;
    /* Show when active */
}


/* Search container */
.search-container-header {
    /* position: relative;
        margin-bottom: 30px; */
    margin-top: 15px;
    /* margin-left: 250px; */
    margin-bottom: 5px;
    float: left;
    /* width: 650px; */
}

/* Search dropdown styling */
.search-dropdown {
    position: absolute;
    /* width: 100%; */
    width: 550px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    margin-top: 2px;
    /* max-height: 500px; */
    overflow-y: auto;
    display: none;
    border: 1px solid #ddd;
}

.search-dropdown.active {
    display: block;
}

/* Section headers */
.dropdown-section-header {
    padding: 10px 15px;
    font-weight: bold;
    /* background-color: #f8f4ee; */
 /*   border-bottom: 1px solid #ddd; */
    color: #5f534f;

   
  background: #fdf8f2;
  
  border-top: #dbd0cc solid 2px;
  border-bottom: #dbd0cc solid 2px;
  

}

/* Suggestion items */
.suggestion-item {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.suggestion-item:hover {
    background-color: #f9f9f9;
}

.search-icon {
    margin-right: 8px;
    color: rgb(71, 71, 71);
    font-size: 14px;
}

/* Product items */
.product-item-dropdown {
    display: flex;
    padding: 5px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    align-items: center;
    position: relative;
}

.product-item-dropdown:hover {
    /* background-color: #f9f9f9; */
    background-color: #fdf8f2;
}

.product-image-small {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* background-color: #f5f5f5;
        border-radius: 4px; */
}

.product-image-small img {
    max-width: 100%;
    max-height: 100%;
}

.product-info-dropdown {
    flex-grow: 1;
    min-width: 0;
}

.product-info-dropdown h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.product-info-dropdown p {
    margin: 0;
    font-size: 12px;
    color: #666;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price-dropdown {
    margin-left: 14px;
    /* font-weight: bold; */
    color: #222;
    white-space: nowrap;
    font-size: 15px;
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

/* FAQ items */
.faq-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.faq-item:hover {
    background-color: #f9f9f9;
}

.faq-item h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.faq-item p {
    margin: 0;
    font-size: 12px;
    color: #666;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Match highlighting */
.highlight {
    font-weight: 600;
    color: #ff7100;
    background-color: rgba(255, 113, 0, 0.1);
}

/* Search box */
#searchBox {
    width: 100%;
    max-width: 550px;
    /* padding: 12px 15px; */
    padding: 5px 15px;
    /* font-size: 16px; */
    font-size: 16px;
    /* border: 1px solid #ddd; */
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff url("/images/icon/search.svg") no-repeat right;
    background-size: 30px 15px;
}

#searchBox:focus {
    outline: none;
    /* border-color: #ff7100; */
    /* box-shadow: 0 0 0 2px rgba(255, 113, 0, 0.2); */
}

/* Bottom results area */
#searchResults {
    display: none;
    margin-top: 20px;
}

.search-results-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.product-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    transition: background-color 0.2s ease;
}

.product-item:hover {
    background-color: #f9f9f9;
}

.product-image img {
    max-width: 100%;
    border-radius: 4px;
}

.product-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.product-info p {
    margin: 0 0 10px 0;
    color: #666;
}

.price {
    font-weight: bold;
    color: #ff7100;
    font-size: 18px;
}

/* Debug panel */
.debug-box {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

#debug-output {
    font-family: monospace;
    white-space: pre-wrap;
    background-color: #f0f0f0;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 12px;
}

/* Search input container with button */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-container #searchBox {
    flex: 1;
    padding-right: 45px; /* Make room for the search button */
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: #ff7100;
    border: 1px solid #ff7100;
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background: #e6640a;
}

.search-button:active {
    background: #cc5a09;
}

.search-input-container #searchBox:focus {
    border-color: #ff7100;
    outline: none;
}
