/**
 * BaatKaro - Search Page Styles
 */

/* Import CSS Variables */
@import url('variables.css');

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 8px;
}

/* Search Page Container */
.search-page {
    padding: 40px 0;
    width: 100%;
    background-color: var(--bg-light);
}

/* Override professionals grid specifically for search page with high specificity */
.search-page .search-container .search-results .professionals-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.search-page .search-container .search-results .professional-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    margin: 0 !important;
    transition: all 0.3s ease;
}

.search-page .search-container .search-results .professional-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.search-page .search-container .search-results .professional-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.search-page .search-container .search-results .professional-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.search-page .search-container .search-results .professional-info button {
    width: 100%;
    margin-top: auto;
    background-color: var(--primary-color);
    color: white;
}

.search-page .search-container .search-results .professional-info button:hover {
    background-color: #b84a3d; /* Darker shade of primary color */
}

.search-container {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 100%;
}

.search-results {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Filter Sidebar Styles */
.filters {
    width: 280px;
    flex-shrink: 0;
    flex-grow: 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.filter-group {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 32px;
}

.filter-group h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-body);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.show-more {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 8px;
    font-weight: 500;
}

.show-more:hover {
    text-decoration: underline;
}

/* Price Range Slider */
.price-range {
    margin-top: 16px;
}

.range-inputs {
    width: 100%;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #ccc, var(--primary-color));
    border-radius: 2px;
    outline: none;
    margin-bottom: 16px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
}

.filter-buttons button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.filter-buttons button.btn-primary {
    background-color: var(--primary-color);
}

.filter-buttons button.btn-secondary {
    background-color: white;
    color: var(--text-body);
    border: 1px solid #ddd;
}

/* Search Results Styles */
.results-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.results-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.results-count {
    color: var(--text-light);
    margin-bottom: 16px;
}

.results-count span {
    font-weight: 600;
    color: var(--text-dark);
}

.sort-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sort-options label {
    margin-right: 8px;
    font-size: 14px;
    color: var(--text-body);
}

.sort-options select {
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23484848' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* Professional Cards Styling - SEARCH PAGE SPECIFIC */
.search-page .professionals-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.search-page .professional-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.search-page .professional-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.search-page .professional-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.search-page .professional-info h3 {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.search-page .professional-info p {
    color: var(--text-body);
    margin-bottom: 5px;
}

.search-page .professional-info .specialties {
    color: var(--text-light);
}

.search-page .professional-info .session-fee {
    color: var(--primary-color);
    font-weight: 600;
}

.search-page .professional-info .availability {
    margin-top: 8px;
    color: var(--text-body);
}

.search-page .professional-info button {
    width: 100%;
    margin-top: auto;
    background-color: var(--primary-color);
    color: white;
}

.search-page .professional-info button:hover {
    background-color: #b84a3d;
}

.pro-favorite {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

.pro-favorite i {
    color: var(--primary-color);
    margin-right: 5px;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rating i {
    color: var(--primary-color);
    margin-right: 5px;
}

.rating .light {
    color: var(--text-light);
    font-weight: normal;
    font-size: 14px;
    margin-left: 4px;
}

/* Load More Button */
.load-more {
    margin: 40px 0;
    text-align: center;
}

.load-more button {
    padding: 12px 48px;
    background-color: var(--primary-color);
    color: white;
}

.load-more button:hover {
    background-color: #b84a3d;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: var(--text-dark);
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination a:hover:not(.active) {
    background-color: #f7f7f7;
}

.pagination a.next {
    margin-left: 12px;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .search-container {
        flex-direction: column;
    }

    .filters {
        width: 100%;
        position: static;
        margin-bottom: 32px;
    }

    .filter-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .search-page .professionals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 768px) {
    .search-page .professionals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .sort-options {
        justify-content: flex-start;
        margin-top: 16px;
    }
}

@media screen and (max-width: 576px) {
    .filter-options {
        grid-template-columns: 1fr;
    }

    .search-page .professionals-grid {
        grid-template-columns: 1fr !important;
    }

    .pagination a {
        padding: 6px 12px;
        margin: 0 2px;
    }
}
