/* Search Page Styles */
.search-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Search Header */
.search-header {
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.search-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Search Filter Section */
.search-filter-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.filter-wrapper {
    padding: 0;
}

.filter-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.filter-title i {
    color: #06befc;
    font-size: 1.2rem;
}

.filter-count {
    background: #06befc;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Modern Filter Form */
.modern-filter-form {
    padding: 2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.filter-field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #6c757d;
    font-size: 0.9rem;
    pointer-events: none;
}

.modern-input,
.modern-select {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #495057;
    font-family: inherit;
}

.modern-input:focus,
.modern-select:focus {
    outline: none;
    border-color: #06befc;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: #ffffff;
}

.modern-input::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Custom Select Styling */
.modern-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    min-width: 120px;
    justify-content: center;
}

.primary-btn {
    background: linear-gradient(135deg, #06befc 0%, #06befc 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #06befc 100%);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
}

.secondary-btn {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.secondary-btn:hover {
    background: #5a6268;
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
    transform: translateY(-1px);
}

/* Search Results */
.search-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.results-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dee2e6;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.results-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.search-product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.search-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .search-product-image img {
    transform: scale(1.05);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 2rem;
}

.product-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.featured {
    background: #28a745;
    color: white;
}

.badge.urgent {
    background: #dc3545;
    color: white;
}

.product-details {
    padding: 1.25rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #06befc;
    margin-bottom: 0.75rem;
}

.product-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.product-location i {
    color: #06befc;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.product-category {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.product-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* No Products */
.no-products {
    padding: 4rem 2rem;
    text-align: center;
}

.no-products-content i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.no-products-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-products-content p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pagination-btn,
.pagination-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: #06befc;
    color: white;
    border-color: #06befc;
    transform: translateY(-1px);
}

.pagination-number.active {
    background: #06befc;
    color: white;
    border-color: #06befc;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filter-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .filter-actions {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 0 0.5rem;
        gap: 1rem;
    }

    .search-header {
        padding: 2rem 0;
    }

    .search-header h1 {
        font-size: 2rem;
    }

    .filter-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filter-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination-btn,
    .pagination-number {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .search-header h1 {
        font-size: 1.75rem;
    }

    .filter-title {
        font-size: 1.2rem;
    }

    .modern-filter-form {
        padding: 1rem;
    }

    .modern-input,
    .modern-select {
        padding: 1rem 1rem 1rem 2.5rem;
        font-size: 1rem;
    }

    .action-btn {
        padding: 1rem;
        font-size: 0.95rem;
    }
}