/* ============================================================
   SEARCH PAGE CSS
   ============================================================ */

.search-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.search-header h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.filter-select option {
    background: var(--primary-color);
    color: white;
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.sort-select option {
    background: var(--primary-color);
}

.search-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* ============================================================
   RESULTS SECTION
   ============================================================ */

.results-container {
    margin-bottom: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-count {
    color: var(--text-dark);
    font-size: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
    font-size: 0.9rem;
}

.view-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.view-btn:hover {
    border-color: var(--accent-color);
}

/* ============================================================
   RESULTS GRID
   ============================================================ */

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-results.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.result-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.search-results.list-view .result-card {
    display: flex;
    flex-direction: row;
}

.result-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--box-shadow-lg);
}

.result-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.search-results.list-view .result-image {
    width: 180px;
    height: 135px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.result-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.result-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    flex: 1;
}

.result-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.result-stars {
    color: #ffc107;
    font-size: 0.85rem;
}

.result-rating-value {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.result-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.empty-state .btn {
    display: inline-flex;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.pagination-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
    font-weight: 600;
}

.pagination-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.pagination-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

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

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
    .search-header {
        padding: 2rem 1rem;
    }

    .search-filters {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-input,
    .filter-select,
    .sort-select {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .search-results.list-view {
        grid-template-columns: 1fr;
    }

    .search-results.list-view .result-image {
        width: 150px;
        height: 112px;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding: 1.5rem 1rem;
    }

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

    .search-results {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .result-card,
    .search-results.list-view .result-card {
        margin: 0;
    }

    .result-info {
        padding: 0.75rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }

    .view-toggle {
        width: 100%;
        margin-top: 1rem;
    }

    .view-btn {
        flex: 1;
    }

    .empty-state {
        padding: 2rem 1rem;
    }
}
