.search-toggle-btn {
background: transparent;
border: none;
padding: 6px;
cursor: pointer;
color: #222;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.25s ease;
border-radius: 50%;
}
.search-toggle-btn:hover,
.search-toggle-btn:focus {
background: rgba(42, 51, 146, 0.1);
color: var(--tb-theme-color);
}
.search-toggle-btn .dashicons {
font-size: 20px; width: 20px;
height: 20px;
} .desktop-search-bar {
width: 100%;
background: #fff;
border-bottom: 2px solid #e0e0e0;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
animation: slideDown 0.3s ease-out;
position: relative;
z-index: 999;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.desktop-search-bar .container-main {
padding-top: 16px;
padding-bottom: 16px;
} .header-search-wrapper {
position: relative;
display: flex;
align-items: center;
gap: 10px;
width: 100%;
max-width: 700px;
margin: 0 auto;
}
.desktop-search-bar .header-search-wrapper {
max-width: 100%;
} .search-close-btn {
flex-shrink: 0;
background: transparent;
border: none;
padding: 10px;
cursor: pointer;
color: #666;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.2s ease;
}
.search-close-btn:hover,
.search-close-btn:focus {
background: #f0f0f0;
color: #222;
}
.search-close-btn .dashicons {
font-size: 22px;
width: 22px;
height: 22px;
} #live-search-form {
position: relative;
width: 100%;
flex: 1;
} #live-search-input {
width: 100%;
padding: 10px 40px 10px 16px;
border: 2px solid #e0e0e0;
border-radius: 24px;
font-size: 15px;
line-height: 1.5;
font-family: 'Helvetica', Arial, sans-serif;
transition: all 0.25s ease;
background: #fff;
box-sizing: border-box;
}
#live-search-input:focus {
outline: none;
border-color: var(--tb-theme-color);
box-shadow: 0 0 0 3px rgba(42, 51, 146, 0.1);
}
#live-search-input::placeholder {
color: #999;
font-size: 14px;
} .search-submit-btn {
position: absolute;
right: 4px;
top: 50%;
transform: translateY(-50%);
background: var(--tb-theme-color);
border: none;
border-radius: 50%;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.25s ease;
color: #fff;
}
.search-submit-btn:hover,
.search-submit-btn:focus {
background: var(--tb-theme-color-hover);
}
.search-submit-btn .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
} .live-search-loading {
position: absolute;
right: 48px;
top: 50%;
transform: translateY(-50%);
z-index: 5;
}
.live-search-loading .spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(42, 51, 146, 0.2);
border-top-color: var(--tb-theme-color);
border-radius: 50%;
animation: spin 0.6s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
} .live-search-results,
.advanced-search-results {
position: absolute;
top: calc(100% + 12px);
left: 0;
right: 0;
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
max-height: 480px;
overflow-y: auto;
z-index: 1001;
display: none;
}
.desktop-search-bar .live-search-results,
.desktop-search-bar .advanced-search-results {
position: fixed;
left: 50%;
transform: translateX(-50%);
max-width: 700px;
width: calc(100% - 30px);
} .live-search-results::-webkit-scrollbar {
width: 8px;
}
.live-search-results::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 0 12px 12px 0;
}
.live-search-results::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 4px;
}
.live-search-results::-webkit-scrollbar-thumb:hover {
background: #999;
} .search-suggestions-list {
list-style: none;
margin: 0;
padding: 0;
} .search-suggestion-item {
border-bottom: 1px solid #f0f0f0;
transition: background 0.2s ease;
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
cursor: pointer;
color: #232323;
}
.search-suggestion-item:last-child {
border-bottom: none;
}
.search-suggestion-item:hover,
.search-suggestion-item.selected {
background: #f8f9ff;
}
.suggestion-icon {
color: #999;
font-size: 18px;
width: 18px;
height: 18px;
flex-shrink: 0;
}
.suggestion-text {
flex: 1;
font-size: 15px;
line-height: 1.4;
}
.suggestion-text mark {
background: #fff3cd;
color: #856404;
padding: 1px 3px;
border-radius: 2px;
font-weight: 600;
} .search-product-count {
padding: 10px 16px;
background: #e7f3ff;
border-top: 1px solid #b3d9ff;
font-size: 13px;
color: #004085;
display: flex;
align-items: center;
gap: 6px;
}
.search-product-count .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
} .search-result-image {
flex-shrink: 0;
width: 60px;
height: 60px;
border-radius: 8px;
overflow: hidden;
background: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
}
.search-result-image img {
width: 100%;
height: 100%;
object-fit: cover;
} .search-result-content {
flex: 1;
min-width: 0;
}
.search-result-title {
font-size: 15px;
font-weight: 600;
color: #222;
margin-bottom: 6px;
line-height: 1.3;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.search-result-title mark {
background: #fff3cd;
color: #856404;
padding: 1px 3px;
border-radius: 2px;
font-weight: 700;
} .search-result-meta {
display: flex;
align-items: center;
gap: 12px;
font-size: 13px;
}
.search-result-price {
font-weight: 700;
color: var(--tb-theme-color);
}
.search-result-price .amount {
font-size: 14px;
}
.search-result-stock {
font-size: 12px;
padding: 2px 8px;
border-radius: 10px;
font-weight: 500;
}
.search-result-stock.in-stock {
background: #d4edda;
color: #155724;
}
.search-result-stock.out-of-stock {
background: #f8d7da;
color: #721c24;
} .show-all-results {
padding: 12px 16px;
background: #fff3cd;
border-top: 1px solid #ffc107;
border-bottom: 1px solid #ffc107;
transition: background 0.2s ease;
}
.show-all-results:hover {
background: #ffe69c;
}
.show-all-link {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
font-weight: 700;
color: #856404;
text-decoration: none;
transition: color 0.2s ease;
}
.show-all-link:hover,
.show-all-link:focus {
color: #533f03;
text-decoration: underline;
}
.show-all-link .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
} .view-all-results {
padding: 12px 16px;
background: #f8f9fa;
border-top: 1px solid #e0e0e0;
transition: background 0.2s ease;
}
.view-all-results.selected {
background: #e9ecef;
}
.view-all-link {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
font-weight: 600;
color: var(--tb-theme-color);
text-decoration: none;
transition: color 0.2s ease;
}
.view-all-link:hover,
.view-all-link:focus {
color: var(--tb-theme-color-hover);
text-decoration: underline;
}
.view-all-link .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
} .search-results-products {
padding: 0;
}
.search-result-item {
border-bottom: 1px solid #f0f0f0;
transition: background 0.2s ease;
}
.search-result-item:last-child {
border-bottom: none;
}
.search-result-item:hover,
.search-result-item.selected {
background: #f8f9ff;
}
.search-result-link {
display: flex;
align-items: center;
gap: 16px;
padding: 12px 16px;
text-decoration: none;
color: inherit;
}
.search-result-image {
flex-shrink: 0;
width: 60px;
height: 60px;
border-radius: 8px;
overflow: hidden;
background: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
}
.search-result-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.search-result-content {
flex: 1;
min-width: 0;
}
.search-result-title {
font-size: 15px;
font-weight: 600;
color: #222;
margin-bottom: 6px;
line-height: 1.3;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.search-result-title mark {
background: #fff3cd;
color: #856404;
padding: 1px 3px;
border-radius: 2px;
font-weight: 700;
}
.search-result-category {
font-size: 12px;
color: #999;
margin-bottom: 4px;
}
.search-result-rating {
font-size: 13px;
color: #ffc107;
margin-bottom: 4px;
}
.search-result-rating .rating-count {
font-size: 11px;
color: #999;
margin-left: 4px;
}
.search-result-meta {
display: flex;
align-items: center;
gap: 12px;
font-size: 13px;
}
.search-result-price {
font-weight: 700;
color: var(--tb-theme-color);
}
.search-result-price .amount {
font-size: 14px;
}
.search-result-stock {
font-size: 12px;
padding: 2px 8px;
border-radius: 10px;
font-weight: 500;
display: flex;
align-items: center;
gap: 4px;
}
.search-result-stock .stock-indicator {
width: 6px;
height: 6px;
border-radius: 50%;
display: inline-block;
}
.search-result-stock.in-stock {
background: #d4edda;
color: #155724;
}
.search-result-stock.in-stock .stock-indicator {
background: #28a745;
}
.search-result-stock.out-of-stock {
background: #f8d7da;
color: #721c24;
}
.search-result-stock.out-of-stock .stock-indicator {
background: #dc3545;
} .search-loading-state {
padding: 40px 20px;
text-align: center;
color: #666;
}
.loading-spinner {
display: inline-block;
width: 40px;
height: 40px;
border: 4px solid rgba(42, 51, 146, 0.1);
border-top-color: var(--tb-theme-color);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin-bottom: 16px;
}
.search-loading-state p {
margin: 0;
font-size: 15px;
} .search-suggestions-section {
padding: 12px 16px;
background: #f8f9fa;
border-top: 1px solid #e0e0e0;
}
.suggestions-title {
font-size: 12px;
font-weight: 600;
color: #666;
text-transform: uppercase;
margin-bottom: 8px;
}
.search-suggestions-section .search-suggestions-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.search-suggestions-section .search-suggestion-item {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background: white;
border: 1px solid #e0e0e0;
border-radius: 16px;
font-size: 13px;
cursor: pointer;
}
.search-suggestions-section .search-suggestion-item:hover {
background: var(--tb-theme-color);
color: white;
border-color: var(--tb-theme-color);
}
.suggestion-icon {
font-size: 12px;
} .recent-searches-section {
padding: 16px;
}
.recent-searches-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
font-weight: 600;
color: #666;
margin-bottom: 12px;
}
.recent-searches-list {
list-style: none;
margin: 0;
padding: 0;
}
.recent-search-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
background: white;
border: 1px solid #f0f0f0;
border-radius: 8px;
cursor: pointer;
margin-bottom: 4px;
}
.recent-search-item:hover {
background: #f8f9ff;
border-color: var(--tb-theme-color);
}
.recent-search-item .search-icon {
font-size: 14px;
}
.recent-search-item .search-text {
flex: 1;
font-size: 14px;
} .search-error-state {
padding: 32px 24px;
text-align: center;
color: #dc3545;
}
.search-error-state .dashicons {
font-size: 48px;
width: 48px;
height: 48px;
margin-bottom: 12px;
}
.search-error-state p {
margin: 12px 0 0 0;
font-size: 14px;
} .search-no-results {
padding: 32px 20px;
text-align: center;
color: #666;
}
.search-no-results .dashicons {
font-size: 48px;
width: 48px;
height: 48px;
color: #ccc;
margin-bottom: 12px;
}
.search-no-results p {
margin: 12px 0 16px 0;
font-size: 15px;
line-height: 1.5;
}
.search-no-results strong {
color: #222;
font-weight: 600;
}
.search-all-link {
display: inline-block;
padding: 10px 20px;
background: var(--tb-theme-color);
color: #fff;
text-decoration: none;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
transition: background 0.25s ease;
}
.search-all-link:hover,
.search-all-link:focus {
background: var(--tb-theme-color-hover);
color: #fff;
text-decoration: none;
} .mobile-search-bar {
width: 100%;
background: #fff;
padding: 12px 15px;
border-bottom: 1px solid #e0e0e0;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.mobile-search-bar .header-search-wrapper {
display: flex;
gap: 8px;
align-items: center;
}
.mobile-search-bar #live-search-form-mobile {
flex: 1;
}
.mobile-search-close {
flex-shrink: 0;
background: transparent;
border: none;
padding: 8px;
cursor: pointer;
color: #666;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background 0.2s ease;
}
.mobile-search-close:hover,
.mobile-search-close:focus {
background: #f0f0f0;
color: #222;
}
.mobile-search-close .dashicons {
font-size: 20px;
width: 20px;
height: 20px;
}
.mobile-search-toggle {
background: transparent;
border: none;
padding: 8px;
cursor: pointer;
color: #222;
display: flex;
align-items: center;
justify-content: center;
}
.mobile-search-toggle .dashicons {
font-size: 22px;
width: 22px;
height: 22px;
} @media (max-width: 767px) {
.header-search-wrapper {
max-width: 100%;
}
#live-search-input {
font-size: 16px; padding: 12px 44px 12px 16px;
}
.search-submit-btn {
width: 40px;
height: 40px;
}
.live-search-results {
max-height: 70vh;
border-radius: 8px;
top: calc(100% + 6px);
}
.search-result-link {
padding: 10px 12px;
gap: 12px;
}
.search-result-image {
width: 50px;
height: 50px;
}
.search-result-title {
font-size: 14px;
}
.search-result-meta {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.view-all-link {
font-size: 13px;
}
} @media (min-width: 768px) {
.header-search-wrapper {
min-width: 320px;
}
.live-search-results {
min-width: 420px;
}
} @media (prefers-reduced-motion: reduce) {
#live-search-input,
.search-result-item,
.view-all-results,
.search-submit-btn,
.search-all-link {
transition: none;
}
.live-search-loading .spinner {
animation: none;
border-color: var(--tb-theme-color);
}
} .search-result-link:focus-visible,
.view-all-link:focus-visible,
.search-all-link:focus-visible {
outline: 2px solid var(--tb-theme-color);
outline-offset: 2px;
}