/**
 * SearchWP Live Search Results Styling
 * 
 * Enhanced styles for the repositioned search results
 */

/* Ensure the search form container can handle relative positioning */
.searchwp-form {
    position: relative;
}

/* Style the repositioned results container */
.searchwp-live-search-results {
    position: relative !important;
    z-index: 9999 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-height: unset !important;
    overflow-y: auto !important;
    left: 0 !important;
    width: 100% !important;
    top: 0 !important;
    margin-top: 12px !important;
}

/* Style the results container to display as grid */
.searchwp-live-search-results-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    column-gap: 8px !important;
    row-gap: 20px !important;
    max-width: 100% !important;
}

/* Style individual search results */
.searchwp-live-search-result {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    position: relative !important;
}

/* Style the product image */
.searchwp-live-search-result--img img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1/1 !important;
    object-fit: cover !important;
}

/* Style the result info section */
.searchwp-live-search-result--info {
    width: 100% !important;
    margin-top: 4px !important;
}
.searchwp-live-search-result--price > ins{
    text-decoration: none;
}

/* Style the product title - remove all font styling */
.searchwp-live-search-result--title {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    margin: 0 !important;
}

.searchwp-live-search-result--title a {
    color: var(--wp--preset--color--primary) !important;
    text-decoration: none !important;
}
.searchwp-live-search-result--title a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.drawer .search-submit{
    display: none !important;
}

.drawer form.searchwp-form input.swp-input--search {
    background-image: url("/wp-content/uploads/search.svg");
    background-position: left 8px top 50%;
    background-repeat: no-repeat;
    background-size: 15px auto;
    padding-left: 32px;
    padding-right: 8px;
}

.drawer .searchwp-form{
    margin-top: 0 !important;
}

/* Style placeholder with primary color */
form.searchwp-form input.swp-input--search::placeholder {
    color: var(--wp--preset--color--main) !important;
    opacity: 1 !important;
}

/* For webkit browsers (Chrome, Safari, Edge) */
form.searchwp-form input.swp-input--search::-webkit-input-placeholder {
    color: var(--wp--preset--color--main) !important;
    opacity: 1 !important;
}

/* For Firefox */
form.searchwp-form input.swp-input--search::-moz-placeholder {
    color: var(--wp--preset--color--main) !important;
    opacity: 1 !important;
}

/* For IE/Edge */
.drawer form.searchwp-form input.swp-input--search:-ms-input-placeholder {
    color: var(--wp--preset--color--main) !important;
    opacity: 1 !important;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .searchwp-live-search-results {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .searchwp-live-search-results-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    }
}

/* Loading state */

/* Scrollbar styling for the results container */
.searchwp-live-search-results::-webkit-scrollbar {
    width: 6px;
}

.searchwp-live-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.searchwp-live-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.searchwp-live-search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
