/* General Styles for Search Container and Dropdowns */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 999; /* Make sure it's below the search suggestions but above other content */
}

.search-container {
    position: relative;
    width: 100%; /* Adjust based on your layout */
    max-width: 500px; /* Adjust based on your layout */
}

.suggestions, .recent-searches {
    position: absolute;
    top: 100%; /* Align right below the input */
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000; /* High z-index to ensure it's above other content */
    display: none; /* Hidden by default */
    max-height: 400px; /* Limit height */
    overflow-y: auto; /* Enable scroll */
    margin-top: 5px;
    border-radius: 4px;
}

.suggestions div, .recent-searches div, .suggestion-item, .recent-search-item {
    padding: 5px;
    cursor: pointer;
}

.suggestions div:hover, .recent-searches div:hover, .suggestion-item:hover, .recent-search-item:hover {
    background-color: #f4f4f4; /* Light grey background on hover for better interactivity */
}

.search-container input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-container button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.recent-searches-title {
    font-weight: bold;
    padding: 10px 15px;
    font-size: 16px;
    border-bottom: 1px solid #E0E0E0;
    color: #333;
    cursor: default; /* Ensure it does not look clickable */
background-color: #f4f4f4;
}
.recent-searches-title:hover {
    cursor: text;
}
.remove-search {
    float: right;
    cursor: pointer;
    color: #d94a8c;
    margin-left: 10px;
}

.remove-search:hover {
    color: #ff0000;
}

.item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-name {
    font-weight: bold;
    font-size: 14px;
}

.item-category {
    font-size: 14px;
    color: #666;
}

.category-name {
    font-weight: bold;
    font-size: 16px;
}

.category-text {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}

.suggest-image {
    width: auto;
    height: 48px;
    margin-right: 0px;
    object-fit: cover;
    border-radius: 4px; /* Adds a slight rounding to the image corners */
}

.suggestion-item a {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit; /* Keeps the link color consistent with the rest of the text */
}

.suggestion-item a:hover {
    text-decoration: none; /* Adds visual feedback on hover */
}
.clear-search {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #d94a8c;
    color: white;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: none;
}
span.item-price-from {
    flex: 1 1 auto;
    user-select: auto;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    line-height: 1.42857;
    font-weight: 400;
    color: inherit;
    opacity: 0.48;
}
span.item-price {
    flex: 1 1 auto;
    user-select: auto;
    font-size: 1rem;
    letter-spacing: 0px;
    line-height: 1.5;
    font-weight: 700;
    color: inherit;
    opacity: 1;
}
/* Search Page */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.search-results-container {
    width: 80%;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.categories-box {
    margin: 10px 0;
}

.category-tag {
    display: inline-block;
    padding: 5px 10px;
    background: #ddd;
    border-radius: 3px;
    margin-right: 5px;
}

.main-content {
    display: flex;
    gap: 20px;
}

.filters {
    width: 25%;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
}

.results-section {
    width: 75%;
}

.results-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eee;
    padding: 10px;
    border-radius: 5px;
}

.results-inner {
    margin-top: 10px;
}

.search-item {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.view-toggle button {
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    background: #ddd;
    border-radius: 3px;
    margin-right: 5px;
}

.view-toggle button.active {
    background: #333;
    color: white;
}
