/* Divi Mega Menu - Search Results Page Styles */

.divi-search-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Search Header */
.search-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-results-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
}

.divi-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #10b981;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-submit {
    padding: 16px 24px;
    background: #10b981;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    background: #059669;
}

/* No Query State */
.divi-search-no-query {
    text-align: center;
    padding: 80px 20px;
}

.divi-search-no-query h2 {
    font-size: 2rem;
    color: #4a5568;
    margin-bottom: 16px;
}

.divi-search-no-query p {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 40px;
}

/* Filters & Sorting */
.search-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.search-filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 10px 20px;
    border: none;
    background: white;
    color: #64748b;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.filter-tab:hover {
    background: #e2e8f0;
}

.filter-tab.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.search-sort-options select {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    outline: none;
}

.search-sort-options select:focus {
    border-color: #10b981;
}

/* Results Grid */
.search-results-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.search-results-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.search-results-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.search-results-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.search-results-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Individual Result Cards */
.search-result-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.search-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #10b981;
}

.search-result-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.search-result-link:hover {
    text-decoration: none;
}

.search-result-image {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-image.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 48px;
}

.search-result-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-result-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.search-result-type.type-product {
    background: #dbeafe;
    color: #1e40af;
}

.search-result-type.type-category {
    background: #dcfce7;
    color: #166534;
}

.search-result-type.type-content {
    background: #fef3c7;
    color: #92400e;
}

.search-result-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
    line-height: 1.3;
}

.search-result-link:hover .search-result-title {
    color: #10b981;
}

.search-result-excerpt {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.search-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.search-result-price {
    font-weight: 700;
    color: #10b981;
    font-size: 1.1rem;
}

.search-result-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fbbf24;
}

.search-result-product-count {
    color: #64748b;
    font-size: 0.9rem;
}

/* Loading State */
.search-loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    border-color: #10b981;
    color: #10b981;
}

.pagination-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #4a5568;
}

/* Responsive Design */
@media (max-width: 768px) {
    .divi-search-results-container {
        padding: 20px 16px;
    }
    
    .search-results-header h1 {
        font-size: 2rem;
    }
    
    .search-filters-bar {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .search-filter-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .search-result-image {
        height: 150px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 1024px) {
    .search-results-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-results-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
}
