/* Live Search Results Styles */
.tph-search-results-wrapper { position: relative; max-width: 600px; }
.tph-search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #ddd; border-top: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 9999; max-height: 400px; overflow-y: auto; }
.tph-search-results ul { list-style: none; margin: 0; padding: 0; }
.tph-search-results li a { display: block; text-decoration: none; }
.tph-search-results .tph-result-item { display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #eee; color: #333; transition: background-color 0.2s; }
.tph-search-results .tph-result-item:hover { background-color: #f5f5f5; }
.tph-search-results li:last-child .tph-result-item { border-bottom: none; }
.tph-search-results .tph-result-thumbnail { width: 50px; height: 50px; margin-right: 10px; }
.tph-search-results .tph-result-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.tph-search-results .tph-result-title { font-weight: bold; display: block; }
.tph-search-results .tph-result-price { font-size: 0.9em; color: #007cba; }
.tph-search-results .tph-no-results, .tph-search-results .tph-loading-spinner { padding: 15px; text-align: center; color: #777; font-style: italic; }


/*
 * ===================================================================
 * Styles for Faceted Search Results Page (High Specificity Version)
 * ===================================================================
 */

 /* This is the main wrapper we added in the template */
.tph-content-wrapper .tph-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 15px !important; /* Use !important to override theme padding */
    width: 100%;
}

/* We target the body class WordPress adds to search pages to increase priority */
body.search-results .tph-search-container {
    display: flex !important; /* Use !important to force flex layout */
    flex-wrap: wrap;
    gap: 30px;
}

body.search-results #tph-search-filters {
    flex: 1 1 280px;
    max-width: 100%;
    width: auto !important; /* Override theme fixed widths */
}

body.search-results .tph-search-results-content {
    flex: 3 1 500px;
    width: auto !important; /* Override theme fixed widths */
}

/* Style for filter widgets */
#tph-search-filters .widget {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    background: #fff;
}

#tph-search-filters .widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}

#tph-search-filters ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#tph-search-filters li a {
    text-decoration: none;
}

#tph-search-filters li.chosen > a {
    font-weight: bold;
    color: #333;
}

.tph-clear-filter {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9em;
    color: #a00;
    text-decoration: none;
}
.tph-clear-filter:hover {
    text-decoration: underline;
}