#searchform {
    display: flex;
    width: 100%;
    margin: 10px auto;
    align-items: center;
    position: relative;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Customizable variables for easy tweaks */
:root {
    --search-box-height: 42px;
    --search-button-height: var(--search-box-height);
    --font-family: 'Source Sans Pro', sans-serif;
    --font-size-small: 12px;
    --font-size-medium: 14px;
    --font-size-large: 16px;
    --button-bg-color: #73B158;
    --button-text-color: white;
    --highlight-color: #73B158;
    --price-color: #497f7f;
}

/* Search Input */
#cas-search {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 100%;
    font-size: var(--font-size-medium);
    font-family: var(--font-family);
    height: var(--search-box-height);
    padding-right: 35px;
    text-align: left;
}

/* Standard Search Button */
#searchform button {
    padding: 10px 15px;
    background: var(--button-bg-color);
    color: var(--button-text-color);
    border: 1px solid var(--button-bg-color);
    border-left: none;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--search-button-height);
    font-size: var(--font-size-medium);
    font-weight: bold;
    text-align: center;
}

#searchform button:hover {
    background: #5f9e4a;
}

/* Dropdown Search Results */
#cas-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    z-index: 9999;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    font-family: var(--font-family);
}

/* Search Result Item */
.cas-search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

/* Product Image on Left (Square Ratio) */
.cas-search-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 4px;
}

/* Product Info Container */
.cas-search-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* SKU & Product Name */
.cas-product-header {
    display: flex;
    align-items: center;
    font-size: var(--font-size-medium);
}

/* SKU Styling */
.cas-sku {
    font-weight: 400;
    color: #666;
    font-size: var(--font-size-small);
    margin-right: 10px;
}

/* Product Name Styling - Green */
.cas-title {
    font-weight: 700;
    color: var(--highlight-color);
}

/* Price - Changed to #497f7f */
.cas-price {
    font-size: var(--font-size-medium);
    font-weight: 600;
    color: var(--price-color);
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Variations in One Row */
.cas-variations {
    font-size: var(--font-size-small);
    color: #666;
    margin-top: 4px;
}

/* Load Source Sans Pro Font */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;700&display=swap');
#cas-load-more {
    text-align: center;
    padding: 10px;
    cursor: pointer;
    background: #73B158;
    color: white;
    font-weight: bold;
    display: block;
    margin-top: 10px;
    border-radius: 4px;
}

#cas-load-more:hover {
    background: #5f9e4a;
}
#cas-search-results {
    max-height: unset; /* Removes height restriction */
    overflow: hidden; /* No scrolling */
}

/* Load More Button - Smaller Size, Matches Product Title Font */
#cas-load-more {
    text-align: center;
    padding: 8px 12px; /* Reduce padding to make it smaller */
    cursor: pointer;
    background: #73B158;
    color: white;
    font-weight: bold;
    font-size: var(--font-size-medium); /* Matches product title */
    display: block;
    margin: 10px auto; /* Centered with spacing */
    border-radius: 4px;
    width: 150px; /* Smaller button width */
}

#cas-load-more:hover {
    background: #5f9e4a;
}
#cas-search-results {
    max-height: unset; /* Removes height restriction */
    overflow: hidden; /* No scrolling */
}

/* Load More Button Styled as a Link */
.cas-load-more {
    text-align: center;
    padding: 8px 12px;
    background: none;
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.cas-load-more a {
    background: #73B158;
    color: white;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.cas-load-more a:hover {
    background: #5f9e4a;
}
/* Make search results clickable */
.cas-search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    text-decoration: none;
    color: inherit;
}

.cas-search-item:hover {
    background: #f5f5f5;
}
/* Style for hidden price message */
.hidden-price {
    color: #999;
    font-style: italic;
}
/* Mobile-Friendly Adjustments */

@media screen and (max-width: 768px) {
    #cas-search-results {
        width: 90%; /* Make search results take up most of the screen */
        left: 5%;
    }

    .cas-search-item {
        flex-direction: column; /* Stack image and text vertically */
        align-items: center;
        text-align: center;
        padding: 8px;
    }

    .cas-search-item img {
        width: 80px; /* Reduce image size on mobile */
        height: 80px;
    }

    .cas-search-info {
        width: 100%;
        text-align: center;
    }

    .cas-title {
        font-size: 14px; /* Slightly smaller font for product name */
    }

    .cas-sku {
        font-size: 12px; /* Adjust SKU size */
    }

    .cas-price {
        font-size: 14px; /* Adjust price text size */
    }

    .cas-variations {
        font-size: 12px; /* Smaller text for variations */
    }

    .cas-load-more a {
        font-size: 14px;
        padding: 6px 10px;
    }
}
