/* Category Search Widget Styles */

.csw-search-widget {
    width: 100%;
    position: relative;
}
/* Thêm style cho giá */
.csw-result-price {
    font-size: 13px;
    color: #E74C3C;
    margin-top: 4px;
    font-weight: 500;
}


.csw-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.csw-input-wrapper {
    position: relative;
    width: 100%;
}

.csw-search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    background: #FFFFFF;
    color: #333333;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.csw-search-input:focus {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.csw-search-input::placeholder {
    color: #999999;
}

.csw-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #87CEEB;
    pointer-events: none;
    display: flex;
}

/* Search Results */
.csw-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.csw-results-list {
    padding: 8px;
}

.csw-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.csw-result-item:hover {
    background-color: #F5F5F5;
}

.csw-result-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 50%!important;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
    background: #F0F0F0;
    border: 2px solid #E0E0E0;
}

.csw-result-info {
    flex: 1;
    text-align: left;
}

.csw-result-name {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    margin: 0;
    line-height: 1.2;
}

.csw-result-count {
    font-size: 12px;
    color: #666666;
    margin-top: 2px;
}

.csw-no-results {
    padding: 20px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

/* Custom scrollbar for results */
.csw-search-results::-webkit-scrollbar {
    width: 6px;
}

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

.csw-search-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.csw-search-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Highlight matching text */
.csw-highlight {
    background-color: #FFF3CD;
    font-weight: 600;
}

/* Placeholder thumbnail - circular */
.csw-placeholder-thumbnail {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 50%;
    background: #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #666666;
    flex-shrink: 0;
    border: 2px solid #E0E0E0;
}

/* Responsive */
@media (max-width: 768px) {
    .csw-search-container {
        padding: 30px 15px;
    }
    
    .csw-search-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .csw-search-input {
        padding: 14px 45px 14px 16px;
        font-size: 14px;
    }
    
    .csw-search-icon {
        right: 16px;
    }
    
    .csw-result-item {
        padding: 10px;
    }
    
    .csw-result-thumbnail,
    .csw-placeholder-thumbnail {
        width: 36px;
        height: 36px;
    }
    
    .csw-placeholder-thumbnail {
        font-size: 16px;
    }
    
    .csw-result-name {
        font-size: 14px;
    }
    
    .csw-search-results {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .csw-search-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .csw-search-container {
        padding: 24px 12px;
    }
}