/* WooCommerce AJAX Search Styles */
.wc-ajax-search-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wc-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 12px;
    border: 1px solid #e9ecef;
}

.wc-category-section {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wc-category-section:hover {
    background: #f1f3f4;
    border-color: #dee2e6;
}

.wc-category-icon {
    width: 20px;
    height: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-category-text {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    flex: 1;
}

.wc-grid-icon {
    width: 16px;
    height: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.wc-grid-dot {
    background: #6c757d;
    border-radius: 1px;
    width: 6px;
    height: 6px;
}

.wc-search-input-section {
    flex: 1;
    position: relative;
}

.wc-search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    color: #495057;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.wc-search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.wc-search-button {
    background: #10b981;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.wc-search-button:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.wc-search-icon {
    width: 16px;
    height: 16px;
}

/* Search Results */
.wc-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.wc-search-results.show {
    display: block;
}

.wc-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wc-search-result-item:hover {
    background: #f8f9fa;
}

.wc-search-result-item:last-child {
    border-bottom: none;
}

.wc-search-result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f9fa;
}

.wc-search-result-content {
    flex: 1;
}

.wc-search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin: 0 0 4px 0;
}

.wc-search-result-price {
    font-size: 13px;
    color: #10b981;
    font-weight: 600;
}

/* Category Modal */
.wc-category-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: none;
}

.wc-category-modal.show {
    display: block;
}

.wc-category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

.wc-category-modal-overlay.show {
    display: block;
}

.wc-category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.wc-category-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.wc-category-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wc-category-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.wc-category-modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.wc-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.wc-category-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.wc-category-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wc-category-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wc-category-item-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    background: #dee2e6;
}

.wc-category-item-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.wc-category-item-info .count {
    font-size: 12px;
    color: #6c757d;
}

.wc-subcategories {
    margin-top: 12px;
}

.wc-subcategory-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 4px 0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wc-subcategory-item:hover {
    background: #f1f3f4;
}

.wc-subcategory-image {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    background: #f8f9fa;
}

.wc-subcategory-name {
    font-size: 14px;
    color: #495057;
    flex: 1;
}

.wc-subcategory-count {
    font-size: 12px;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-search-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .wc-category-section {
        min-width: 100%;
    }
    .wc-search-button {
        width: 100%;
    }
    .wc-category-modal {
        width: 95vw;
        max-height: 80vh;
    }
    .wc-category-grid {
        grid-template-columns: 1fr;
    }
} 