/* WooCommerce Custom Search Bar Styles */

.woo-custom-search-wrapper {
    position: relative;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.woo-custom-search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.woo-custom-search-container:focus-within {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    padding-right: 12px;
    flex-shrink: 0;
}

.search-icon svg {
    width: 24px;
    height: 24px;
}

.woo-custom-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #1f2937;
    padding: 16px 16px 16px 0;
    font-weight: 400;
    line-height: 1.5;
}

.woo-custom-search-input::placeholder {
    color: #6b7280;
    font-weight: 400;
}

.woo-custom-search-button {
    background: #ff8c00;
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    height: 100%;
}

.woo-custom-search-button:hover {
    background: #e67e00;
}

.woo-custom-search-button:active {
    background: #cc7000;
}

/* Search Results Dropdown */
.woo-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.woo-search-results::-webkit-scrollbar {
    width: 8px;
}

.woo-search-results::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.woo-search-results::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.woo-search-results::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f9fafb;
}

.search-result-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 16px;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-excerpt {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-price {
    font-size: 14px;
    font-weight: 600;
    color: #0066CC;
    margin: 0;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.search-loading {
    padding: 20px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.search-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #d1d5db;
    border-top-color: #0066CC;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .woo-custom-search-input {
        font-size: 14px;
        padding: 14px 12px 14px 0;
    }
    
    .woo-custom-search-button {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .search-icon {
        padding-left: 16px;
    }
    
    .search-result-image {
        width: 50px;
        height: 50px;
    }
    
    .search-result-title {
        font-size: 14px;
    }
    
    .search-result-excerpt {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .woo-custom-search-button {
        padding: 14px 20px;
        font-size: 13px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
}
